Re: Setting max latency on classful qdiscs

Linux Advanced Routing and Traffic Control

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

 



Leigh Sharpe wrote:
Hi All,
 I'm using HTB to shape traffic, a little like this:
tc qdisc add dev eth2 root handle 1:0 htb
tc qdisc add dev eth3 root handle 1:0 htb

tc filter add dev eth2 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 tc filter add dev eth3 parent 1: protocol 0x8100 prio 5 u32 match u16 3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 tc class add dev eth2 parent 1:0 classid 1:1 htb rate 2000Kbit ceil 2000Kbit tc class add dev eth3 parent 1:0 classid 1:1 htb rate 2000Kbit ceil 2000Kbit
tc qdisc add dev eth2 parent 1:1 handle 2: htb
tc qdisc add dev eth3 parent 1:1 handle 2: htb

Do you really need nested htb - I know it's allowed, but thought it was not really meant for normal use.

tc class add dev eth2 parent 2:0 classid 2:1 htb rate 2000Kbit
tc class add dev eth3 parent 2:0 classid 2:1 htb rate 2000Kbit

tc filter add dev eth2 parent 2:0 protocol 0x8100 prio 2 u32 match u16
3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000 tc filter add dev eth3 parent 2:0 protocol 0x8100 prio 2 u32 match u16 3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000 This essentially provides a 2mbit/s rate limit on each of eth2 and eth3.
However, when I attempt to put more than 2mbps through it, It gets quite
latent (I end up with >1second latency at times). Is there any way of
specifying the maximum latency on a HTB class or qdisc? Or CBQ, for that
matter? I need to use a classful qdisc, so tbf is out of the question.
Ideally, I want to be able to specify that packets get dropped if they
are in the queue for any longer than a specified period of time.
Any ideas?

The default pfifo length is picked up from the txqueuelen on the device.

If you want to control queuelengths per class just add sfq/[p|b]fifo and use the limit parameter.

As for latency - if you are shaping then you could consider trying to separate bulk from interactive and give interactive priority. You could just use qlen or sfq, but that's really meant for bulk.

Policing down will give the best latency. I am glad my ISP polices rather than buffers when it's peak time. The policers need to be per customer though.

Andy.


_______________________________________________
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