All of lore.kernel.org
 help / color / mirror / Atom feed
* IPv6: Connection reset/timeout under heavy load
@ 2007-03-27  9:45 Agoston Horvath
  2007-03-27 10:18 ` Eric Dumazet
  2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 9+ messages in thread
From: Agoston Horvath @ 2007-03-27  9:45 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

Hello,

I'm trying to add ipv6 support to the RIPE whois-server. I'm going with the dual-stack address familiy independent solution (/proc/sys/net/ipv6/bindv6only is set to 0).
I've written a small piece of code which tests how the server behaves under heavy load. It basically creates a specified number of threads and hammers the query port of the server with logged real-world queries. This works fine over ipv4. But if I switch to ipv6 (meaning, instead of the ipv4 address of eth0, I give the ipv6 one to getaddrinfo()), strange connection reset/timeout problems arise. This is especially strange because it's all AF-independent, so the very same piece of code runs fine for ipv4, but fails for ipv6.

I've created a small excerpt of the connection code (see attachment), which can be used to reproduce the problem. I've played around with number of clients/servers and the number of threads, and came to the conclusion that the problem is most probably in either in libc or in the kernel.
Strangest thing is that if I set the client to use 1 thread only, it works well. If I either start 2 pieces of 1-threaded clients or 1 piece of 2-threaded client, they start throwing errors.

I've even fiddled with sysctls tcp_fin_timeout, tcp_tw_recycle and tcp_tw_reuse, but it didn't change anything. Setting SO_LINGER to a smaller value also didn't help.

I'm using kernel 2.6.16.29, libc is 2.3.2.ds1-22sarge5. However, same result was achieved using kernel version 2.6.13 on the same box.

I'm out of further ideas. If anyone can give me some pointers about what could be wrong, please, don't spare me.

Thanks,
Agoston

[-- Attachment #2: load_test.tar.gz --]
[-- Type: application/x-gzip, Size: 3678 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-27  9:45 IPv6: Connection reset/timeout under heavy load Agoston Horvath
@ 2007-03-27 10:18 ` Eric Dumazet
  2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Dumazet @ 2007-03-27 10:18 UTC (permalink / raw)
  To: Agoston Horvath; +Cc: linux-kernel

On Tue, 27 Mar 2007 11:45:46 +0200
Agoston Horvath <agoston@ripe.net> wrote:

> Hello,
> 
> I'm trying to add ipv6 support to the RIPE whois-server. I'm going with the dual-stack address familiy independent solution (/proc/sys/net/ipv6/bindv6only is set to 0).
> I've written a small piece of code which tests how the server behaves under heavy load. It basically creates a specified number of threads and hammers the query port of the server with logged real-world queries. This works fine over ipv4. But if I switch to ipv6 (meaning, instead of the ipv4 address of eth0, I give the ipv6 one to getaddrinfo()), strange connection reset/timeout problems arise. This is especially strange because it's all AF-independent, so the very same piece of code runs fine for ipv4, but fails for ipv6.

Hello Agoston

Could you please repost your mail on netdev@vger.kernel.org, because this address is more appropriate to get in touch with networking guys :)

Thank you

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-27  9:45 IPv6: Connection reset/timeout under heavy load Agoston Horvath
  2007-03-27 10:18 ` Eric Dumazet
@ 2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-03-27 11:23   ` Agoston Horvath
  2007-03-28  8:48   ` Agoston Horvath
  1 sibling, 2 replies; 9+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-03-27 10:46 UTC (permalink / raw)
  To: agoston; +Cc: linux-kernel, netdev

Hello.

(CC: netdev added.)

In article <4608E7CA.3090001@ripe.net> (at Tue, 27 Mar 2007 11:45:46 +0200), Agoston Horvath <agoston@ripe.net> says:

> I'm using kernel 2.6.16.29, libc is 2.3.2.ds1-22sarge5. However, same result was achieved using kernel version 2.6.13 on the same box.
> 
> I'm out of further ideas. If anyone can give me some pointers about what could be wrong, please, don't spare me.

Would you test with latest kernel, if possible, please?

--yoshfuji

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-03-27 11:23   ` Agoston Horvath
  2007-03-28  8:48   ` Agoston Horvath
  1 sibling, 0 replies; 9+ messages in thread
From: Agoston Horvath @ 2007-03-27 11:23 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: netdev

(Let's take it off linux-kernel; I've subscribed to netdev)


YOSHIFUJI Hideaki / 吉藤英明 wrote:
> Would you test with latest kernel, if possible, please?

I'll give it a try; however, this might take a couple of days (I have no auth to replace the kernel on the box :( ).

Cheers,
Agoston

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-03-27 11:23   ` Agoston Horvath
@ 2007-03-28  8:48   ` Agoston Horvath
  2007-03-28  9:23     ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 9+ messages in thread
From: Agoston Horvath @ 2007-03-28  8:48 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: linux-kernel, netdev

YOSHIFUJI Hideaki / 吉藤英明 wrote:
> Would you test with latest kernel, if possible, please?

For the archive: switching to 2.6.20.4 fixed this problem.

Thanks!

Agoston

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-28  8:48   ` Agoston Horvath
@ 2007-03-28  9:23     ` YOSHIFUJI Hideaki / 吉藤英明
  2007-03-28  9:26       ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-03-28  9:23 UTC (permalink / raw)
  To: agoston; +Cc: linux-kernel, netdev, yoshfuji

In article <460A2BDB.6080200@ripe.net> (at Wed, 28 Mar 2007 10:48:27 +0200), Agoston Horvath <agoston@ripe.net> says:

> YOSHIFUJI Hideaki / 吉藤英明 wrote:
> > Would you test with latest kernel, if possible, please?
> 
> For the archive: switching to 2.6.20.4 fixed this problem.

Thank you for your report.

I guess the following change will fix the issue for 2.6.16.y:
http://www.linux-ipv6.org/gitweb/gitweb.cgi?p=gitroot/yoshfuji/linux-2.6-fix.git;a=commit;h=33a79bba0cc2f197b46cc54182f94c31ff6ad334

I hope this patch will go in 2.6.16-stable...

Regards,

--yoshfuji

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-28  9:23     ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-03-28  9:26       ` David Miller
  2007-03-28  9:33         ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2007-03-28  9:26 UTC (permalink / raw)
  To: yoshfuji; +Cc: agoston, linux-kernel, netdev

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Wed, 28 Mar 2007 18:23:34 +0900 (JST)

