![Lead Image © Lucy Baldwin, 123RF.com Lead Image © Lucy Baldwin, 123RF.com](/var/ezflow_site/storage/images/archive/2014/19/aligning-filesystem-partitions/123rf_9719495_martialarts_lucybaldwin_resized.png/100113-1-eng-US/123RF_9719495_MartialArts_LucyBaldwin_resized.png_medium.png)
Lead Image © Lucy Baldwin, 123RF.com
Aligning filesystem partitions
Lining Them Up!
Filesystem partitions and page boundaries need to be aligned to native hardware properties to ensure maximum performance is achieved. Often enough, tools do the right thing but not always, and an informed administrator is the most effective line of defense against this pitfall.
Spinning Media
Hard disk platters are divided into thousands of concentric circular tracks . Tracks are in turn divided into sectors , which represent the minimum data size that can be written to a disk – this has historically been set at 512 bytes, but the newest spinning media drives sport 4KB sectors, a transition necessary to make error correction codes more efficient in storage terms. The term cylinder was used to refer to all tracks of the same diameter located on all platters of a drive. Finally, clusters refer to the minimum file allocation size a filesystem manages and effectively represent the smallest possible disk allocation for a file. (A smaller file would be padded with slack space to that minimum allocation.)
Things are complicated further by the fact that the abstractions used to represent disk structure are woefully obsolete: As spinning disk technology advanced, disks started to lie outright [1] about their geometry, in effect using disk attributes as an abstraction to interface with the operating system rather than a real description of disk structure, as I discussed in a previous article [2]. This has escalated even further with the introduction of SSD drives, which evidently do not physically possess things like platters or tracks at all, but use the same disk description to receive and service the system's requests.
Dishonest Drives
The transition from 512-byte to 4KB sectors found
...