home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / ultrix / 9212 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  5.7 KB

  1. Xref: sparky comp.unix.ultrix:9212 comp.unix.misc:4876
  2. Newsgroups: comp.unix.ultrix,comp.unix.misc
  3. Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nabeth!alan
  4. From: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  5. Subject: Re: partition & filesystem mysteries
  6. Message-ID: <1993Jan7.230815.21384@nntpd2.cxo.dec.com>
  7. Lines: 111
  8. Sender: alan@nabeth (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  9. Reply-To: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  10. Organization: Digital Equipment Corporation
  11. References:  <1ihufqINNp1p@slab.mtholyoke.edu>
  12. Date: Thu, 7 Jan 1993 23:08:15 GMT
  13.  
  14.  
  15. In article <1ihufqINNp1p@slab.mtholyoke.edu>, jbotz@mtholyoke.edu (Jurgen Botz) writes:
  16. >
  17. >I am somewhat mystified by the process of changing disk partitions
  18. >under Ultrix (4.x).  In "The Unix System Administration Handbook" 
  19. >(Evi & Nemeth) it states that BSD systems must have partition
  20. >boundaries aligned with cylinders (or even cylinder groups?) or
  21. >take a serious performance penalty.
  22.  
  23. I believe this belief dates from a time when the cylinder to cylinder
  24. seek time of disks was very much slower than the head switch time
  25. or even rotational latency.  Since the file system liked to lay
  26. things out on cylinder boundries for cylinder groups, bad alignment
  27. would tend to run things over cylinder boundries and incur these
  28. (probably) expensive seeks.
  29.  
  30. Today you have disks that, at best, put extra sectors at the end of
  31. tracks, have a different number of cylinders depending on where
  32. you are on the disk, have controllers that think they are smarter than
  33. you are about what order I/O should be done, read caches that read
  34. a couple of tracks of you anyway and sometimes write caches that
  35. hold onto the data until a good time write it.
  36.  
  37. On today's disks you have little way of telling where the cylinder
  38. boundries really, assuming it matters.  I doubt that strict attention
  39. to supposed cylinder alignment will make much difference today.  It
  40. would be easy enough to test if it did.
  41.  
  42. >Is this also true for Ultrix
  43. >(which is derived from 4.2BSD) or does the Ultrix automatically
  44. >align partitions on cylinder boundaries?
  45.  
  46. ULTRIX uses a variety of methods for laying out partitions table,
  47. depending on how long the disk has been available, size conventions
  48. for interesting file systems and a bit of folklore.  About the
  49. only constant through all the disks is that 16 KB is allocated
  50. for the A partition (a typical root file system place).  One of
  51. a set of sizes will be used for page/swap space.  Older disks may
  52. have inherited partition tables, middle aged disks have a strange
  53. mix of partition tables that seems to follow little rhyme nor reason
  54. and new disks follow the guidelines in the V4.2A disktab file.
  55.  
  56. >When I make a new file-
  57. >system on a partition I created it tells me that "n sectors in the
  58. >last cylinder are not allocated".  The manual pages say nothing
  59. >about this, and give no advice on how to calculate partition
  60. >sizes.
  61. >
  62. >I tried figuring out the secret formula from the disk geometry and
  63. >the default partitions in /etc/disktab, but didn't get very far.
  64. >The default partition sizes are /not/ an even multiple of the number
  65. >of sectors/cylinder.  I also can't find any reasonable function that
  66. >woud seem to determine the difference... so, what gives?  There
  67. >obviously has to be some formula based on the disk geometry, but
  68. >I can't find it documented anywhere and I've looked everywhere I
  69. >know to look...
  70.  
  71. Very few, if any, of the supported disks use the disk geometry to
  72. determine partition setup.  While the sizes are sometime chosen
  73. in ways that clearly don't consider how the file system uses the
  74. space (D, E and F of the RZ56), there is a preference to consider
  75. the partition size over other things.  The A partition is sized to
  76. hold a typical root file system.  The B partition is chosen to provide
  77. sufficient page/swap for typical memory configuration of the most
  78. common systems.  The G partition is usually sized to hold most of
  79. /usr.  Whatever is left over goes to H.
  80.  
  81. Also keep in mind that cylinder alignment will almost never sync
  82. up with the sizes that the file system uses.  Consider a typical
  83. file system with an 8 KB block size.  To waste the least amount
  84. of space you'd want the file system size to be a multiple of 8 KB.
  85. You'd also like the size to be such that you have 16 cylinders in each
  86. cylinder group.  Too little space in the last one and you may not
  87. enough space for the inodes.
  88.  
  89. If you manage to keep exactly 16 cylinders in each group, then the
  90. 8 KB multiple falls out.  But then you're likely to have some space
  91. at the end of the disk that may be enough to be interesting but too
  92. small to be useful.  You're also going to have many different partition
  93. sizes.
  94.  
  95. Consider three different disks; an RA90, ESE20 and RZ57 where you want
  96. a perfectly aligned root file system that is at least 16 KB.  The cylinder
  97. size and cylinder group size (at 16cyl/group) of the three disks is:
  98.  
  99.     RA90  - 897   - 14,352 sectors.
  100.     ESE20 - 512   -  8,192 sectors.
  101.     RZ57  - 1,065 - 17,040 sectors.
  102.  
  103. The ESE20 is going to be nice to us, since we can get exactly 16 KB
  104. using 4 cylinder groups.  The RZ57 will only need to two cylinder
  105. groups to get at least 16 KB and the RA90 will need 3 with plenty
  106. of space left over.
  107.  
  108. Keeping track of many disks each with a different set of partition
  109. sizes is not how I'd want to spend an interesting amount of my
  110. time as system manager.  Especially when there may be little value.
  111.  
  112. Personally I'd concentrate on getting the best use of the space
  113. and not worry about geometries.  If you have disk where it makes
  114. a significant performance difference, then it be worth the effort,
  115. but otherwise, not.
  116.  
  117. >
  118. >--
  119. >Jurgen Botz, jbotz@mtholyoke.edu
  120. >Northampton, MA, USA
  121. >
  122. --
  123. Alan Rollow                alan@nabeth.cxo.dec.com
  124.  
  125.