[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100421001448.GA31724@ioremap.net>
Date: Wed, 21 Apr 2010 04:14:48 +0400
From: Evgeniy Polyakov <zbr@...emap.net>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Gaspar Chilingarov <gasparch@...il.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open huge amount of outgoing connections (unable to bind ... )
Hi.
On Wed, Apr 21, 2010 at 01:42:25AM +0200, Eric Dumazet (eric.dumazet@...il.com) wrote:
> If you want to check source, its in file net/ipv4/inet_connection_sock.c
>
> function inet_csk_get_port()
>
> you can remove the
>
> if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) {
> spin_unlock(&head->lock);
> snum = smallest_rover;
> goto have_snum;
> }
>
> It will solve your problem (but bind() will probably be slow)
Netcat uses SO_REUSEADDR, so its the code path which generates an error,
but this part actually returns a port number not en error. I suppose
what happend is 'attempts' check faired and thus system failed to find
a small enough bucket which does not conflict. To test this we can
remove 'smallest_size = tb->num_owners;' assignment, but bind() can be
damn slow in this case indeed.
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists