Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Trying to understand mbuf-related sysctl parameters



Greg Troxel <gdt%ir.bbn.com@localhost> writes:

>> kern.mbuf.nmbclusters=262144
>
> nmbclusters is the maximum number of clusters the system will allocate.
> You have a very big number (seems like 0.5G of clusers), in my
> experience (but with that much RAM, why not).

Yup.  Probably much larger than it needs to be, but "maxusers 256" in
the config file led to a few clusters shy of 256K of them, so I just
rounded that off in my sysctl.conf.  :)  I've never seen more than about
fifteen hundred of them in active use, from what 'vmstat -m' tells me.

>> kern.somaxkva=134217728
>
> I don't know; I'd go reading sources to figure it out.  That looks like
> 128G, which I can't immediately map to anything that makes sense.

The number is 128M, which I suspect is the number of bytes the kernel
will allow to be allocated at any one time for the total of all socket
buffers in the system - basically, the maximum size of the memory
allocation arena for them.  The source is really hard to read with no
prior knowledge of how this stuff actually works, but it seems to be
bytes, not pages.  I'm going to try increasing it further, I think.  I
reckon if I go too far, the system will let me know, somehow.  ;)

Even after the changes I've already listed, I run out of buffer space,
it seems.  From time to time, the machine will hang, hard, not even
responding to ping, for something like three or four minutes, before
continuing as if nothing had happened.  This seems to be triggered by
network activity.

It happened tonight, actually, while I was here, so I hit the NMI button
on the front of the Dell 2850 while it was hanging there, to get into
the debugger.  The backtrace shows (quickly jotted down):

x86_pause
uvm_pagealloc_strat
uvmfault_promote
uvm_fault_internal
trap 6

So, if this is where it spends its time throughout those minutes, I
guess it's sitting there waiting on a spinlock that doesn't release...?
But then, why would it suddenly do so after minutes of hanging?

-tih
-- 
It doesn't matter how beautiful your theory is, it doesn't matter how smart
you are. If it doesn't agree with experiment, it's wrong.  -Richard Feynman


Home | Main Index | Thread Index | Old Index