From: Eric Dumazet <dada1@cosmosbay.com>
To: Howard Chu <hyc@symas.com>
Cc: netdev@vger.kernel.org
Subject: Re: TCP 2MSL on loopback
Date: Tue, 06 Mar 2007 21:07:49 +0100 [thread overview]
Message-ID: <45EDCA15.4060704@cosmosbay.com> (raw)
In-Reply-To: <45EDB55C.2080803@symas.com>
Howard Chu a écrit :
> Eric Dumazet wrote:
>> On Tuesday 06 March 2007 10:22, Howard Chu wrote:
>>
>>> It's a combination of 2MSL and /proc/sys/net/ipv4/ip_local_port_range -
>>> on my system the default port range is 32768-61000. That means if I use
>>> up 28232 ports in less than 2MSL then everything stops. netstat will
>>> show that all the available port numbers are in TIME_WAIT state. And
>>> this is particularly bad because while waiting for the timeout, I can't
>>> initiate any new outbound connections of any kind at all - telnet, ssh,
>>> whatever, you have to wait for at least one port to free up.
>>> (Interesting denial of service there....)
>>>
>>> Granted, I was running my test on 2.6.18, perhaps 2.6.21 behaves
>>> differently.
>>
>> Could you try this attached program and tell me whats happen ?
>>
>> $ gcc -O2 -o socktest socktest.c -lpthread
>> $ time ./socktest -n 100000
>> nb_conn=99999 nb_accp=99999
>>
>> real 0m5.058s
>> user 0m0.212s
>> sys 0m4.844s
>>
>> (on my small machine, dell d610 :) )
>
> On my Asus laptop (2GHz Pentium M) the first time I ran it it completed
> in about 51 seconds, with no errors. I then copied it to another machine
> and started it up there, and got connect errors right away. I then went
> back to my laptop and ran it again, and got errors that time.
>
> This is the laptop run with errors:
> viola:~/src> uname -a
> Linux viola 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 i686
> i686 i386 GNU/Linux
> viola:~/src> time ./socktest -n 1000000
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> nb_conn=993757 nb_accp=993757
> 1.408u 88.649s 1:42.76 87.6% 0+0k 0+0io 0pf+0w
>
> This is my other system, an AMD X2 3800+ (dual core)
> mandolin:~/src> uname -a
> Linux mandolin 2.6.18.3SMP #9 SMP Sat Nov 25 10:08:51 PST 2006 x86_64
> x86_64 x86_64 GNU/Linux
> mandolin:~/src> gcc -O2 -o socktest socktest.c -lpthread
> mandolin:~/src> time ./socktest -n 1000000
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> connect error 99
> nb_conn=957088 nb_accp=957088
> 1.012u 630.991s 5:18.05 198.7% 0+0k 0+0io 0pf+0w
Let me see, any chance you can try the prog on 2.6.20 ?
If not, please send :
grep . /proc/sys/net/ipv4/*
Thank you
next prev parent reply other threads:[~2007-03-06 20:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45EBFD13.1060106@symas.com>
2007-03-05 14:28 ` TCP 2MSL on loopback Eric Dumazet
2007-03-05 15:09 ` [PATCH] twcal_jiffie should be unsigned long, not int Eric Dumazet
2007-03-05 21:33 ` David Miller
2007-03-06 9:22 ` TCP 2MSL on loopback Howard Chu
2007-03-06 10:42 ` Eric Dumazet
2007-03-06 18:39 ` Howard Chu
2007-03-06 20:07 ` Eric Dumazet [this message]
2007-03-06 20:28 ` Howard Chu
2007-03-06 20:39 ` Eric Dumazet
2007-03-06 21:05 ` Howard Chu
2007-03-06 21:25 ` Rick Jones
2007-03-06 21:35 ` David Miller
2007-03-06 22:07 ` Howard Chu
2007-03-06 22:54 ` Stephen Hemminger
2007-03-06 23:22 ` Howard Chu
2007-03-06 18:04 ` David Miller
2007-03-06 18:46 ` Rick Jones
2007-03-06 19:25 ` Howard Chu
2007-03-06 20:41 ` Rick Jones
2007-03-07 3:36 ` Howard Chu
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=45EDCA15.4060704@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=hyc@symas.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).