Linux tc cbq shaping at high speed

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

 



Dear all,

I try to use TC CBQ to prioritise two classes of traffic (say premium
and best effort) into an aggregate trunk of limited size (i.e. less than
the physical link speed). The CBQ function works fine if the aggregate
bandwidth is under 200Mbps. If the aggregate bandwidth is set higher,
say, 300Mbit, both classes of traffic would be sent out without rate
limiting.

Is this related to the HZ value of kernel? I have already set the HZ
value to be 1024. Or should I use something rather than CBQ for the job
(e.g. HTB)? Any comments/suggestions are much appreciated...

Please see below for details...

Best Regards,
Jonathan

TC script:

aggregate_bw=200Mbit or 300Mbit
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 1000Mbit avpkt 1516
allot 1514
# rate limit the aggregate
tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 1000Mbit rate
$aggregate_bw weight 20Mbit prio 1 allot 1514 maxburst 20 avpkt 1516
bounded isolated
# premium traffic
tc class add dev eth2 parent 1:1 classid 1:2 cbq bandwidth $aggregate_bw
rate $aggregate_bw weight 20Mbit prio 2 allot 1514 maxburst 20 avpkt
1516
tc qdisc add dev eth2 parent 1:2 pfifo limit 2
tc filter add dev eth2 parent 1:0 protocol all prio 1 u32 match u32
0x00000a00 0x00000e00 at 0 classid 1:2
# best effort traffic (I set the rate to be small and let it borrow
traffic from premium traffic)
tc class add dev eth2 parent 1:1 classid 1:3 cbq bandwidth $aggregate_bw
rate 12Kbit weight 1Kbit prio 8 allot 1514 maxburst 20 avpkt 1516
tc qdisc add dev eth2 parent 1:3 pfifo limit 20
tc filter add dev eth2 parent 1:0 protocol all prio 1 u32 match u32
0x00000000 0x00000e00 at 0 classid 1:3

Linux platform:

Hardware: P4 2.8GHz 256M RAM
Linux distribution: Fedora Core 1 (kernel 2.4.22)
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux