Re: optimal io size / custom alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 16, 2015 at 01:20:37PM +0800, Tom Yan wrote:
> The thing is, why any io/transfer size/length should be considered
> when it comes to partition alignment? From what I understand,
> partition alignment is only to make sure partition starts at physical
> boundaries of the disk because of the mismatch between logicial sector
> (512 bytes) and physical sectors (4096 bytes) or pages/erase blocks of
> SSDs.

It's more complicated, the I/O limits are the most important for RAIDs
where optimal I/O size is usually stripe size and you want to use it
for partitions alignment for better performance (if you align to
sector size then read/write on RAID maybe performed on more disks on
unaligned partitions). And it's not only fdisk who cares, it's also
important for mkfs.<type> (for example XFS align according to I/O limits).

And because all this is mess and sometimes HW does not provide
relevant information and because people use dd(1) to copy partition
tables we have decided to use 1MiB granularity if possible. If 1MiB is
useless then we use optimal_io_size, if undefined then minimal_io_size 
and if undefined then sector_size.

http://people.redhat.com/msnitzer/docs/io-limits.txt


Unfortunately the current code does not check if optimal_io_size makes
sense, so thing like 33553920 for 4k device is blindly accepted ;-(

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux