lkml.org 
[lkml]   [1996]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bandwidth limits??
On Sat, 19 Oct 1996, Alan Cox wrote:

> > Is there a way to limit the bandwidth of one program? I have a 28.8k
> > PPP connection; it would be nice to be able to limit an FTP connection
> > to 75% or less of the bandwidth so that interactive performance
> > (remote email & netnews browsing) could stay high...
>
> Thats hard to do as you need to limit it at the source end of your PPP link,
> not your own personal machine

What about fudging the TCP window size in ACK packets we send back? If
you want to throttle a sender, set a couple of variables in our sk_buff
for that connection. window_adjust is the amount to reduce the window by,
minimum_window is the lower limit of the adjusted window size, must be at
least 41 to avoid completely shutting the window. psuedo code

if (window_adjust && ack_window > minimum_window) {
if ((ack_window -= ack_window_adjust) < minimum_window)
ack_window = minimum_window;
fix_checksum();
}
Then have a user mode daemon that monitors incoming bandwidth every few
seconds and tweaks window_adjust in each socket to meet the local
requirements.

This would only work for the receiving machine, not for multiple machines
behind a router. However most people who need throttling either have one
machine or they are using IP masq in which case the masq box owns the
connection and can do the throttling. If it works for one machine, it
could be extended for Linux gateways to look at ACK as they are forwarded.

Alan, is tweaking the window going to mess up any of the IP timing
algorithms? It should not affect RTT because the ACK still gets sent out
on time, it just throttles the sender.


\
 
 \ /
  Last update: 2005-03-22 13:38    [from the cache]
©2003-2011 Jasper Spaans