netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Agoston Horvath <agoston@ripe.net>
To: netdev@vger.kernel.org
Subject: IPv6: Connection reset/timeout under heavy load
Date: Tue, 27 Mar 2007 13:02:41 +0200	[thread overview]
Message-ID: <4608F9D1.4060109@ripe.net> (raw)

[-- 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 --]

             reply	other threads:[~2007-03-27 11:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27 11:02 Agoston Horvath [this message]
     [not found] <4608E7CA.3090001@ripe.net>
2007-03-27 10:46 ` IPv6: Connection reset/timeout under heavy load 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 / 吉藤英明

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=4608F9D1.4060109@ripe.net \
    --to=agoston@ripe.net \
    --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).