From: Ben Greear <greearb@candelatech.com>
To: Andi Kleen <ak@suse.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [1/1] Deprecate tcp_tw_{reuse,recycle}
Date: Wed, 30 Jan 2008 22:37:47 -0800 [thread overview]
Message-ID: <47A16CBB.3000409@candelatech.com> (raw)
In-Reply-To: <200801310359.07362.ak@suse.de>
Andi Kleen wrote:
> On Wednesday 30 January 2008 20:22, Ben Greear wrote:
>
>
>> We use these features to enable creating very high numbers of short-lived
>> TCP connections, primarily used as a test tool for other network
>> devices.
>>
>
> Hopefully these other network devices don't do any NAT then
> or don't otherwise violate the IP-matches-PAWS assumption.
> Most likely they do actually, so enabling TW recycle
> for testing is probably not even safe for you.
>
> Modern systems have a lot of RAM so even without tw recycle
> you should be able to get a very high number of connections.
> An timewait socket is around 128 bytes on 64bit; this means
> with a GB of memory you can already support > 8 Million TW sockets.
> On 32bit it's even more.
>
I believe the problem was that all of my ports were used up with
TIME_WAIT sockets and so it couldn't create more. My test
case was similar to this:
1 Have one machine B listen for connections on one interface (one IP).
2 Have one machine A make a connection to B, and close connection
immediately or soon after
it was established.
goto 2
The goal was to make a maximum number of TCP connections per second.
The data passed
is just filler, and for the fastest settings, we don't pass data at all.
Without setting
tcp_tw_recycle to 1, the system could do only a few thousand connections
per second. With
it set to 1, I think I was getting around 10,000. Either way, it was
significantly faster than
w/out recycle enabled.
So, is there a better way to max out the connections per second without
having to use tcp_tw_recycle?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2008-01-31 6:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 8:38 [PATCH] [1/1] Deprecate tcp_tw_{reuse,recycle} Andi Kleen
2008-01-30 19:22 ` Ben Greear
2008-01-31 2:59 ` Andi Kleen
2008-01-31 6:37 ` Ben Greear [this message]
2008-01-31 6:55 ` Andi Kleen
2008-01-31 16:41 ` Ben Greear
2008-01-31 16:49 ` Andi Kleen
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=47A16CBB.3000409@candelatech.com \
--to=greearb@candelatech.com \
--cc=ak@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.