-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2014-07-06 at 09:50 -0400, Greg Freemyer wrote:
On July 6, 2014 8:39:35 AM EDT, "Carlos E. R." <> wrote:
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.
vfat does - but it is not a native Linux filesystem. Ext2... 1 K. I thought it allowed 0.5 K.
Note that anything less than 4K blocks on a 4K sector drive is going to cause bad performance.
Of course. Unless you need a small size for a partition dedicated to nntp or maildir storage, with tons of very small files. I recall an specific filesystem creation option for nntp partition somewhere. Yast? mkfs? But based on what you explain below, about a small write causing a read-write double cycle, it can't be done.
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.
Yes, that is.
The goal is to have a filesystem write to the drive not require any reads from the drive.
Right.
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.
A lot.
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.
Yes, I always forget the correct nomenclature. O:-)
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.
Yep.
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.
I have seen some tools, this year, that do not. - -- Cheers, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlO5XZwACgkQtTMYHG2NR9VkdQCeK++71X1dmF0dS3u8aaf/uYYq +dYAnjwyXLkppJ33ftfhdvrb9467NvFm =q/iy -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org