Swap on ZFS

Anselm Strauss amsibamsi at gmail.com
Thu Oct 7 20:20:46 UTC 2010


On 10/02/10 17:52, Adam Vande More wrote:
> On Sat, Oct 2, 2010 at 4:30 AM, Anselm Strauss <amsibamsi at gmail.com> wrote:
> 
>> Hi
>>
>> I have a virtual server with only 512 MB of memory but still want to run
>> ZFS on it.
>> <snip>
>> Has there been any fix or workaround for this? I guess it does not help
>> when I use a swap file on ZFS instead of a separate zvol.
>>
> 
> Make sure you are following this:
> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot  Please note swap is not a
> ZVOL, it is a sepate partition.  You'd have the same problem with ZVOL.
> Also use i386, that will save you a bit of memory.  Follow the ZFS tuning
> guide.  Even if you follow all those things, I'm not sure you'll be able to
> get it stable.  512MB is really tight.
> 

I now have the swap on a separate disk and it seems more stable.
Although the server still has only 512 MB of RAM, runs on amd64 and I
did no tuning. It's not a file server but compiling ports and running
some services seems okay.

I have seen multiple posts on the net where people put swap on ZFS. What
sense does it make when every time the machine runs out of physical
memory it freezes before it can allocate some swap memory. Does it only
make sense in case you have additional non-ZFS swap?


More information about the freebsd-questions mailing list