Date: Tue, 7 Jul 2009 00:21:54 -0700 (PDT) From: =?utf-8?B?xaBpbXVuIE1pa2VjaW4=?= <numisemis@yahoo.com> To: Dan Naumov <dan.naumov@gmail.com> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Re: ZFS: swap on a ZVOL Message-ID: <354003.91539.qm@web37307.mail.mud.yahoo.com>
next in thread | raw e-mail | index | archive | help
Dan Naumov wrote:=0AAs far as I know, using swap on top of a "non-trivial" = filesystem like=0AZFS is considered "unsupported", but it does in fact work= . You can=0Acreate a ZVOL of arbitrary size (say, 4G) and then do the follo= wing:=0Azfs set org.freebsd:swap=3Don pool/swapvolname=0Ato have /etc/rc.d/= zfs enable swap on said ZVOL on every boot. You can=0Aalso do this in an ug= ly way: put swapon=0A/dev/zvol/<poolname>/<swapvolname> into your /etc/rc.l= ocal (without=0Ahaving to pass the "org.freebsd:swap=3Don" option to the ZV= OL).=0A=0ANow the question remains, what kind of issues are expected to ari= se=0Awhen using swap on a ZVOL and is there any work going to in order to= =0Aresolve them? One of the issues mentioned is that ZVOL swap cannot=0Ahan= dle kernel dumps and another, more serious potential issue is a=0Arace cond= ition where "more swap is needed to swap". Assuming I have a=0Amachine with= 2gb ram, if I use a 4gb ZVOL swap, am I likely to run=0Ainto any serious i= ssues assuming that under normal operation, the=0Asystem uses from none to = very little swap?=0A=0AAFAIK, it was said that race condition you mentioned= also exists in OpenSolaris (that was back in the ZFS v6 days).=0ABut, AFAI= K new versions of OpenSolaris do use swap on ZFS volume as by default (corr= ect me if I'm wrong).=0ASomebody more knowledgeable should answer this, but= this made me thinking that maybe, just maybe that race condition was solve= d in some ZFS version >v6.=0A=0A=0A=0A=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?354003.91539.qm>