Swap on ZFS

Rolf Nielsen rmg1970swe at gmail.com
Wed May 7 00:25:54 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2014-05-06 21:21, David Noel wrote:
> Is swap on ZFS still ill-advised? All the forum, list, and blog
> posts I find say it's a no-go. Is this still the case? The idea
> behind it not working is that ZFS needs memory to write to disk, so
> when you need to swap (are low on memory) ZFS won't be able to
> write.
> 
> I found some talk of having a tunable added as a workaround that
> would reserve a certain amount of memory for ZFS so this wouldn't
> be a problem, but have no idea if anyone's made any progress
> towards implementing it.

Just out of curiosity, why do you want it?

To get swap on ZFS, you first need to create a ZFS filesystem on one
or more devices, then you create a dedicated volume inside that
filesystem and use that dedicated volume as swap. To me that seems to
add unnecessary complexity, similar to using a file backed md device
as swap. Please don't take this as criticism; you may very well have
good reasons for wanting to do this. I'm just curious about those reasons.

Rolf Nielsen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJTaX2LAAoJEB1OKfQ0M8Tg+zEQAMvhXbgl8/LE2s9ltfvfbnGe
bMnBmYxMekQiZ14+n2467nP6z0OCr5AM/W53GxQ9ma2M9AkuU6WKr+srv1pe2eck
cLnMA3EekiYLuDle5I2+Kc2NjZ/lVAVl379vYmzRGFbU2Uke2aZtgyQ9kUB+vrfl
TeJ8QwmIDcCPELIDZJzI+WqLJZqDY2HfcWs5WtJkqqGf+27tYmS4aAFYWZQv7hFE
K5Ps798LFQHshhAxqoWmOLbeeDhCSAsaOIMyIknPJ1I9xyXh2BDP16yRj37mw8Yk
7ca84uqQ5e0HJ6lhEU/RXc4kKuNKUDYZNB7d4jKNOBpDbx5irCJVAnAcdu/YD9G0
P7GpDd8RJR1EUmH32zTSmZnieoTtQNBcbxQo+pFVEi52yX6Q9GVwPkJfh4gjdiE/
1JtWFhCSxGeBjjZlaTAntyA+YjRgiXM1cK3DbBeigc4LQtm4Ztoz2DsgxR70pE0x
Fthliso+NSUZiz1rE9ep8Wc+4bIYzqfX+KI0PBz83V2ytpYEs1iNNm3au9sGyqib
f6t2z1I0o8XO75CGlQjA1lEulKeY4cnpr948QCZMdKLzUd+DiyuF+qzZvOlGlQ3A
QNz4/pSNXlZ48bK7R7C3u9xbRxqluJ58BUf3B6hu4wkgc6DqAWOxoWBGLck/dqfa
XiUZqUred6DdnTzAXxXM
=8BGL
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list