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

Re: preventing mbuf shortage


Philipp Buehler <OpenBSD@fips.de> said :

> On 08/07/2002, ark@eltex.ru <ark@eltex.ru> wrote To tech@openbsd.org:
> > The idea is simple: the most common reason of mbuf shortage are TIME_WAIT
> > connections - so why not to purge them on, say, random basis instead of
> > just diagnosing that there are no free mbufs?
> erm, this is not true. TIME_WAIT moves to closed (and deletes TCB/mbuf)
> after 2MSL

2MSL is 1 minute. If we have http or proxy server that handles short tcp
connections with avg. lifetime 2 seconds that means we have *30 times* (!)
more TIME_WAIT connections than active ones.
> > Any reasons why should i _not_ do that? 
> Violation of RFC793? Well, actually you can setup a lower value.

If we are out of mbufs it is bad enough to make such violation reasonable.
> AFAIR, freebsd has a sysctl even to set this const. You could
> add this, but be aware of the consequences. 
> Deleting it on random basis is at least the worst idea.

If we need mbufs immediately to keep services running it is better to purge
the table rather than changing timeout and waiting for it to take effect.
It is not regular situation but just an emergency case.

                                     _     _  _  _  _      _  _
 {::} {::} {::}  CU in Hell          _| o |_ | | _|| |   / _||_|   |_ |_ |_
 (##) (##) (##)        /Arkan#iD    |_  o  _||_| _||_| /   _|  | o |_||_||_|
 [||] [||] [||]            Do i believe in Bible? Hell,man,i've seen one!

Version: PGP 6.5.1i