FYI, I just committed TRIM support to ZFS, especially useful for SSD-only pools. This is something I implemented long time ago, but was now motivated to get back to it and commit it finally by some great fixes and improvements from the zfsonlinux project (made by Etienne Dechamps). Note that this functionality is turned off by default for now. To turn it on you need to add vfs.zfs.trim_disable=0 to /boot/loader.conf. You can see some statistics under kstat.zfs.misc.zio_trim sysctl. Big thanks to multiplay.co.uk for sponsoring this work! BTW. If you find this useful, so tell me about it during EuroBSDcon 2012 in a month that will be held this year in Warsaw, Poland: http://eurobsdcon.org :) On Sun, Sep 23, 2012 at 07:40:58PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Sun Sep 23 19:40:58 2012 > New Revision: 240868 > URL: http://svn.freebsd.org/changeset/base/240868 > > Log: > Add TRIM support. > > The code builds a map of regions that were freed. On every write the > code consults the map and eventually removes ranges that were freed > before, but are now overwritten. > > Freed blocks are not TRIMed immediately. There is a tunable that defines > how many txg we should wait with TRIMming freed blocks (64 by default). > > There is a low priority thread that TRIMs ranges when the time comes. > During TRIM we keep in-flight ranges on a list to detect colliding > writes - we have to delay writes that collide with in-flight TRIMs in > case something will be reordered and write will reached the disk before > the TRIM. We don't have to do the same for in-flight writes, as > colliding writes just remove ranges to TRIM. > > Sponsored by: multiplay.co.uk > > This work includes some important fixes and some improvements obtained > from the zfsonlinux project, including TRIMming entire vdevs on pool > create/add/attach and on pool import for spare and cache vdevs. > > Obtained from: zfsonlinux > Submitted by: Etienne Dechamps <etienne.dechamps_at_ovh.net> -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC