Red Hat Bugzilla – Bug 217088
Poor performance of unaligned partitions, lots on reads on write
Last modified: 2007-11-30 17:11:49 EST
Description of problem:
Slow performance on partitions not starting at sector 1, such as is normally the
case for the first partition. For some reason all blocks seem to be read before
they are overwritten.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a partition not starting on cylinder boundary. This is the default for
hte first partition on an harddrive (part of the first cylinder is used by the MBR)
2. dd if=/dev/zero of=/dev/sda1
Takes much longer than expected, and vmstat shows a lot of read activity. dd
reports a write performance of about 7 MB/s.
should complete fairly quickly, and no read activity in vmstate.
The exact same setup, but with partition starting exacly on cylinder boundaries
gives the expected result.
It does not matter where on the harddrive the partition is. Only that it does
not start on cylinder boundary.
Found what it is. For some reason the block size for those devices gets set to
1KB instead of the expected 512bytes. As result a dd with default block size to
the device is real slow as every second write (first half of the 1KB blocks)
needs to read in the block to be modified..