2

I read an article on aligning file-systems on partitions and this said that:

When manipulating MBR disks, be aware that the alignment of extended partitions is unimportant. These partitions hold one-sector data structures that define logical partitions, so in a real sense, extended partitions can't be properly aligned.

Could someone explain in more detail why alignment of extended partitions is unimportant?

3

Alignment is important on partitions containing data, in order to maximise the chance that block operations will match whatever the underlying block structure is (4K on modern hard drives, more than that on flash-based drives).

Extended partitions don't contain data, they're simply containers for logical partitions. The only operation which is done on extended partitions is reading the single 512-byte sector which defines the logical partitions, and writing it when modifying the logical partition structure (so hardly ever). Because that operation only involves a single sector, it can never match a larger block size, so any writes will be sub-optimal and there's no way of improving that. The alignment of the extended partition itself doesn't affect the possible alignment of the logical partitions it contains, so there's no need to align it there either.

|improve this answer|||||
  • Thanks! So extended partition contains only the extended boot record which points to logical partition and it is the logical partition which holds the actual filesystem and user data? And logical partition should be aligned based on the same principles which apply to primary partitions in order to avoid performance hit? For example if I have two logical partitions and first one starts from sector 33558528 and second one starts from sector 37754880, then those two logical partitions are properly aligned? – Martin Jan 30 '16 at 13:09
  • 1
    That's right. Your two partitions are aligned on megabyte boundaries: multiply the sector number by 512, the result is divisible by 1024×1024 (more directly, the sector number is divisible by 2048). – Stephen Kitt Jan 30 '16 at 14:38
0

Modern disks have tracks of varying length (near the border tracks are longer). They also cache data extensively (they have quite capable CPUS and memory, some hacker even installed a Linux system on one). They also remap bad blocks (inevitable given the data density) transparently to spare blocks.

As a result, data alignment issues that used to be critical in days of yore are mostly irrelevant today. And the data useful to really tune for performance just isn't available to anybody.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.