zfs arc eating up all memory

Peter Maloney peter.maloney at brockmann-consult.de
Mon Jan 23 20:46:41 UTC 2012


Am 21.01.2012 02:31, schrieb Claudius Herder:
> Hi all,
>
> I kind of accidently did 'du -sh' on my homedir and forgot that I had
> set snapdir=visible.
> After some minutes wired memory grew from 2g to 7.5g, active memory
> dropped from 700m to 20m and heavy swapping occured.
>
> I was not able to reproduce this behavior in my test vm (i386 vbox) and
> testing on the server is difficult because I have only ssh access, and
> if I do not kill 'du' in time, I can only hard reset the system.
>
> If I set snapdir=hidden there is no problem, even if i run 'du -sh /'
>
> Reducing vfs.zfs.arc_max to 2048m did not solve the issue.
>
> Any ideas/hints to solve or workaround this problem?
Dunno, but I make it a policy to always hide it. You can still type in
the .zfs directory and it uses it even if hidden.

Try it.

zfs set snapdir=hidden mypool/home/claudius
cd ~claudius/.zfs/snapshot
ls

The reason I decided to do that, is because I found that when an NFS
client does an ls inside the .zfs/snapshot directory, it hangs the server ;)

But the client can still do the same, just manually typing the
directory... so I also mounted /var/empty on top of it to hide it on the
client. (and my users use the client system through samba, not the zfs
system with NFS)
>
> --
> Claudius
>



More information about the freebsd-fs mailing list