Limits on jumbo mbuf cluster allocation

Rick Macklem rmacklem at uoguelph.ca
Wed Mar 13 22:27:57 UTC 2013


Garrett Wollman wrote:
> <<On Tue, 12 Mar 2013 23:48:00 -0400 (EDT), Rick Macklem
> <rmacklem at uoguelph.ca> said:
> 
> > Basically, this patch:
> > - allows setting of the tcp timeout via vfs.nfsd.tcpcachetimeo
> >   (I'd suggest you go down to a few minutes instead of 12hrs)
> > - allows TCP caching to be disabled by setting vfs.nfsd.cachetcp=0
> > - does the above 2 things you describe to try and avoid the
> > livelock,
> >   although not quite using an lru list
> > - increases the hash table size to 500 (still a compile time
> > setting)
> >   (feel free to make it even bigger)
> > - sets nfsrc_floodlevel to at least nfsrc_tcphighwater, so you can
> >   grow vfs.nfsd.tcphighwater as big as you dare
> 
> Thanks, this looks very good. One quibble with the last bit: I'd do
> that in a sysctl() handler rather than checking it every time through.
> If somebody uses a debugger rather than sysctl to change tcphighwater,
> they deserve what's coming to them. Also, I might suggest adding a
> counter for how many times we had to go through the "try harder"
> phase, so that the sysadmin has some indication that the defaults need
> adjustment.
> 
I agree w.r.t. both comments. I did the one line setting of nfsrc_floodlevel,
just because I was getting lazy while doing the patch.

And if/when a patch like this (I think if this works, it can easily be
added to ivoras@'s patch) goes into head, some way for a sysadmin to
monitor how well it's working would be good. A count of the "try harder"
attempts seems like a good candidate.

Good luck with testing of it, rick

> I will test this out later this week and see how it performs. I have
> a user who has been able to reproducibly clobber servers before, so if
> he has time and cycles available it should be pretty easy to tell
> whether it's working or not.
> 
> -GAWollman


More information about the freebsd-net mailing list