On July 6, 2014 8:39:35 AM EDT, "Carlos E. R." <robin.listas@telefonica.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Saturday, 2014-07-05 at 23:25 -0400, Greg Freemyer wrote:
None of that matters.
What matters is the partition start sectors.
With 512 byte sectors on modern disks it doesn't matter at all where the partitions start.
With 4kb.sectors, it is important that the partitions start on 4kb boundaries.
I suppose that what really matters is that the filesystem allocation units match the hard disk "hardware" sectors, so that when the system wants to read or write a filesystem sector, it does not have to translate to accessing two hard disk real sectors.
Possibly, if the filesystem indexes 512 byte units, it does not matter?
I don't know of a Linux filesystem that supports 512 byte blocks, but I'm sure they exist. Note that anything less than 4K blocks on a 4K sector drive is going to cause bad performance. The reason has to do when a one block write is performed. If the block is a multiple of the sector size (1x, 2x, 3x, 4x, etc) then the drive can simply write the new data to the sectors. If the block is half the size of a sector, then a one block write by the filesystem becomes a read/modify/write cycle by the drive firmware. A 5200 rpm drive takes about 10 msecs to go around, so that adds 10 msecs to that one page write. It is a huge performance killer. The goal is to have a filesystem write to the drive not require any reads from the drive.
But if it uses, say, 1024 units, half may be on end of a 4K HD sector, and the other half on the start of the next 4K sector.
Yes, now think about a write to that split sector. Both sectors have to be read, modified, written. Again a 10 msec delay.
And this also means that it would be better if the filesystem is also using 4 KB sectors itself, right?
Filesystems call them pages or blocks, but yes. Or a multiple. Ie. 4K, 8K, 12K, etc. And the logical blocks need to align with the physical sectors so a filesystem write becomes exclusively a disk write. Fyi: most Linux filesystems use a 4K page by default Fyi2: Linux partitioning tools started defaulting to 1MiB partition alignment a few years ago. Windows mad that same transition with Vista or Win7. If your first partition starts at sector 2048 you have 1MiB alignment.
- -- Cheers, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org