On Wed, Aug 14, 2013 at 02:31:23AM +0300, Mikael wrote:
> 2013/7/8 Claudio Jeker <[email protected]>
> >
> > This is not netstat -m output. All the important information got stripped.
> 
> ..
> 
> >  This is as useless as the mangled netstat output.
> >
> ..
> 
> > 508 connections, question is what kind of connections?
> >
> 
> If it happens again I'll get this info then.
> 
> 
> > >    - vmstat -m shows:
> > >    5842/5938/6144 mbuf 2048 byte clusters in use (current/peak/max)
> > >    In use 126920K, total allocated: 158580K,; utlilization 80%
> > >    and all is 0 in the fail column.
> >
> > You are running very close to the limit of mclusters. Where did all those
> > cluster go? Maybe in the 508 connections reported by netstat.
> > netstat show the buffer space used by the various sockets, maybe check
> > those. Once you figured out where the memory is gone to and why, you
> > should be able to figure out if it is save to increase nmbcluster because
> > your server needs them or if the problem is a leak of some sort.
> >
> 
> What would be OpenBSD's ordinary transient and lasting behavior if
> mclusters run out? (I guess mclusters are supergroups of mbufs?)

If there are no more clusters the system will break in strange ways.
Like accepting no new connections or having issues to send more packets.
If there is no cluster some parts of the network stack will replace them
with a mbuf chain of about 8 mbufs, other parts will just fail and drop
data.

The 6144 clusters we allow by default is for a basic system any kind of
halfway busy server with many connections needs to increase that limit.
 
> So, my nmbcluster is set to 200MB so just in case there was a peak mcluster
> use of 200MB, there would be allocation failures?

5842 * 2048 = 11684k or 11MB the other 100MB are most probably used all up
by mbufs which is very bad. Didn't the system tell you to increase about
the limit?
Something like "WARNING: mclpools limit reached; increase kern.maxclusters"
 
> Do you have any thought on where the mclusters may have went?

TCP send/recv buffers is one possible place. netstat -an reports the
amount of memory used up by each socketbuffer.

-- 
:wq Claudio

Reply via email to