TIME_WAIT sockets clog system

Steve Summit scs at adam.pika.mit.edu
Tue Jul 4 11:52:55 AEST 1989


There is an interesting discussion going on in comp.bugs.2bsd
about an out-of-mbufs problem caused by an mget in ftp.  The
problem obviously occurs primarily on a pdp11 with its limited
memory, but the 2.10bsd code is taken directly from the VAX
version, and I have noticed the same problem (and indeed the
original submittor acknowledges the possibility in the excerpt
from his posting I've reproduced below) when doing an mput (as I
recall) on an overloaded MicroVAX being used as a file server.

In article <comp.bugs.2bsd:33132 at wlbr.IMSD.CONTEL.COM> sms at wlv.imsd.contel.com (Steven M. Schultz(Y)) writes:
G>Subject: TIME_WAIT sockets clog system (part 2)
O>Index:	sys/sys/uipc_mbuf.c 2.10BSD
O>
D>Description:
 >	Sockets in a TIME_WAIT state can constipate the networking
O>	buffer memory when generated in rapid succession by, for
L>	example, an "mget" in an ftp session.  If more than a dozen
D>	or so small files are transferred in rapid succession over
 >	an ethernet, all the mbufs in the system will be taken up
I>	by sockets in a TIME_WAIT state (from the socket opened for
N>	each data transfer).
E>
W>Repeat-By:
S>	ftp in to a 2.10.1BSD system, do an "mget *" in a largish
 >	directory.  note that the transfer will hang/develope problems
 >	after about a dozen to twenty files.  the 2.10.1BSD system
 >	has run out of mbufs and will recover in a minute or so (hopefully).
 >	It should be noted that even a Vax could be run out of mbufs
 >	if the directory were large enough and network memory was full
 >	due to other causes.

There is some debate about the efficacy of the proposed fix,
which involves fleshing out the (previously stubbed) tcp_drain
routine.

                                            Steve Summit
                                            scs at adam.pika.mit.edu



More information about the Comp.bugs.4bsd.ucb-fixes mailing list