Aligning filesystems to an SSD's erase block size
Feb 23, 2009, 14:03 (0 Talkback[s])
(Other stories by Theodore Ts'o)
"It turns out this is much more difficult than you might first
think -- most of Linux's storage stack is not set up well to worry
about alignment of partitions and logical volumes. This is
surprising, because it's useful for many things other than just
SSD's. This kind of alignment is important if you are using any
kind of hardware or software RAID, for example, especially RAID 5,
because if writes are done on stripe boundaries, it can avoid a
read-modify-write overhead. In addition, the hard drive industry is
planning on moving to 4096 byte sectors instead of the
way-too-small 512 byte sectors at some point in the future. Linux's
default partition geometry of 255 heads and 63 sectors/track means
that there are 16065 (512 byte) sectors per cylinder. The initial
round of 4k sector disks will emulate 512 byte disks, but if the
partitions are not 4k aligned, then the disk will end up doing a
read/modify/write on two internal 4k sectors for each singleton 4k
file system write, and that would be unfortunate."
Complete Story
Related Stories: