home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20352 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  5.1 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.funet.fi!hydra!klaava!wirzeniu
  2. From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Optimal Partition Sizes
  5. Message-ID: <1992Dec14.160325.10314@klaava.Helsinki.FI>
  6. Date: 14 Dec 92 16:03:25 GMT
  7. References: <1992Dec14.082932.3774@nwnexus.WA.COM>
  8. Organization: University of Helsinki
  9. Lines: 86
  10.  
  11. danubius@halcyon.com (Joseph R. Pannon) writes:
  12. >Given plenty of HD space, could somebody provide some guidelines about
  13. >the optimal partition sizes for root, usr and swap partitions? 
  14.  
  15. Here is something that I have outlined write for the sysadmin guide
  16. (and/or the installation instructions).  It is VERY quick and dirty
  17. (first draft), and will probably be rewritten a few times before if is
  18. ready.  Hopefully it is usable even now.  Comments are welcome, of
  19. course.
  20.  
  21.        * Allocating swap space
  22.  
  23.        How much swap space do you need?  Many people will tell you
  24.        that you should allocate twice as much swap space as you have
  25.        physical memory, but this is bogus.  Here's how to do it:
  26.        
  27.        1.  Estimate your total memory needs.  This is the largest
  28.            amount of memory you'll probably need at a time, that is
  29.            the sum of the memory requirements of all the programs you
  30.            want to run at the same time.  For instance, if you want
  31.            to run X, you should allocate about 8 MB (???) for it, gcc
  32.            wants several megabytes, etc.  The kernel will use about a
  33.            megabyte by itself, and the usual shells and other small
  34.            utilities perhaps a few hundred kilobytes (say a meg
  35.            together).  There is no need to try to be exact, rough
  36.            estimates are fine.
  37.        
  38.        2.  Add some security to the estimate in step 1.  This is
  39.            because estimates of program sizes will probably be wrong,
  40.            because you'll probably forget some programs you want to
  41.            run, and to make certain that you have some extra space
  42.            just in case.  A couple of megabytes should be fine.  (It
  43.            is better to allocate too much than too little swap space,
  44.            but there's no need to overdo it and allocate the whole
  45.            disk, since unused swap space is wasted space.)  Also,
  46.            since it is nicer to deal with even numbers, you can round
  47.            the value up to the next full megabyte.
  48.        
  49.        3.  Based on the computations in steps 1 and 2, you know how
  50.            much memory you'll be needing in total.  So, in order to
  51.            allocate swap space, you only need to subtract the size of
  52.            your physical memory from the total memory need, and you
  53.            know how much swap space you need.
  54.        
  55.        The next issue is to decide whether you want to use a separate
  56.        swap partition, or a file in the file system.  The swap
  57.        partition is faster, but it is easier to change the size of a
  58.        swap file (there's no need to repartition the whole hard disk,
  59.        and possibly install everything from scratch).  When you know
  60.        how much swap space you need, you should go for a swap
  61.        partition, but if you are uncertain, you can use a swap file
  62.        first, use the system for a while so that you can get a feel
  63.        for how much swap you need, and then make a swap partition
  64.        when you're confident about its size.
  65.  
  66. About the root and usr partitions, I have not yet thought much about,
  67. but I guess the general consensus is that root should be as small as
  68. you can comfortably get away with (basically, it should contain only
  69. the crucial things), and usr should be as big as possible, especially
  70. if you put the home directories there.
  71.  
  72. However, for small disks several partitions easily makes life
  73. miserable.  For instance, I used to have four partitions on my 109 MB
  74. hard disk: 32 MB for DOS, 10 MB for root (including 4 MB swap file),
  75. 16 MB for home, and 51 MB for usr.  I usually had about 20-25 MB free
  76. space, which divided into four partitions is not a lot.  Even worse,
  77. most of the free space was on the DOS partition and not terribly
  78. useful for Linux use.  So even though I had a lot of free space, I
  79. couldn't really use it, since it was usually only about 3-4 MB per
  80. partition, and it is surprising how quickly one can fill that.
  81.  
  82. Now I have three partitions: 20 MB for DOS, 10 MB for swap, and 79 MB
  83. for Linux.  Yes, I have everything in one partition, and it is using
  84. the extended filesystem.  I DO NOT RECOMMEND this for people who
  85. dislike living dangerously.  The extended filesystem is still alpha,
  86. and only fools such as I risk all their data on it.  The extfs is also
  87. not as fast as it could be.  I decided that I can't live with 14
  88. character filenames anymore, nor with the cramped feeling of four
  89. partitions.  I guess I can live with disappearing data and
  90. re-installing everything once a day. :-)  (NO, the extfs isn't that
  91. bad; I've had exactly one problem with it during several weeks.  And I
  92. try to do backups regularly.)
  93.  
  94. --
  95. Lars.Wirzenius@helsinki.fi  (finger wirzeniu@klaava.helsinki.fi)
  96.    MS-DOS, you can't live with it, you can live without it.
  97.