[OmniOS-discuss] ZFS trim support
Jim Klimov
jimklimov at cos.ru
Sun Mar 2 11:40:10 UTC 2014
On 2014-03-01 14:46, Michael Rasmussen wrote:
> Hi all,
>
> Anybody knows the current status for trim support in Illumos?
>
> It seems two solutions (FreeBSD and tracking the metaslab allocator) are
> suggested but no final date:
> http://open-zfs.org/wiki/Features#TRIM_Support
>
> In lack of trim how do you then handle SSD's?
>
> I have just ordered some Corsair for use as log and cache so this will
> soon be a headache of mine as well;-)
I believe one common approach is under-allocating the drives.
For example, I did this on my rig, with little if any "scientific"
approach like testing the results, other that seeing how much it
would take to wear down my drives... which is kinda irreversible :)
As a rule of thumb I took that the same hardware device is branded
and sold as two models (only one available in our shops) - higher
volume (120Gb in lowest size) or higher speed/endurance (100Gb -
and MUCH higher specs in endurance). So I took the 120Gb one and
partitioned using 100Gb and retaining 20Gb free.
According to the datasheet for this model, the difference in
endurance is 10-fold (total drive rewrites) for the small model
and 5-fold for larger ones, for the cost of a 20% difference
in size... Peak 4K random writes are also about 3x faster on
smaller brothers. I think it is worth not-using that little extra:
http://www.seagate.com/files/www-content/product-content/pulsar-fam/pulsar/enterprise-sata-ssd/en-us/docs/enterprise-sata-ssd-ds1775-1-1301us.pdf
The idea with under-allocation, the way I get it, is that those
20Gb are "required" to contain zeroes. So when the other 100Gb
have used and freed some flash blocks, there is pressure on the
device to free some of them up so as to accommodate the 20Gb of
zeroes before it completely runs out of all 120Gb worth of
user-addressable blocks. In effect this causes early trimming
(if this works at all, which I am unsure how can be measured)
at the devices discretion (it chooses when it can do the trick
so as to stay within the bounds of "guaranteed" storage space).
Unfortunately, I have no idea whether partitioning the 120Gb
drive to use only 100Gb magically turns it into the 100Gb model
for the endurance or performance (i.e. there might well be some
differences in firmware as well, such as other allocation
goals and optimizations, etc.)
HTH,
//Jim Klimov
More information about the OmniOS-discuss
mailing list