ZFS: How to enable cache and logs.

Jason Hellenthal jhell at DataIX.net
Wed May 11 22:38:57 UTC 2011


Jeremy,

On Wed, May 11, 2011 at 05:08:30AM -0700, Jeremy Chadwick wrote:
> 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.
> 

Lets not forget here: The size of the separate log device may be quite 
small. A rule of thumb is that you should size the separate log to be able 
to handle 10 seconds of your expected synchronous write workload. It would 
be rare to need more than 100 MB in a separate log device, but the 
separate log must be at least 64 MB.

http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide


So in other words how much is TRIM really even effective give the above ?

Even with a high database write load on the disks at full compacity of the 
incoming link I would find it hard to believe that anyone could get the 
ZIL to even come close to 512MB.


Given most SSD's come at a size greater than 32GB I hope this comes as a 
early reminder that the ZIL you are buying that disk for is only going to 
be using a small percent of that disk and I hope you justify cost over its 
actual use. If you do happen to justify creating a ZIL for your pool then 
I hope that you partition it wisely to make use of the rest of the space 
that is untouched.

For all other cases I would reccomend if you still want to have a ZIL that 
you take some sort of PCI->SD CARD or USB stick into account with 
mirroring. 

-- 

 Regards, (jhell)
 Jason Hellenthal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 522 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110511/f5b0acf1/attachment.pgp


More information about the freebsd-fs mailing list