netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tcp_tw_recycle broken?
@ 2008-11-15  4:37 Karl Pickett
  2008-11-15  5:57 ` Willy Tarreau
  0 siblings, 1 reply; 7+ messages in thread
From: Karl Pickett @ 2008-11-15  4:37 UTC (permalink / raw)
  To: linux-kernel, netdev

Hey.  Developing a http proxy on fedora 9 (2.6.25) and running into a
strange issue.

Having the proxy set up and tear down 6000 tcp connections a second to
the same test server ip and port,
it quickly blows up (5 seconds) due to all 30000 ephemeral ports going
to TIME_WAIT.
setting tw_recycle=1 fixed the problem, and there are never more than
a couple hundred ports in TIME_WAIT.

BUT...

Changing the load test to alternate between two test server ips, it
blows up.  Connect: can't assign requested address. (note I am not
binding before hand, I tried
and binding first to port 0 made no difference - it just blows up then
during the bind).

And there are ~28K ports in TIME_WAIT.  For example:

proxy_ip:30000 load_test_1:8080 TIME_WAIT
proxy_ip:30000 load_test_2:8080 TIME_WAIT
...
but most are not duplicates of the same local port.


What. The.  Heck.

So short of rebuilding the kernel with time_wait as 1 second, is there
any other way not to brick my proxy?

--
Karl Pickett

--
Karl Pickett

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

end of thread, other threads:[~2008-11-15 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15  4:37 tcp_tw_recycle broken? Karl Pickett
2008-11-15  5:57 ` Willy Tarreau
2008-11-15  7:29   ` Karl Pickett
2008-11-15 13:09     ` Andi Kleen
2008-11-15 15:47       ` Karl Pickett
2008-11-15 15:52         ` Willy Tarreau
     [not found]   ` <f9be06770811142325j79ca0831j7d5820716199811@mail.gmail.com>
2008-11-15  7:45     ` Willy Tarreau

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).