ZFS Disable ZFS ARC

I am trying to restore a server with only 4GB of RAM but when I try to run:
gunzip -c /media/full-system-backup.zfs.gz | zfs receive -vdF

It fails during this process as it runs out of swap space. When I run top all the memory is allocated to the ZFS ARC. I am booting off a STABLE 10.2 r290274 amd64 DVD while doing this so can I temporarily disable to ARC for the duration of my restore so that it can complete?

Thanks.
 
There's a couple of things you could try although I'm not sure which (if any) is likely to work best.

If you can get to the loader prompt when booting off the cd (don't think I've ever tried) you could try the following
Code:
set vfs.zfs.arc_max="512M"
boot

The closest you'll get to actually turning off arc is the following, although it may drastically affect performance (probably not too much of an issue just temporarily for the initial write but you want to make sure you turn it back on)
zfs set primarycache=none pool

You could also try temporarily using a file to give you some swap space
truncate -s 4G /someplace/swap
mdconfig -a -t vnode -f /someplace/swap
swapon /dev/mdX
 
Back
Top