mbuf leakage with nfs/zfs?

Gerrit Kühn gerrit at pmp.uni-hannover.de
Sat Feb 27 19:21:16 UTC 2010

On Sat, 27 Feb 2010 15:15:52 +0100 Willem Jan Withagen <wjw at digiware.nl>
wrote about Re: mbuf leakage with nfs/zfs?:

WJW> > 81492/2613/84105 mbufs in use (current/cache/total)
WJW> > 80467/2235/82702/128000 mbuf clusters in use
WJW> > (current/cache/total/max) 80458/822 mbuf+clusters out of packet
WJW> > secondary zone in use (current/cache)

WJW> Over the night I only had rsync and FreeBSD nfs traffic.
WJW> 45337/2828/48165 mbufs in use (current/cache/total)
WJW> 44708/1902/46610/262144 mbuf clusters in use (current/cache/total/max)
WJW> 44040/888 mbuf+clusters out of packet secondary zone in use
WJW> (current/cache)

After about 24h I now have

128320/2630/130950 mbufs in use (current/cache/total)
127294/1200/128494/512000 mbuf clusters in use (current/cache/total/max)
127294/834 mbuf+clusters out of packet secondary zone in use

WJW> I only have one Linux box runing Kubuntu 8.10, mounted UDP: 
WJW> (rw,udp,nolock,rsize=32768,wsize=32768,intr)

Hm, are you able to narrow this down? Does a single Linux client with tcp
mount cause the same trouble? Or a FreeBSD client with udp?
If it was only Linux clients with udp mounts or something like this, I
could understand why it took some time to pop up.

WJW> But running something like 'find openembedded | xarg cat > /dev/null'
WJW> Shows a steadily growing number of mbufs, and letting the system sit
WJW> for 5 min. doesn't decrease the used mbufs

I still have several udp and tcp mounts by Linux clients on my Server,
though most of them are probably stale now after the upgrade; and my
buffers keep draining...

WJW> Doing this on another FreeBSD 7.2 client runs the mbufs up(max inc
WJW> about 2000 mbuf), but within a few secs after the last file was
WJW> fetched, the mbuf tab runs down to around to what is was before the
WJW> command.

FreeBSD client with udp mount? Then it is either Linux client with udp or
all Linux clients triggering this leakage. I doubt that this is the case
with all Linux clients, this would have caused more trouble earlier.

WJW> Not shure where to go from here? I'm certainly not fluent enough in
WJW> NFS to start interpreting a wireshark trace.

Nor do I.
I already wrote Rick Macklem an Email on Friday, but so far only got back
an automated reply stating he is on "permanent vacation". I guess we need
him or one of the other nfs guys to get this fixed.
Could you try a single Linux client with tcp mount in the meantime? This
would tell us if Linux clients as such are causing the issue, or if it is
only Linux with udp mount.


P.S.: I cc'ed freebsd-fs because my PR went there.

More information about the freebsd-stable mailing list