mbuf leakage with nfs/zfs?

Daniel Braniss danny at cs.huji.ac.il
Sun Feb 28 12:11:48 UTC 2010


> On Sat, Feb 27, 2010 at 10:53:00PM +0100, Willem Jan Withagen wrote:
> > On 27-2-2010 21:32, Eirik Øverby wrote:
> > >I've had a discussion with some folks on this for a while. I can easil=y
> > >reproduce this situation by mounting a FreeBSD ZFS filesystem via
> > >NFS-UDP from an OpenBSD machine. Telling the OpenBSD machine to use TC=P
> > >instead of UDP makes the problem go away.
> > >
> > >Other FreeBSD systems mounting the same share, either using UDP or TCP=,
> > >does not cause the problem to show up.
> > >
> > >A patch was suggested by Rick Macklem, but that did not solve the issu=e:
> > >http://lists.freebsd.org/pipermail/freebsd-current/2009-December/01418=1.html> > 
> > I concur.
> > Everything in my network is now on TCP, and there is no mbuf leakage.
> > I just don't get over the 5500 mark, no matter what I throw at it.
> > 
> > I do feel that TCP is not as well performing on a local net with Linux,
> > hence the choice for UDP. But TCP is workable as next best.
> 
> I'm pulling in Robert Watson, who has some familiarity with the UDP
> stack/code in FreeBSD.  I'm not sure he'll be a sufficient source of
> knowledge for this specific issue since it appears (?) to be specific to
> NFS; Rick Macklem would be a better choice, but as reported, he's MIA.
> 
> Robert, are you aware of any changes or implementation issues which
> might cause excessive (read: leaking) mbuf use under UDP-based NFS?  Do
> you know of a way folks could determine the source of the leak, either
> via DDB or while the system is live?

I have been runing some tests in a controlled environment.

server and client are both 64bit Xeon/X5550 @  2.67GHz with 16Gb of memory
FreeBSD/SMP: 2 package(s) x 4 core(s) x 2 SMT threads

the client is runing latest 8.0 stable
the load is created by runing 'make -j32 buildworld' and sleeping 150 sec.
in between runs, this is the straight line you will see in the graphs.
Both the src and obj directories are NFS mounted from the server, regular UFS.

when server is running 7.2-stable no leakage is seen.
 see ftp://ftp.cs.huji.ac.il/users/danny/freebsd/mbufs/{tcp,udp}-7.2.ps
when server is runing 8.0-stable
 see ftp://ftp.cs.huji.ac.il/users/danny/freebsd/mbufs/{tcp,udp}-8.0.ps
you can see that udp is leaking!

cheers,
	danny
ps: I think the subject should be changed again, removing zfs ...




More information about the freebsd-fs mailing list