[2280] in linux-net channel archive
Re: Intermittent Connection Problems
daemon@ATHENA.MIT.EDU (Alan Cox)
Fri Mar 29 04:41:03 1996
From: Alan Cox <alan@cymru.net>
To: dledford@dialnet.net (Doug Ledford)
Date: Fri, 29 Mar 1996 09:23:59 +0000 (GMT)
Cc: root@ns1.wwi.com, linux-net@vger.rutgers.edu
In-Reply-To: <Pine.LNX.3.91.960328133545.663B-100000@news.dialnet.net> from "Doug Ledford" at Mar 28, 96 01:45:10 pm
> 3) When looking into /proc/net/sockstat, I noticed that the
> SOCK_ARRAY_SIZE was always 256, no matter what the limit on
> sockets was in linux/net.h. I also noticed that after some
> period of time where people couldn't connect, the values for
> TCP: highest xxx would be VERY close to the 256 limit, minus
> the normal number of UDP and RAW sockets on the system.
The array is purely a hash and doesnt change the socket properties.
> My guess as to the cause of the problem is the number of web hits we get
> and the number of sockets I have on port 80 in the CLOSING_WAIT,
> FIN_WAIT2, etc. states filling up the SOCK_ARRAY. I surmised that upping
> the SOCK_ARRAY_SIZE to 1024 would allow me a much greater number of these
> partially closed sockets before the system would fill up and not respond
> to incoming network connections. If I'm wrong, or if I've done something
> I shouldn't have, then someone please let me know :)
Not far off. There is another TCP variable giving the amount of connections
in progress at once. This is normally 5 which is low these days. If you
make inetd set this to 32 you should be ok. Most web servers (eg apache)
set it to 128, and 1.2.11+ support this and are much happier web servers
than earlier kernels.
Alan