ZFS: How to enable cache and logs.

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Thu May 12 02:44:50 UTC 2011


On Wed, 11 May 2011, Jeremy Chadwick wrote:
>
> The "garbage collection" works when the SSD is idle.  I have no idea
> what "idle" actually means operationally, because again, vendors don't
> disclose what the idle intervals are.  5 minutes?  24 hours?  It
> matters, but they don't tell us.  (What confuses me about the "idle GC"
> method is how it determines what it can erase -- if the OS didn't tell
> it what it's using, how does it know it can erase the page?)

Garbage collection is not necessarily just when the drive is idle. 
Regardless, if one "overwrites" a page (or part of a page), the drive 
can implement that by reading any non-overlapped existing content 
(which it already has to do), allocating a fresh (already erased) 
page, and then writing the composite to that new page.  The 
"overwritten" page is then scheduled for erasure.  This sort of 
garbage collector works by over-provisioning the actual amount of 
flash in the drive, which should be done anyway in a quality product.

This simple recirculating/COW algorithm is a reason why TRIM is not 
really needed given sufficiently intelligent SSD design.

> Therefore, simply put, users should be concerned when using ZFS on
> FreeBSD with SSDs.  It doesn't matter to me if you're only using
> 64MBytes of a 40GB drive or if you're using the entire thing; no TRIM
> means degraded performance over time.

This seems unduely harsh.  Even with TRIM, SSDs will suffer in 
continually write-heavy (e.g. server) environments.  The reason is 
that the blocks still need to be erased and the erasure performance is 
limited.  It is not uncommon for servers to be run close to their 
limits most of the time.

One should not be ashamed with purchasing a larger SSD than the space 
consumption appears to warrant.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


More information about the freebsd-fs mailing list