Re: Low-priority traffic

Linux Advanced Routing and Traffic Control

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

 



On 24 Okt 2007, rasky@xxxxxxxxxxx wrote:

> Hello,

Hi,

[...]
> wondershaper.htb creates 3 HTB classes; 1:10 is high prio, 1:20 is
> bulk (default), and 1:30 is low priority. The classes are created as
> follows:
>
> ==========================================================
> tc class add dev $DEV parent 1:1 classid 1:10 htb \
> rate ${UPLINK}kbit \
> burst 6k prio 1
>
> tc class add dev $DEV parent 1:1 classid 1:20 htb \
> rate $[9*$UPLINK/10]kbit ceil ${UPLINK}kbit \
> burst 6k prio 2
>
> tc class add dev $DEV parent 1:1 classid 1:30 htb \
> rate $[1*$UPLINK/10]kbit ceil ${UPLINK}kbit \
> burst 6k prio 2
                ^
I guess you you want to have prio 3 here.
"The rule is that classes with higher priority are offered excess
bandwidth first. But rules about guaranted rate and ceil are still met."
[1]

where lower numerical prio value means higher priority
(and prio is in [0,7])

> What I would like to do is to always give priority to traffic in class
> 1:20 respect to class 1:30: basically, if there is a lot of traffic in
> class 1:20, class 1:30 shouldn't have any bandwidth allocated beside
> its minimum rate.
>
> I'll try to clarify the above paragraph with an example; let's assume
> that if I download file A from this server, the generated traffic goes
> to class 1:20; if I download file B, the traffic goes to class
> 1:30. Let's also say that UPLINK is 1Mbit/s.
>
> 0) Server does nothing.
> 1) I start downloading B. I begin downloading it a 1Mbit/s.
> 2) I then start download A while B is going. A's download totally
> steals traffic from B's download, up to its minimum rate. So, after a
> little while, I should see download B going to 10% = 100Kbit and
> download A going to 90% = 900Kbit.
> 3) I stop download B. A goes up to 1Mbit.
> 4) I apply a client-side limit to A's download. Now A goes to 600Kbit.
> 5) I start downloading B again. B cannot steal any bandwidth to A,
> but it will get all the available bandwidth. So A will stay at
> 600Kbit, and B will go at 400Kbit.
>
> I hope my explanation is clear.
>
> Wondershaper does not seem to do this. In fact, when I start
> downloading A and B, they seem to equally distribute the available
> bandwidth

bandwith of classes with same priority is AFAIR dirstributed
proportionally to (minimum) rate

> (I verified that packets really go to the respective
> classes, so it's not a filter problem). It's not clear to me how HTB
> decides to allocate the bandwidth, and what the "rate" parameter
> really means.
>
> I even tried the CBQ version of wondershaper, but I got the same
> results.
>
> Do you have any suggestion about how can I achieve my expected
> behaviour? How should I modify wondershaper?
>
> Thanks!

good documentation for htb:
[1] http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

Greetings
Jens
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux