Date: Wed, 11 May 2011 05:08:30 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: Daniel Kalchev <daniel@digsys.bg> Cc: freebsd-fs@freebsd.org Subject: Re: ZFS: How to enable cache and logs. Message-ID: <20110511120830.GA37515@icarus.home.lan> In-Reply-To: <4DCA7056.20200@digsys.bg> References: <4DCA5620.1030203@dannysplace.net> <20110511100655.GA35129@icarus.home.lan> <4DCA66CF.7070608@digsys.bg> <20110511105117.GA36571@icarus.home.lan> <4DCA7056.20200@digsys.bg>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 11, 2011 at 02:17:42PM +0300, Daniel Kalchev wrote: > On 11.05.11 13:51, Jeremy Chadwick wrote: > >Furthermore, TRIM support doesn't exist with ZFS on FreeBSD, so folks > >should also keep that in mind when putting an SSD into use in this > >fashion. > > By the way, what would be the use of TRIM for SLOG and L2ARC devices? > I see absolutely no benefit from TRIM for the L2ARC, because it is > written slowly (on purpose). Any current, or 1-2 generations back SSD > would handle that write load without TRIM and without any performance > degradation. > > Perhaps TRIM helps with the SLOG. But then, it is wise to use SLC > SSD for the SLOG, for many reasons. The write regions on the SLC > NAND should be smaller (my wild guess, current practice may differ) > and the need for rewriting will be small. If you don't need to > rewrite already written data, TRIM does not help. Also, as far as I > understand, most "serious" SSDs (typical for SLC I guess) would have > twice or more the advertised size and always write to fresh cells, > scheduling an background erase of the 'overwritten' cell. AFAIK, drive manufacturers do not disclose just how much reallocation space they keep available on an SSD. I'd rather not speculate as to how much, as I'm certain it varies per vendor. I can talk a bit about SSD drive performance from a consumer level (that is to say: low-end consumer Intel SSDs such as the X25-V, X25-M, and latest 320 and 510 series -- I use them all over the place), both before and after TRIM operations. I don't use any of these SSDs on ZFS however, only UFS (and I have seen the results both before and after TRIM support was added to UFS; and yeah, all the drives are running the latest firmware). What's confusing to me is why someone would say TRIM doesn't really matter in the case of an intent log device or a cache device; these devices both implement some degree of write operations, correct? The drive has to erase the NAND flash block (well, page really) before the block can be re-used (written to once again), so by not doing TRIM effectively you're relying 100% on drives' garbage collection mechanisms, which isn't that great (at least WRT the above drives). There are some sites that go over Intel SSD performance out-of-the-box as well as once its been used for a bit, and the performance difference is pretty substantial (50% drop in performance for reads, ~60-70% drop in performance for writes). Something to keep in mind. Furthermore, most people aren't buying SLC given the cost. Right now the absolute #1 or #2 focus of any operation is to save money; one cannot argue with the current economic condition. I think this is also why many SSD companies are focusing primarily on MLC right now; they know the majority of their client base isn't going to spend the money for SLC. > Does Solaris have TRIM for ZFS? Where? How does it help? I can > imagine TRIM for the data pool, that would be good fit for ZFS, but > SSD-only pool.. are we already there? The following blog post, and mailing list thread, provides answers to all of the above questions, including why TRIM is useful on ZFS (see the comments section; not referring to slog or cache however). But it doesn't look like it's actually made use of in ZFS as of January 2011. There is a long discussion about ZFS, TRIM, and slog/cache in the 2nd thread. There's also a reply from pjd@ in there WRT FreeBSD. http://www.c0t0d0s0.org/archives/6792-SATA-TRIM-support-in-Opensolaris.html http://comments.gmane.org/gmane.os.solaris.opensolaris.zfs/44855 There's a recommendation to permit TRIM in ZFS, but limit the number of txgs based on a sysctl, since TRIM is a slow/expensive operation. SSDs are neat, but man, NAND-based flash sure makes me a sad panda. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110511120830.GA37515>