public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp•com>
To: Octavian Purdila <opurdila@ixiacom•com>
Cc: netdev@vger•kernel.org
Subject: Re: TCP timewait recycle/reuse for IPv6?
Date: Mon, 17 Mar 2008 11:15:27 -0700	[thread overview]
Message-ID: <47DEB53F.9030108@hp.com> (raw)
In-Reply-To: <200803172004.33246.opurdila@ixiacom.com>

Octavian Purdila wrote:
> On Monday 17 March 2008, Rick Jones wrote:
> 
>>Octavian Purdila wrote:
>>
>>>Hi,
>>>
>>>Is there a way to prevent getting bind(in6addr_any) failures when we
>>>have lots of TIMEWAIT sockets hanging around? It looks like timewait
>>>reuse/recyle is not supported in the IPv6 stack.
>>
>>What is the definition/value of "lots" here?
>>
> 
> 
> At least 26000, maybe even more. I suspect that when I get the bind
> failures most of the ports in the ip_local_port_range pool are in
> TIMEWATstate.
> This happens because of the particular traffic I am using, which
> generates a few 1000s of connections per second. The connection
> lifetime is very short.

Does it _have_ to be from a single IP address?

> While running the same traffic with IPv4, the timewait recyle/reuse
> features kicks in and keeps the number of TIMEWAIT sockets to under a
> 1000.

ISTR some discussion on the list about that recyling/reuse feature 
perhaps going away.  While TCP theory suggests that one can transition 
from TIME_WAIT to ESTABLISHED, if tings like the ISN are selected "just 
so" it seems the desire to randomize things like ISN's makes the chances 
of success rather remote.

Anyhow, if we presume a 60 second TIME_WAIT, and explicit selection of 
port numbers from the range of 5000 to 65535, it should be possible to 
sustain a connection "churn" rate of ~1000 connections per second 
without attempting to re-use an endpoint still in TIME_WAIT.  Each 
additional "simulated client" IP address you can add to that mix will 
increase the rate by another 1000 connections per second.

Anything trying for such a churn-rate from a single IP address in that 
wonderfully vague "real life" is arguably broken :)

rick jones

  reply	other threads:[~2008-03-17 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 16:18 TCP timewait recycle/reuse for IPv6? Octavian Purdila
2008-03-17 17:43 ` Rick Jones
2008-03-17 18:04   ` Octavian Purdila
2008-03-17 18:15     ` Rick Jones [this message]
2008-03-17 19:11       ` David Miller
2008-03-17 19:10     ` David Miller
2008-03-18  5:27       ` Bill Fink

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=47DEB53F.9030108@hp.com \
    --to=rick.jones2@hp$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=opurdila@ixiacom$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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