Feature changed by: Hans van den Heuvel (HvdHeuvel) Feature #306337, revision 16 Title: Partitioning with non-standard disk geometry openSUSE-11.2: Evaluation Priority Requester: Desirable Requested by: Herbert Graeber (hgraeber) Description: For SSDs it is important to respect their erase block size (usually 128KB). So instead of using the standard sectors per track of 63 and 255 heads Theodore Ts'o suggests to use 56 and 224 instead to get a cylinder size which is a multiple of 128KB. Similar tricks may be neccessary to achive optimal cylinder sizes for devices which are used for raid partitions. It would be useful, to have the ability to specify the values for sector per track and heads in the expert before any partition is defined. For special cases, like SSDs it would nice, if proper values will be suggested. Theodore Ts'os Blog: Aligning filesystems to an SSD’s erase block size (http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase...) Use Case: Lots of devices can benefit from the partitions aligning with the physical structure. These include: - SSD / flash / CF that have erase blocks other than 512-byte sector New generation hdd's with 4K physical sectors hardware raid 4/5/6 mdraid 4/5/6 dmraid possibly Discussion: #1: Andreas Jaeger (a_jaeger) (2009-08-11 16:07:13) This might be related to feature #306443. #2: Greg Freemyer (gregfreemyer) (2009-08-28 23:19:54) I looked at 306443 which was rejected. It may have been too narrow in scope. As to non-standard disk geometry, it may be too late for 11.2, but this will be a key feature in the near future. The various partitioning tools should have already been updated to support more optimized partition alignments. ie. Per http://www.gnu.org/software/parted/features.shtml parted provides "support for device's alignment requirements (e.g. physical sector sizes that are a multiple of the logical sector size)" Possibly parted in 11.2 already has this feature. == Some non-standard geometry background - The 2.6.31 kernel I believe will see the introduction of the block geometry calls specifically to allow user space and filesystems to align their structure better with the hardware. - The first thing to ensure is that partitions fall on native alignment points. - For 512 byte physical sector drives, the current default sector 63 is fine. Microsoft Vista and newer have already moved to a 1MB offset for the first partition to start at. Thus there is no reason for Linux to maintain the 63 sector offset as its default value. - I believe drives are already shipping that have 4K physical sectors and 512 byte logical sectors. For performance reasons, it is very importart to have the physical sector match the filesystem pages. - Unfortunately, 4K physical sector drives are going tocome in two flavors from the factory. One flavor aligned such that partitions starting on sector 63 will be perfectly aligned. The other aligned such that 1 MB will be perfectly aligned. The consumer will have to ensure they buy drives with the correct alignment for their OS. The linux community has added kernel support for partitioning tools to request the physical sector size and sector alignment. Userspace partitioning tools are being enhanced (or have been) to use these parameters when creating partitions and ensureing proper alignment. The block stack is being enhanced in 2.6.31 to set these parameters appropriately. Thus mdraid as an example will provide geometry information that parted, etc. should use to ensure proper alignment. The drivers for SSD, flash etc. should also be setting these parameters per their various geometries. #3: Jeff Mahoney (jeff_mahoney) (2009-08-29 00:27:47) The non-standard geometry isn't strictly necessary, but it makes tools that align on cylinder boundaries more friendly to use. The real need is for SSDs to be aligned for the hardware. 128kB worked well for me in my testing. Since 128kB alignment necessarily includes the 4k alignment, there's a natural win there. #4: Jeff Mahoney (jeff_mahoney) (2009-08-29 00:36:34) (reply to #3) Since one of those tools is YaST, that would be ... convenient. :) #5: Dean Hilkewich (deanjo13) (2009-08-29 15:33:40) (reply to #4) BTW, this doesn't only effect SSD's but can also be applied to thumb drives. I've aligned alot of my thumbdrives and the improvements are drastic. - http://global.phoronix-test-suite.com/?k=profile&u=deanjo-17706-23105-232 -- openSUSE Feature: https://features.opensuse.org/306337