* Heavy system load <-> tcp-problems?
@ 1998-03-11 5:00 Eric Heymann
1998-03-11 5:00 ` John McIntire
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Eric Heymann @ 1998-03-11 5:00 UTC (permalink / raw)
Hello!
We are using an digital alphaserver 4100 with 2 GB RAM and 4 CPUs and
OSF1/Digital Unix V4.0. We are running apache V1.2 and are experiencing
serious problems under heavy load. It appears that most of the active
server-processes hang in the "w" (sending reply) status, and no new
connections are accepted. "/usr/sbin/netstat -a -f inet -n" reports many
sockets in the TIME_WAIT or FIN_WAIT_n, where n = 1,2, status (more than
60%). In this situation our customers report a very slow system
response.
Do you know if this behavior stands in any relation to the more often
experienced TIME_WAIT and FIN_WAIT_n status of the sockets? And if yes,
is there any kernel parameter, which forces the tcp-module to close the
connections?
Thanks in advance,
Eric Heymann
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Heavy system load <-> tcp-problems?
1998-03-11 5:00 Heavy system load <-> tcp-problems? Eric Heymann
@ 1998-03-11 5:00 ` John McIntire
1998-03-11 5:00 ` David Lee
1998-03-11 5:00 ` Michael Gros
2 siblings, 0 replies; 8+ messages in thread
From: John McIntire @ 1998-03-11 5:00 UTC (permalink / raw)
setting tcpnodelack to 0 (default 1) will prevent delay of
acknowledgment of TCP data
Eric Heymann wrote:
>
> Hello!
>
> We are using an digital alphaserver 4100 with 2 GB RAM and 4 CPUs and
> OSF1/Digital Unix V4.0. We are running apache V1.2 and are experiencing
> serious problems under heavy load. It appears that most of the active
> server-processes hang in the "w" (sending reply) status, and no new
> connections are accepted. "/usr/sbin/netstat -a -f inet -n" reports many
> sockets in the TIME_WAIT or FIN_WAIT_n, where n = 1,2, status (more than
> 60%). In this situation our customers report a very slow system
> response.
>
> Do you know if this behavior stands in any relation to the more often
> experienced TIME_WAIT and FIN_WAIT_n status of the sockets? And if yes,
> is there any kernel parameter, which forces the tcp-module to close the
> connections?
>
> Thanks in advance,
> Eric Heymann
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Heavy system load <-> tcp-problems?
1998-03-11 5:00 Heavy system load <-> tcp-problems? Eric Heymann
1998-03-11 5:00 ` John McIntire
@ 1998-03-11 5:00 ` David Lee
1998-03-13 5:00 ` Rick Jones
1998-03-13 5:00 ` Jeffrey Mogul
1998-03-11 5:00 ` Michael Gros
2 siblings, 2 replies; 8+ messages in thread
From: David Lee @ 1998-03-11 5:00 UTC (permalink / raw)
To: Eric Heymann
Eric,
A lot of TIME_WAIT means the three way TCP hand shaking doesn't complete.
You have to decrease the tcp_keepinit to 30.
# cd /etc
# cp sysconfigtab sysconfigtab.sav
# vi sysconfigtab
inet:
tcp_keepint = 30
# reboot
Good Luck!
David Lee.
Eric Heymann wrote:
> Hello!
>
> We are using an digital alphaserver 4100 with 2 GB RAM and 4 CPUs and
> OSF1/Digital Unix V4.0. We are running apache V1.2 and are experiencing
> serious problems under heavy load. It appears that most of the active
> server-processes hang in the "w" (sending reply) status, and no new
> connections are accepted. "/usr/sbin/netstat -a -f inet -n" reports many
> sockets in the TIME_WAIT or FIN_WAIT_n, where n = 1,2, status (more than
> 60%). In this situation our customers report a very slow system
> response.
>
> Do you know if this behavior stands in any relation to the more often
> experienced TIME_WAIT and FIN_WAIT_n status of the sockets? And if yes,
> is there any kernel parameter, which forces the tcp-module to close the
> connections?
>
> Thanks in advance,
> Eric Heymann
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Heavy system load <-> tcp-problems?
1998-03-11 5:00 ` David Lee
@ 1998-03-13 5:00 ` Rick Jones
1998-03-13 5:00 ` Marc Slemko
1998-03-13 5:00 ` Jeffrey Mogul
1 sibling, 1 reply; 8+ messages in thread
From: Rick Jones @ 1998-03-13 5:00 UTC (permalink / raw)
David Lee (davidskl@netvigator.com) wrote:
: A lot of TIME_WAIT means the three way TCP hand shaking doesn't
TIME_WAIT is the state a TCP connection will go into *after* the
three-way handshake is complete. (Actually, only the side that
initiated the handshake goes into TIME_WAIT). TIME_WAIT is an integral
part of TCP's correctness algorithms. The shorter the TIME_WAIT, the
more likely undetected data corruption could occur.
FIN_WAIT_1 is an active retransmission state - the TCP connection is
waiting for the remote to ACK the FIN. This will either transition to
FIN_WAIT_2 after an ACK is recieved, or will retransmit timeout and
die.
FIN_WAIT_2 is a passive state where TCP is waiting for the remote to
send a FIN. Unless a timer is enabled, the connection will stay here
"forever" if the remote system simply goes away. If the three-way
handshake does not complete, this is a possible state to be left in. I
think the other is LAST_ACK.
I suspect that many FIN_WAIT_2 states (if not 90%) are the result of
silly client software (eg browsers) using abortive closes. Abortive
closes send a RST (reset) segment instead of a FIN (the graceful
close). RST's are not retransmitted, so if the RST is lost, the remote
will never see another one unless it is sending data (which by
definition it is not doing if it is in FIN_WAIT_2). If the RST is not
lost, it short circuits the TIME_WAIT state and thus part of TCP's
correctness algorithms.
Do the net a favor - pester your Internet software vendor to *not* use
abortive closes.
rick jones
--
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, or post, but please do not do both...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Heavy system load <-> tcp-problems?
1998-03-13 5:00 ` Rick Jones
@ 1998-03-13 5:00 ` Marc Slemko
1998-03-17 5:00 ` Rick Jones
0 siblings, 1 reply; 8+ messages in thread
From: Marc Slemko @ 1998-03-13 5:00 UTC (permalink / raw)
In <6e9v4p$oon$1@ocean.cup.hp.com> foo@bar.baz (Rick Jones) writes:
>I suspect that many FIN_WAIT_2 states (if not 90%) are the result of
>silly client software (eg browsers) using abortive closes. Abortive
>closes send a RST (reset) segment instead of a FIN (the graceful
>close). RST's are not retransmitted, so if the RST is lost, the remote
>will never see another one unless it is sending data (which by
>definition it is not doing if it is in FIN_WAIT_2). If the RST is not
>lost, it short circuits the TIME_WAIT state and thus part of TCP's
>correctness algorithms.
>Do the net a favor - pester your Internet software vendor to *not* use
>abortive closes.
Gee, I did that. I even got them (someone from MS and someone from
NS) to agree that doing it was a bad idea and that they would
change. Haven't seen it yet and probably never will. In fact,
the guy from MS admitted that he didn't know why they were doing
them, but since Navigator did they figured they better copy it.
...and if the next version of SPECweb does them too, as I have heard
rumors that it will, that will be even more annoying.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Heavy system load <-> tcp-problems?
1998-03-13 5:00 ` Marc Slemko
@ 1998-03-17 5:00 ` Rick Jones
0 siblings, 0 replies; 8+ messages in thread
From: Rick Jones @ 1998-03-17 5:00 UTC (permalink / raw)
Marc Slemko (marcs@znep.com) wrote:
: ...and if the next version of SPECweb does them too, as I have heard
: rumors that it will, that will be even more annoying.
I would like to hear ("offline" is fine) the source to that
rumour. Unless I've missed something in the crack of dawn (Pacific
time, from a software guy's perspective...) teleconferences,
SPECweb98 will not use abortive close. There were suggestions to do so
because it was "more realistic since the browsers did it" but that was
not felt sufficiently compelling to have SPEC implicitly sanction
ill-advised programming.
rick jones
--
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, or post, but please do not do both...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Heavy system load <-> tcp-problems?
1998-03-11 5:00 ` David Lee
1998-03-13 5:00 ` Rick Jones
@ 1998-03-13 5:00 ` Jeffrey Mogul
1 sibling, 0 replies; 8+ messages in thread
From: Jeffrey Mogul @ 1998-03-13 5:00 UTC (permalink / raw)
In article <3506AEAF.2A706FF4@netvigator.com>, David Lee <davidskl@netvigator.com> writes:
|> A lot of TIME_WAIT means the three way TCP hand shaking doesn't complete.
Not exactly. Digital UNIX can keep zillions of TIME_WAIT entries
(as long as you have enough RAM, and the original poster had 2GB)
without affecting its ability to accept new connections.
If indeed the "three-way handshake" (SYN packet exchange) is failing,
this is because the "socket listen queue depth" is too small. The
default on V4.0 is, I believe, 1024; you can set it as high as 32767.
For full instructions, and much more about tuning Digital UNIX
for high-performance Web servers, please see:
http://www.digital.com/internet/document/ias/tuning.html
|> You have to decrease the tcp_keepinit to 30.
This should not be necessary if the system is configured according
to the document cited above. However, if your system is under
a "SYN-flooding" attack, it *might* help to reduce tcp_keepinit.
By the way, large numbers of TIME_WAIT states are entirely
normal; in fact, if your server is busy, this is basically
required by the TCP specification (RFC793).
-Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Heavy system load <-> tcp-problems?
1998-03-11 5:00 Heavy system load <-> tcp-problems? Eric Heymann
1998-03-11 5:00 ` John McIntire
1998-03-11 5:00 ` David Lee
@ 1998-03-11 5:00 ` Michael Gros
2 siblings, 0 replies; 8+ messages in thread
From: Michael Gros @ 1998-03-11 5:00 UTC (permalink / raw)
Hi,
I do not have related experience with the exact problem,
but, have you reviewed:
http://www.digital.com/internet/document/ias/tuning.html
It sounds like Unix 4.0D is the latest and best version to
have running for the best network performance.
Eric Heymann wrote:
>
> Hello!
>
> We are using an digital alphaserver 4100 with 2 GB RAM and 4 CPUs and
> OSF1/Digital Unix V4.0. We are running apache V1.2 and are experiencing
> serious problems under heavy load. It appears that most of the active
> server-processes hang in the "w" (sending reply) status, and no new
> connections are accepted. "/usr/sbin/netstat -a -f inet -n" reports many
> sockets in the TIME_WAIT or FIN_WAIT_n, where n = 1,2, status (more than
> 60%). In this situation our customers report a very slow system
> response.
>
> Do you know if this behavior stands in any relation to the more often
> experienced TIME_WAIT and FIN_WAIT_n status of the sockets? And if yes,
> is there any kernel parameter, which forces the tcp-module to close the
> connections?
>
> Thanks in advance,
> Eric Heymann
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1998-03-17 5:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-11 5:00 Heavy system load <-> tcp-problems? Eric Heymann
1998-03-11 5:00 ` John McIntire
1998-03-11 5:00 ` David Lee
1998-03-13 5:00 ` Rick Jones
1998-03-13 5:00 ` Marc Slemko
1998-03-17 5:00 ` Rick Jones
1998-03-13 5:00 ` Jeffrey Mogul
1998-03-11 5:00 ` Michael Gros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox