* orphan sockets
@ 2011-07-08 15:13 Denys Fedoryshchenko
2011-07-08 16:28 ` Daniel Baluta
0 siblings, 1 reply; 4+ messages in thread
From: Denys Fedoryshchenko @ 2011-07-08 15:13 UTC (permalink / raw)
To: netdev
Hi
Just after digging orphan sockets problem, that was causing "Address
already in use" for bind(),i found that in documentation is mentioned:
tcp_orphan_retries - INTEGER
This value influences the timeout of a locally closed TCP
connection,
when RTO retransmissions remain unacknowledged.
See tcp_retries2 for more details.
The default value is 7.
If your machine is a loaded WEB server,
you should think about lowering this value, such sockets
may consume significant resources. Cf. tcp_max_orphans.
But all servers i have, i notice that tcp_orphan_retries = 0 by
default, i check in code, and found that:
if (retries == 0 && alive)
retries = 8;
is a bit confusing, that tcp_orphan_retries = 0, is in fact = 8, or to
be more exact is 8 if socket has rto < RTO_MAX. But nothing like 7
mentioned in documentation, i guess it is wrong?. My english too bad to
edit that, but maybe someone will take a look :-)
---
System administrator
Denys Fedoryshchenko
Virtual ISP S.A.L.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: orphan sockets
2011-07-08 15:13 orphan sockets Denys Fedoryshchenko
@ 2011-07-08 16:28 ` Daniel Baluta
2011-07-08 16:31 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Baluta @ 2011-07-08 16:28 UTC (permalink / raw)
To: Denys Fedoryshchenko; +Cc: netdev
On Fri, Jul 8, 2011 at 6:13 PM, Denys Fedoryshchenko <denys@visp.net.lb> wrote:
> Hi
>
> Just after digging orphan sockets problem, that was causing "Address already
> in use" for bind(),i found that in documentation is mentioned:
>
> tcp_orphan_retries - INTEGER
> This value influences the timeout of a locally closed TCP connection,
> when RTO retransmissions remain unacknowledged.
> See tcp_retries2 for more details.
>
> The default value is 7.
> If your machine is a loaded WEB server,
> you should think about lowering this value, such sockets
> may consume significant resources. Cf. tcp_max_orphans.
This should be 8. tcp(7) got it wright.
> But all servers i have, i notice that tcp_orphan_retries = 0 by default, i
> check in code, and found that:
> if (retries == 0 && alive)
> retries = 8;
> is a bit confusing, that tcp_orphan_retries = 0, is in fact = 8, or to be
> more exact is 8 if socket has rto < RTO_MAX. But nothing like 7 mentioned in
> documentation, i guess it is wrong?. My english too bad to edit that, but
> maybe someone will take a look :-)
I guess 0 means, let the operating system to choose the default value for this.
Basically, what we should do here is replace 7 with 8 in
Documentation/networking/ip-sysctl.txt
I can try to make a patch for this if you want.
thanks,
Daniel.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: orphan sockets
2011-07-08 16:28 ` Daniel Baluta
@ 2011-07-08 16:31 ` David Miller
2011-07-08 16:33 ` Daniel Baluta
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-07-08 16:31 UTC (permalink / raw)
To: daniel.baluta; +Cc: denys, netdev
From: Daniel Baluta <daniel.baluta@gmail.com>
Date: Fri, 8 Jul 2011 19:28:27 +0300
> I can try to make a patch for this if you want.
No need, I'll take care of this, thanks:
--------------------
net: Fix default in docs for tcp_orphan_retries.
Default should be listed at 8 instead of 7.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Documentation/networking/ip-sysctl.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index d3d653a..bfe9242 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -346,7 +346,7 @@ tcp_orphan_retries - INTEGER
when RTO retransmissions remain unacknowledged.
See tcp_retries2 for more details.
- The default value is 7.
+ The default value is 8.
If your machine is a loaded WEB server,
you should think about lowering this value, such sockets
may consume significant resources. Cf. tcp_max_orphans.
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-08 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-08 15:13 orphan sockets Denys Fedoryshchenko
2011-07-08 16:28 ` Daniel Baluta
2011-07-08 16:31 ` David Miller
2011-07-08 16:33 ` Daniel Baluta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox