Memory leak in ZFS?
gpm at hotplug.ru
Tue Feb 8 20:51:46 UTC 2011
>> I can't speak about the memory utilisation aspect, but I tend to disable
>> sendfile everywhere possible when ZFS is in use on a system. The reason
>> is based on something I and another user experienced back in October
>> 2010 pertaining to sendfile() on ZFS locking up processes (making them
>> unkillable). See here for details; this problem has since been
>> fixed (look for commits around October). You'll also find some
>> commits that went through in November pertaining to ZFS and sendfile.
>> This is why I said the date of your kernel/sources matters. :-)
> I tried rebuild since original thread, hoping that problem is fixed
> already, so now it's very fresh: 8.2-PRERELEASE #18: Sun Feb 6 03:04:47
> CET 2011.
> Problem is still here:
> Mem: 37M Active, 78M Inact, 1154M Wired, 64M Cache, 199M Buf, 40M Free
> About 1373MB instead of 2GB, and it's not even 2 days of uptime.
>> The issue I referenced in  is not related to memory utilisation, but
>> does indicate use of sendfile with ZFS may be a bad idea (by this I
>> mean, there may be aspects of its implementation when mixed with ZFS
>> that have been overlooked).
Yes, I remember those commits. It helped a lot for the sendfile problem
that days. So my system was built based on stable as of december fist
And everything worked fine more or less for my home server. But after
updating a couple of days ago this memory hole issue arised, thats why I
mentioned that maybe some of the latest january commits broke something?
>> Simple test: if you disable use of sendfile (but not AIO) in Samba, does
>> the problem go away?
> I've just disabled sendfile in smb.conf and I'll report in about 2 days,
> after reboot which I will perform tonight.
> I hope it won't hit samba performance too much ;)
Yes, for me setting "use sendfile" to "false" in smb.conf fixes
everything. I can download tons of data via smb without any memory leaks.
More information about the freebsd-fs