netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Handling a few hundred thousand TCP flows
@ 2004-02-01 21:58 Marcin Gozdalik
  2004-02-02  6:01 ` Xiaoliang (David) Wei
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Gozdalik @ 2004-02-01 21:58 UTC (permalink / raw)
  To: netdev

Hello

I've been successfully using Linux 2.4 for handling many thousands TCP
flows (300k non-stop). I've been wondering which options I should use to
minimize CPU and memory consumption.
I've followed the thread from December about handling 90k TCP streams
and suggestions contained there. I thought however of some more radical
solutions: disabling rt_cache altogether. The routing table contains
whole 2 entries (for eth0 subnet and default gateway) so I'd assume that
walking linearily such short list would be a win cache-wise compared to
huge rt_cache? Or is it a completely stupid idea not worth implementing?
Additionally, I've disabled ECN and SACKs. Does it make any sense? Or
are performance/memory gains negligible?

Cheers,
Marcin

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

* Re: Handling a few hundred thousand TCP flows
  2004-02-01 21:58 Handling a few hundred thousand TCP flows Marcin Gozdalik
@ 2004-02-02  6:01 ` Xiaoliang (David) Wei
  0 siblings, 0 replies; 2+ messages in thread
From: Xiaoliang (David) Wei @ 2004-02-02  6:01 UTC (permalink / raw)
  To: netdev, Marcin Gozdalik

Hi,
> I've been successfully using Linux 2.4 for handling many thousands TCP
> flows (300k non-stop). I've been wondering which options I should use to
> minimize CPU and memory consumption.
> I've followed the thread from December about handling 90k TCP streams
> and suggestions contained there. I thought however of some more radical
> solutions: disabling rt_cache altogether. The routing table contains
> whole 2 entries (for eth0 subnet and default gateway) so I'd assume that
> walking linearily such short list would be a win cache-wise compared to
> huge rt_cache? Or is it a completely stupid idea not worth implementing?
> Additionally, I've disabled ECN and SACKs. Does it make any sense? Or
> are performance/memory gains negligible?
    I think SACK will have some overhead since it goes through the
retransmission queue for each SACK option. But this only happens when the
ack packet contains SACK.
    For memory, Linux allocate a block of memory for each connection
(usually 64KB). This is the buffer for the sliding-window algorithm. You can
change this memory buffer size to be w. The principle is that: w*N cannot be
too large in comparison to the memory in you machine (where N is # of
connections). The effect of a small buffer size w is that the window for
each TCP conneciton cannot be high -- hence the throughput of each flow is
low if the RTT is not negligible.
    Web100 project (http://www.web100.org) provide a patch to dynamically
allocate memory for different flows and maintains a static size of aggregate
buffer for all the connections.


-David

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

end of thread, other threads:[~2004-02-02  6:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-01 21:58 Handling a few hundred thousand TCP flows Marcin Gozdalik
2004-02-02  6:01 ` Xiaoliang (David) Wei

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