On 8/7/16 8:07 PM, Garrett D'Amore wrote:
> historically some ssds have performed worse with trim as they do
> some expensive operations.  i have not looked at the webrev yet
> but are there tunables or an administrative interface to this?

By default, everything is off, so there are no performance
implementations "out of the box". The administrative interfaces are, either:

* enabling automatic trimming after deleting data:
        # zpool set autotrim=on <poolname>

* manually initiating a single full-pool trim (running through
  all the free space on a pool and trimming it):
        # zpool trim <poolname>

Automatic trim is as the name implies: fully automatic. You just delete
data and ZFS will at some later point, if the blocks have not been
reused, simply trim those blocks out.

Manual trim behaves much like a scrub. It has an adjustable rate (in
bytes/sec) and can be monitored through "zpool status" or stopped at any
time via "zpool trim -s <poolname>".

> how diverse in terms of ssds has this been tested with?

We've tested primarily with Sandisk SAS SSDs, mainly the Optimus line
and on some pretty high-end kit (Sandisk's INFINIFLASH).

> are there performance implications observed?

Yes, this is detailed in the manpage. In general, Optimus 1 takes poorly
to automatic trim and can suffer a write throughput limitation when lots
of deletes are going on. On Optimus 2 and the IF100 the performance
impact was much smaller (measurable, but really not much).

In general, the manpage suggests a "test and see what works" approach.
Try autotrim=on and see if it affects performance on your system. If it
doesn't, leave autotrim on. If it does, disable autotrim and use manual
trim during a maintenance window to still get most of the used block
recovery benefits.

Cheers,
-- 
Saso


-------------------------------------------
openzfs-developer
Archives: https://www.listbox.com/member/archive/274414/=now
RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c
Powered by Listbox: http://www.listbox.com

Reply via email to