Re: [LARTC] CBQ only works 'bounded'

Linux Advanced Routing and Traffic Control

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

 



On Fri, Dec 07, 2001 at 02:29:59AM +0100, Patrick Nagelschmidt wrote:

> what i try to achieve with QoS is to divide my outgoing traffic in one
> high priority class and one low priority class. i have an asymetric
> connection with 768 kbit/s downstream and 128 kbit/s upstream and want to
> avoid ack-congestions by sending ack packets through the high priority
> class and normal outbound traffic through the low priority class. what
> i've done so far is the following:

Can you please try not to send 1000 character long lines? Thanks!

What you try is cool - I was just about to experiment with ACK prioritizing.
> 
> #create the root class
> tc qdisc add dev ppp0 root handle 1: cbq bandwidth 10Mbit avpkt 1000 mpu 64

You talk to your modem over a 10mbit/s interface? 

> #limit outbound traffic to 128kbit/s total
> tc class add dev ppp0 parent 1: classid 1:1 cbq bandwidth 10Mbit rate \
>    128kbit allot 1514 weight 12.8kbit prio 8 maxburst 20 avpkt 1000 \
>    bounded

Looks good.

> #create a high priority class
> tc class add dev ppp0 parent 1:1 classid 1:10 cbq bandwidth 10Mbit \
>    rate 20kbit allot 1514 weight 2.0kbit prio 1 maxburst 20 avpkt 1000

This class is unbounded right now, so it can borrow from 1:20

> #create a low priority class
> tc class add dev ppp0 parent 1:1 classid 1:20 cbq bandwidth 10Mbit \
>    rate 108kbit allot 1514 weight 10.8kbit prio 7 maxburst 20 avpkt 1000 \
>    bounded

Also looks cool.

> #use sfq for both
> tc qdisc add dev ppp0 parent 1:10 sfq quantum 1514b perturb 10
> tc qdisc add dev ppp0 parent 1:20 sfq quantum 1514b perturb 10

Yadda yadda.

> #put everything in the low priority class
> tc filter add dev ppp0 parent 1: protocol ip prio 20 u32 \
>    match u8 0x00 0x00 \
>    flowid 1:20

Fine.

> #except ack-packets (header length 0x05, total l. 0x34, ack set)
> tc filter add dev ppp0 parent 1: protocol ip prio 10 u32 \
> match ip protocol 6 0xff \
> match u8 0x05 0x0f at 0 \
> match u8 0x34 0xff at 3 \
> match u8 0x10 0xff at 33 \
> flowid 1:10

I've seen this command before!

> the good thing is that this works. of course this doesn't mean its
> error-free, so please tell me if i've done something terribly wrong.

Looks fine to me.

> if i use this configurtion and upload with ~14.5kb/s (ack's not included)
> i can still download with ~84kb/s. but what i dont understand is that the

Cool. You weren't possible to do this before?

> whole thing stops working if i remove the 'bounded' from classid 1:20. 

Ok - you can still upload and download, but the positive effect disappears?

> I thought this would release the bandwidth of 1:10 to 1:20 _only_ if 1:10
> doesn't need it. i set the prio of 1:10 to the highest value to ensure
> that if any ack-packets should be sent via 1:10 these packets get send
> first. but my download speed decreases to ~20kb/s if i upload at the same
> time. i think this indicates that ack packets have to wait behind some
> bigger data packets until they get sent. in numbers, i have with 1:20 set
> to 'bounded':

Well, CBQ isn't all *that* precise. Bandwidth is sucked out of your
interactive class for certain chunks of time, again delaying ACKs. In the
long term, bandwidth will probably be available ok for your interactive
class but downloads get hurt even if ACKs get delayed in the short term.

> now i'm curious what i have to do to make 1:10 share it's bandwidth in a
> way it doesn't ruin the whole mechanism.

I've been experimenting with HTB and it appears to be better in this
respect. Even without priorities it managed to keep latency in the
interactive class *very* low.

It may be more estethically pleasing to set 1:10 to 'isolated' instead of
declaring 1:20 'bounded', although it comes down to the same thing.

> also i would like to know what 'overactions' are and what it means (or at
> least if it is good or bad) if tc -s shows a 'backlog 15p' or similar in
> the statistic of e.g. class 1:20.

'backlog 15p' simply means that 15 packets were waiting to be transmitted at
that time. 'overactions' occur when too many packets where queueing up, the
default 'overaction' is drop.

> thanks for your help,

One thing, try reversing the priorities and removing unbounded. Just a
hunch.

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet



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