[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ahcisata poor performance
On Sat, Jul 26, 2014 at 01:05:05PM +0400, Dima Veselov wrote:
> Sorry, I have lost your last message, but wish to know something about
> 4k-alignment. What should be aligned to what?
> I assume sector is 512-byte and gpt show it in sectors. So I have
> gpt disk part 5801288527 sectors, it doesn't align to anything.
> raidctl says it in sectors too and size is 5801288448, so it is aligned
> to 4k, and is aligned to sectPerSU, which is 128 blocks.
> dk10 is 5801288381, which is aligned to nothing too, filesystem resides
> on this wedge seem to be unaligned. It is the only thing I have to do is
> to shrink filesystem to align to 4k blocks? Or better align it to 128*512 to
> match raid somehow? Or I have to rebuild wedges to align to something?
> Or maybe I am completely wrong and all the things should be aligned not
> only by its size but also by its start?
size doesn't matter much I guess, start is important.
Disks largers than 2TB use 4K sectors internally, so even through they
present themselves as disks with 512bytes sectors, any xfer wich is not
aligned to 4K and a multiple of 4K in size will be handled as a
read-modify-write transaction internally (which is much slower).
So every parititon should be aligned to 4K on the physical media
(and so you need to make sure everything is properly aligned in
a gpt on raid on gpt setup), and it's better to use filesystems with
fragment size >= 4K too.
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |