Date: Sun, 23 Sep 2012 21:53:58 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-current@FreeBSD.org Cc: freebsd-fs@FreeBSD.org, Steven Hartland <killing@multiplay.co.uk> Subject: ZFS TRIM support committed to HEAD. Message-ID: <20120923195357.GO1454@garage.freebsd.pl>
next in thread | raw e-mail | index | archive | help
--/DkgDsqJFFamjKX0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D0 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 >=20 > Log: > Add TRIM support. > =20 > 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. > =20 > 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). > =20 > 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. > =20 > Sponsored by: multiplay.co.uk > =20 > 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. > =20 > Obtained from: zfsonlinux > Submitted by: Etienne Dechamps <etienne.dechamps@ovh.net> --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --/DkgDsqJFFamjKX0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBfaNUACgkQForvXbEpPzQ4GwCfeesqQ5wYR5lL1UjQ195iiggV DAYAoMlf2im9PN669pzrCLUysbdg5uey =8JhV -----END PGP SIGNATURE----- --/DkgDsqJFFamjKX0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120923195357.GO1454>