> In article <460A2BDB.6080200@ripe.net> (at Wed, 28 Mar 2007 10:48:27 +0200), Agoston Horvath <agoston@ripe.net> says:
> 
> > YOSHIFUJI Hideaki / 吉藤英明 wrote:
> > > Would you test with latest kernel, if possible, please?
> > 
> > For the archive: switching to 2.6.20.4 fixed this problem.
> 
> Thank you for your report.
> 
> I guess the following change will fix the issue for 2.6.16.y:
> http://www.linux-ipv6.org/gitweb/gitweb.cgi?p=gitroot/yoshfuji/linux-2.6-fix.git;a=commit;h=33a79bba0cc2f197b46cc54182f94c31ff6ad334
> 
> I hope this patch will go in 2.6.16-stable...

Please forward this patch to Adrian Bunk (bunk@stusta.de),
he will definitely add it to 2.6.16-stable for you.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6: Connection reset/timeout under heavy load
  2007-03-28  9:26       ` David Miller
@ 2007-03-28  9:33         ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 9+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-03-28  9:33 UTC (permalink / raw)
  To: davem; +Cc: agoston, linux-kernel, netdev, yoshfuji

In article <20070328.022624.59656162.davem@davemloft.net> (at Wed, 28 Mar 2007 02:26:24 -0700 (PDT)), David Miller <davem@davemloft.net> says:

> > http://www.linux-ipv6.org/gitweb/gitweb.cgi?p=gitroot/yoshfuji/linux-2.6-fix.git;a=commit;h=33a79bba0cc2f197b46cc54182f94c31ff6ad334
> > 
> > I hope this patch will go in 2.6.16-stable...
> 
> Please forward this patch to Adrian Bunk (bunk@stusta.de),
> he will definitely add it to 2.6.16-stable for you.

I will do it again...

--yoshfuji

^ permalink raw reply	[flat|nested] 9+ messages in thread

* IPv6: Connection reset/timeout under heavy load
@ 2007-03-27 11:02 Agoston Horvath
  0 siblings, 0 replies; 9+ messages in thread
From: Agoston Horvath @ 2007-03-27 11:02 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

Hello,

I'm trying to add ipv6 support to the RIPE whois-server. I'm going with the dual-stack address familiy independent solution (/proc/sys/net/ipv6/bindv6only is set to 0).
I've written a small piece of code which tests how the server behaves under heavy load. It basically creates a specified number of threads and hammers the query port of the server with logged real-world queries. This works fine over ipv4. But if I switch to ipv6 (meaning, instead of the ipv4 address of eth0, I give the ipv6 one to getaddrinfo()), strange connection reset/timeout problems arise. This is especially strange because it's all AF-independent, so the very same piece of code runs fine for ipv4, but fails for ipv6.

I've created a small excerpt of the connection code (see attachment), which can be used to reproduce the problem. I've played around with number of clients/servers and the number of threads, and came to the conclusion that the problem is most probably in either in libc or in the kernel.
Strangest thing is that if I set the client to use 1 thread only, it works well. If I either start 2 pieces of 1-threaded clients or 1 piece of 2-threaded client, they start throwing errors.

I've even fiddled with sysctls tcp_fin_timeout, tcp_tw_recycle and tcp_tw_reuse, but it didn't change anything. Setting SO_LINGER to a smaller value also didn't help.

I'm using kernel 2.6.16.29, libc is 2.3.2.ds1-22sarge5. However, same result was achieved using kernel version 2.6.13 on the same box.

I'm out of further ideas. If anyone can give me some pointers about what could be wrong, please, don't spare me.

Thanks,
Agoston


[-- Attachment #2: load_test.tar.gz --]
[-- Type: application/x-gzip, Size: 3678 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-03-28  9:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27  9:45 IPv6: Connection reset/timeout under heavy load Agoston Horvath
2007-03-27 10:18 ` Eric Dumazet
2007-03-27 10:46 ` YOSHIFUJI Hideaki / 吉藤英明
2007-03-27 11:23   ` Agoston Horvath
2007-03-28  8:48   ` Agoston Horvath
2007-03-28  9:23     ` YOSHIFUJI Hideaki / 吉藤英明
2007-03-28  9:26       ` David Miller
2007-03-28  9:33         ` YOSHIFUJI Hideaki / 吉藤英明
2007-03-27 11:02 Agoston Horvath

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.