From: "Pádraig Brady" <P@draigBrady.com>
To: <netdev@vger.kernel.org>
Subject: auto recycling of TIME_WAIT connections
Date: Fri, 7 Sep 2007 10:21:45 +0100 [thread overview]
Message-ID: <46E11829.4090607@draigBrady.com> (raw)
As I see it, TIME_WAIT state is required for 2 reasons:
to handle wandering duplicate packets
(so a reincarnation of a connection will not be corrupted by these packets)
To handle last ack from active closer (client) not being received by remote.
If that happened, the server which is in LAST_ACK state would retransmit its FIN
(which may contain data also) so the client must be in TIME_WAIT state to handle that.
If client is not in TIME_WAIT state, then it could only indicate to the server
that data was maybe lost (with an RST).
The first issue, requires a large timeout, and
the TIME_WAIT timeout is currently 60 seconds on linux.
That timeout effectively limits the connection rate between
local TCP clients and a server to 32k/60s or around 500 connections/second.
But that issue can't really happen when the client
and server are on the same machine can it, and
even if it could, the timeouts involved would be shorter.
Now linux does have an (undocumented) /proc/sys/net/ipv4/tcp_tw_recycle flag
to enable recycling of TIME_WAIT connections. This is global however and could cause
problems in general for external connections.
So how about auto enabling recycling for local connections?
cheers,
Pádraig.
next reply other threads:[~2007-09-07 9:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 9:21 Pádraig Brady [this message]
2007-09-07 17:04 ` auto recycling of TIME_WAIT connections Rick Jones
2007-09-10 10:26 ` Pádraig Brady
2007-09-10 17:23 ` Rick Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E11829.4090607@draigBrady.com \
--to=p@draigbrady.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).