Re: TCP throttling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/19/05, Al Boldi <a1426z@xxxxxxxxx> wrote:
> > > Pure TCP.  How do you unlimit the TCP connection?

You can only shape/limit connections. You can't make them go faster
(unless they are slower than they should be, and then you have a
tuning/equipment problem, so fix that).

> > The only thing that throttles TCP throughput is packet loss, window size
> > and latency.

Plus host and router CPU/line card/interface utilization, device
buffer sizes, link utilization, switch capacity, interrupt load, NIC
quality, retransmissions, amount of RAM, etc, etc. You can get really
involved if you want to.

> Window size maybe.
> Is this tunable per connection?

Yes, but not to the level you might want. See W. Richard Stevens' UNIX
Network Programming for the particular socket options that can be
played with (TCP_MAXSEG and TCP_WINDOW_CLAMP, in this case; man 7 tcp
will also be enlightening).

> Better yet, would it be possible to auto-tune it  based on system load?

If you could accurately determine system load, yes, but again only to
the level that is allowed in userspace (again, see Stevens).

> Also, is this the only tunable?

The TCP MSS (Maximum Segment Size) is also tunable, as above, with the
TCP_MAXSEG socket option. You cannot change either of these values
once the socket has been created.

What you appear to be looking for is called TCP Rate Control. This
effectively rewrites the window and MSS sizes on the return traffic
(and can also induce delays on the return traffic ACKs to introduce
latency when necessary) to engage or fake out the congestion control
inherent in the TCP protocol. Linux does not support this, but rather
supports QoS techniques such as fair queuing, token bucket filters,
etc, etc. Read http://lartc.org/ for information about what it does
support. If you really want it to support TCP Rate Control, you'll
have to write it yourself or pay someone else to write it for you.
There was one (or more?) attempt at developing this for Linux, but it
was not integrated into the mainline and that code is long, long dead.

-- 
Toby DiPasquale
0x636f6465736c696e67657240676d61696c2e636f6d
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux