Date: Wed, 4 Dec 2013 20:31:31 -0600 From: Adam Vande More <amvandemore@gmail.com> To: Ivailo.TANUSHEFF@raiffeisen.bg Cc: freebsd-fs <freebsd-fs@freebsd.org>, owner-freebsd-fs@freebsd.org, Beeblebrox <zaphod@berentweb.com> Subject: Re: Questions re swap-on-zfs Message-ID: <CA%2BtpaK1n6Rqma3tPUJn-6fbmnDL5yo_rMJA=VW7JqvZfCD701w@mail.gmail.com> In-Reply-To: <OFF141F01E.834A981C-ONC2257C36.002B2567-C2257C36.002BD48B@LocalDomain> References: <1380880223590-5848720.post@n5.nabble.com> <524EEE40.5060208@gmail.com> <CACpH0McMfQ3r-n-ijL6Aoum=QoMY_FczBzu3vt%2BcYwCJkCNOzw@mail.gmail.com> <1381005634317-5849247.post@n5.nabble.com> <CA%2BtpaK0Nkw8fN-TmYqAwudHTi2RpmidNmK0UTae040AQ%2BX7NLA@mail.gmail.com> <1386054141012-5865623.post@n5.nabble.com> <OFF141F01E.834A981C-ONC2257C36.002B2567-C2257C36.002BD48B@LocalDomain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 3, 2013 at 1:58 AM, <Ivailo.TANUSHEFF@raiffeisen.bg> wrote: > Hello there :) > > I had similar issues with a test box (FreeBSD 9.1) I used few months ago > with not so much free RAM - the box had 1-3GB total RAM as far as I > remember. > After digging I have found that the problem was actually a swap deadlock > :) > What I mean: when you heavily utilize the system, for example building > ports or something, the system tries to swap some memory, used by the ZFS. > The problem is, that the swap is actually on the ZFS itself and uses the > same memory. > I am not sure I describe this precisely, but the overall result is that > the system uses more and more swap space just to be able to swap something > relatively small. It ends up crashing the system several times Well yes. When you put swap on ZFS under duress they are in contention for the same memory reserves. Since ZFS consumes memory thinking the kernel should be holding back whatever is needed for swap and swap thinks it's the last defense and guarded, you will run into problems using swap-on-ZFS. To put it in terms of a famous quote: I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. Such an issue can be programmed around, but you're still left with an abundance of memory contention issues. I suppose this is why Oracle and other ZFS devs have left this as 'unsupported'. A filesystem backed swap device is rarely a good idea. -- Adam
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BtpaK1n6Rqma3tPUJn-6fbmnDL5yo_rMJA=VW7JqvZfCD701w>