Determining burst/cburst HTB values

Linux Advanced Routing and Traffic Control

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

 



Hello.
 
I am wondering if the default (auto-computed) burst and cburst parameters are appropriate values for my application.
 
I have a 100 mbit interface which is connected to a 16 mbit uplink.
I am sharing this bandwidth into a set of partitions (tc classes) defined as follows:
 
                                 root class [1:1]
                                             |
                                             |
                                             |
                                             |
            ---------------------------------------------------------------------
           |                           |                                   |                            |
           |                           |                                   |                            |
           |                           |                                   |                            |
default [1:10]          part-1 [1:20]            part-2 [1:30]              part-3 [1:40]
 
My script (without filter statements) follows:
 
[root@mercury ~]# cat tc.sh
#!/bin/bash
# reset
tc qdisc del dev eth0 root
# root qdisc
tc qdisc add dev eth0 root handle 1: htb default 10
# root class
tc class add dev eth0 parent 1: classid 1:1 htb rate 16mbit
# default partition
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1mbit ceil 16mbit
tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
# partition-1
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1mbit ceil 1mbit
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
# partition-2
tc class add dev eth0 parent 1:1 classid 1:30 htb rate 256kbit ceil 256kbit
tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
# partition-3
tc class add dev eth0 parent 1:1 classid 1:40 htb rate 128kbit ceil 128kbit
tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10
 
A sample from tc -s show class dev eth0 is:
 
[root@mercury ~]# tc -s class show dev eth0
class htb 1:1 root rate 16Mbit ceil 16Mbit burst 3598b cburst 3598b
 Sent 238 bytes 3 pkts (dropped 0, overlimits 0 requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 1794 ctokens: 1794
 
class htb 1:10 parent 1:1 leaf 10: prio 0 rate 1Mbit ceil 16Mbit burst 1724b cburst 3598b
 Sent 238 bytes 3 pkts (dropped 0, overlimits 0 requeues 0)
 lended: 3 borrowed: 0 giants: 0
 tokens: 13345 ctokens: 1794
 
class htb 1:20 parent 1:1 leaf 20: prio 0 rate 1Mbit ceil 1Mbit burst 1724b cburst 1724b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 14131 ctokens: 14131
 
class htb 1:30 parent 1:1 leaf 30: prio 0 rate 256Kbit ceil 256Kbit burst 1631b cburst 1631b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 52224 ctokens: 52224
 
class htb 1:40 parent 1:1 leaf 40: prio 0 rate 128Kbit ceil 128Kbit burst 1615b cburst 1615b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 103424 ctokens: 103424
I am also graphing the 'Sent' bytes value as reported above and I noticed that the classes usually exceed the configured rates slightly.
Can be be improved by tuning the burst and/or cburst values?
 
Note that MTU is set to 1500 bytes.
 
Regards,
 
Charles
_______________________________________________
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