[ previous ] [ next ] [ threads ]
 
 From:  Guy Boisvert <boisvert dot guy at videotron dot ca>
 Cc:  monowall <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Re: [m0n0wall] traffic shaping question
 Date:  Mon, 06 Nov 2006 23:29:08 -0500
Mark wrote:
> Hi,
>
> I have traffic shaping kinda working but i have a question.  I have a 
> 10mbit/1mbit cable connection.  I have the download pipe set to 
> 9000kbit and the upload pipe set to 900kbit.  I several rules with 
> prioritize the traffic and things work pretty good.  The problem is a 
> big download.  When someone is uploading and maxes out my 9000kbit 
> pipe, my upload speed drops way below 900kbit.

About how much is left ?
>
> I am prioritizing the ack and small packets so i guess what i am 
> seeing is that it takes alot of bw to send acks for 9000kbit worth of 
> inbound traffic?

That's exactly that!  And it is related to tcp window setting: How much 
data can be downloaded before sending an ACK.  Here, it take about 350 
Kbps to ack a 5 Mbps multi-stream download (3 simultaneous Usenet 
download connections).

>
> What can i do to fix this?
>
> I tried lowering the inbound pipe to 6000kbit but it didnt seem to help.
>
> Thanks,
> mark


There's not much you can do unless:

1) You lower the priority of the ACKs (will often translate in slower 
download)

2) You raise the TCP window size to lower the ack vs time ratio (can be 
tricky to do and can have a big impact on unreliable links)

3) You lower the allowed download bandwidth for some applications (QoS 
optimization)

4) You buy more egress bandwidth (probably not feasable in your case!)

There are only 16 bits reserved for the window size in the TCP header, 
which only allows for window sizes up to 64 kilobytes. To work around 
this limitation a special option, called the TCP window scale option, 
was introduced. This option is negotiated at the opening of the 
connection, so if the a window size of greater than 64 KB is to be 
established it must be done at connection set-up time.

And don't forget that large TCP window can translate into extremely slow 
performance if you're using a not so reliable link (end to end).  You'll 
have to choose a trade off between your choices.  That's bandwidth 
engineering!

A little traffic engineering paper (for those who have interest!):
==========================================
http://www.iro.umontreal.ca/~major/colloques/IRO-QoS.pdf



Hope this helped!

Guy Boisvert, ing.
IngTegration inc.