m.roth at 5-cent.us
2015-Feb-27 23:06 UTC
[CentOS] OT: AF 4k sector drives with 512 emulation
Chris Murphy wrote: <snip>> The emulation implementations don't come into play if the alignment is > correct from the start. The better implementations have significantly > less pathological behavior if alignment is wrong, but that's > anecdotal, I don't have any empirical data available. But I'd say in > any case you want it properly aligned.You really, really want it properly aligned. We ran into that problem when we started getting 3TB drives a couple-three years ago. Proper alignment made a measured... trying to remember, but I think it was at *least* 20% difference in throughput. Alignment's easy: using parted (the user-hostile program), if you do go in with parted -a optimal /dev/drive, and do mkpart pri ext4 0.0GB 100% (for non-root drives, for example), it's aligned correctly. mark
On 2/27/2015 3:06 PM, m.roth at 5-cent.us wrote:> Alignment's easy: using parted (the user-hostile program), if you do go in > with parted -a optimal /dev/drive, and do > mkpart pri ext4 0.0GB 100% (for non-root drives, for example), it's > aligned correctly.i found -a optimal to do weird things, and almost always complain. I just use -a none now, and specify partition start in (512b) sectors, like.. # parted /dev/sdc align none mklabel gpt mkpart pri 512s -1s don't start at 0, as thats where the MBR or GPT has to go. 512 sectors is 256K bytes, which puts you on a erase block boundary with most SSD's as well as HD's. -1s is end of the disk. -- john r pierce 37N 122W somewhere on the middle of the left coast
The default for fdisk, parted, and gdisk is starting the first partition on LBA 2048, which is 8 sector aligned. You don't need any options. The alternative is to simply not partition the drives or the resulting RAID and just format it. Chris Murphy