Question about ZFS with log and cache on SSD with GPT
peter.maloney at brockmann-consult.de
Sun Jan 22 08:11:17 UTC 2012
Am 21.01.2012 23:06, schrieb Alexander Leidinger:
>> Corsair reports:
>> > Max Random 4k Write (using IOMeter 08): 50k IOPS (4k aligned)
>> > So I guess that suggests 4k aligned is required.
> Sounds like it is.
I'm not an SSD expert, but I read as much as I can, and found that many
say that the sector size is not the only thing that matters on an SSD,
but also the *erase boundary*. The size of the erase boundary varies,
but 2MiB is a common factor (or 1MiB for 99% of them), so you can use
that for all.
The theory I read about is that when the SSD wants to write something,
it must erase the whole erase block first. If it needs to erase a whole
erase boundary space to write 512 bytes, that is just normal. But if you
are misaligned, it often needs to erase 2 erase boundary spaces.
Here is an example from our FreeBSD forum:
> I create the first partition at the usual 63 sectors offset from the
> start of the disk (track 1) which is /unaligned/ with the SSD erase
> block. The second partition is set to start at sector 21030912
> (10767826944 bytes) which is /aligned/ with the SSD erase block.
> SSD erase block boundaries vary from manufacturer to manufacturer, but
> a safe number to assume should be 1 MiB (1048576 bytes).
In my testing, it made no difference. But as daniel mentioned:
> With ZFS, the 'alignment' is on per-vdev -- therefore you will need to recreate the mirror vdevs again using gnop to make them 4k aligned.
But I just resilvered to add my aligned disks and remove the old. If
that applies to erase boundaries, then it might have hurt my test.
More information about the freebsd-fs