Date: Mon, 13 Nov 1995 21:00:44 +0100 (MET) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: hackers@freebsd.org, luigi@labinfo.iet.unipi.it (Luigi Rizzo) Subject: TIME_WAIT and linear chain of TCPCBs (was: ...beat a WEB server to death) Message-ID: <199511132000.VAA01171@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
There are two phenomenons which might disturb performance on a busy http or gopher server. I would like to know how FreeBSD deals with them * TIME_WAIT: a connection should remain in the TIME_WAIT status for 2MSL. According to the spec this is 4 minutes, although I believe 4.4Lite uses a shorter value (1minute ?). As J.Mogul points out in his paper "The case for Persistent-Connection HTTP", http://ftp.digital.com/~mogul/sigcomm95.ps, a busy server might end up with many thousands of connections in the time wait state, consuming a large amount of memory; * TCPCB caching when an incoming segment arrives, the pertinent tcpcb must be located. I believe that 4.4Lite uses a linear chain of tcpcbs, with possibly a pointer to recently used ones. On a busy server, both the arrangement and the cache are not very effective. Someone in the literature (I forget whom, but Stevens' book "TCP/IP illustrated" tells more on this) suggested the use of a hash table. I believe a busy HTTP server using 4.4Lite code can become very inefficient in demuxing incoming TCP segments for the above two reasons. Does -current code include any improvement to the code ? Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511132000.VAA01171>