Date: Fri, 31 Dec 1999 01:00:49 +0100 (CET) From: Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de> To: freebsd-stable@FreeBSD.ORG Subject: Re: Panic: Out of mbuf clusters Message-ID: <199912310000.BAA28584@dorifer.heim3.tu-clausthal.de>
next in thread | raw e-mail | index | archive | help
Mr. K. wrote in list.freebsd-stable:
> OK, so I raised NMBCLUSTERS to 4096, and installed a second freebsd-stable
> box also with NMBCLUSTERS at 4096, and I managed to have them both panic
4096 isn't that much. On our web proxy I had to raise it to
10240 (and that box doesn't get that much traffic either).
I'd recommend that you use the ``netstat -m'' command to watch
your mbuf cluster usage. It will print something like this:
584/4288 mbufs in use:
365 mbufs allocated to data
219 mbufs allocated to packet headers
299/3626/10240 mbuf clusters in use (current/peak/max)
7788 Kbytes allocated to network (8% in use)
366 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
The important thing is the 4th line. It displays three values
x/y/z. ``x'' is the current number of mbuf clusters in use
(pretty low in the above example... well, it's night here, and
holidays). ``y'' is the peak value, i.e. the largest number
that has been in use at a time since reboot. ``z'' is the hard
limit value that you specify in your kernel config file using
the NMBCLUSTERS option.
If your ``y'' ever reaches (or comes even close to) the ``z''
value during times of high network load, you _must_ increase
your NMBCLUSTERS value. In the above example, the maximum use
since reboot (which was 69 days ago) is 3626 out of 10240 (i.e.
~ 36%), which is OK.
A sidenote: If you experience high mbuf usage without actually
servicing many requests, it _might_ be an indication of a
denial-of-service attack that someone is running against your
machine. Might be something worth investigating.
Finally, the fact that FreeBSD 3.x panics when it runs out of
mbuf clusters is a well-known problem. The solution is to not
let it run out of mbuf clusters by configuring a sufficient
number for them.
This should be in the Handbook or in the FAQ.
Regards
Oliver
--
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)
"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
(Terry Pratchett)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912310000.BAA28584>
