Swap on ZFS

Daniel Staal DStaal at usa.net
Fri May 16 16:35:39 UTC 2014

--As of May 12, 2014 7:01:17 AM -0500, David Noel is alleged to have said:

> However, I don't see any way around the rumored issue of the system
> hanging every time all my RAM is in use and I need to hit swap. Is
> this still the default behavior? The wiki says yes. I suppose I could
> test it myself fairly easily. But what would the solution be? If I
> test it and it hangs I'd like to be able to suggest a solution in the
> PR. Would adding a tunable that allowed me to reserve x MB for ZFS be
> the solution? Out of curiousity, what would that value need to be set
> to? How much memory does ZFS need available to write to disk?

--As for the rest, it is mine.

Having hit it a couple of times, I'd say it's a bit more complicated than 
that description, but yeah, that's still the behavior from my experience. 
Failure can be more complicated than 'hang' though, and triggering it can 
be a bit hit-or-miss.

A tunable like that sounds like a good solution.  I'm not sure what the 
value would need to be set at though.  I'm not even sure if it's a constant 
or dependent on blocksize and other factors.  I'm pretty sure the memory 
needed per block is a defined amount someplace, but ZFS likes to group IO 
where possible, so a 'safe' amount might vary by the amount of writes it 
can have queued at any particular moment.  (Which is a tunable.)

Daniel T. Staal

This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.

More information about the freebsd-questions mailing list