From: "CeeBoyo" Date: Tue, 16 Oct 2007 19:50:24 +0000 Subject: [LARTC] Determining burst/cburst HTB values Message-Id: <004a01c8102d$d44eb5c0$d223ad3e@ltseuneng> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1369801943==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============1369801943== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0047_01C81036.2D059C80" This is a multi-part message in MIME format. ------=_NextPart_000_0047_01C81036.2D059C80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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.=20 Can be be improved by tuning the burst and/or cburst values? Note that MTU is set to 1500 bytes. Regards, Charles ------=_NextPart_000_0047_01C81036.2D059C80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello.
 
I am wondering if the default = (auto-computed) burst=20 and cburst parameters are appropriate values for my=20 application.
 
I have a 100 mbit interface which is = connected to a=20 16 mbit uplink.
I am sharing this bandwidth into a set = of=20 partitions (tc classes) defined as follows:
 
          &nbs= p;            = ;         =20 root class [1:1]
          &nbs= p;            = ;   =20             &= nbsp;     |
          &nbs= p;     =20             &= nbsp;           &n= bsp;   |
       =20          =20             &= nbsp;           &n= bsp;  |
          &nbs= p;            = ;            =           |
          &nbs= p;=20 ---------------------------------------------------------------------
          =20 |            =             &= nbsp;=20  |           =        =20             &= nbsp;  =20 |         =20             &= nbsp;    =20 |
          =20 |            =             &= nbsp;=20  |           =        =20             &= nbsp;  =20 |         =20             &= nbsp;    =20 |
          =20 |            =             &= nbsp;=20  |           =        =20             &= nbsp;  =20 |         =20             &= nbsp;    =20 |
default = [1:10]      =20    part-1=20 [1:20]            = part-2=20 [1:30]           &= nbsp; =20 part-3 [1:40]
 
My script (without filter = statements)=20 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=20 10
# root class
tc class add dev eth0 parent 1: classid = 1:1 htb=20 rate 16mbit
# default partition
tc class add dev eth0 parent 1:1 = classid 1:10 htb=20 rate 1mbit ceil 16mbit
tc qdisc add dev eth0 parent 1:10 = handle 10: sfq=20 perturb 10
# partition-1
tc class add dev eth0 parent 1:1 = classid 1:20 htb=20 rate 1mbit ceil 1mbit
tc qdisc add dev eth0 parent 1:20 = handle 20: sfq=20 perturb 10
# partition-2
tc class add dev eth0 parent 1:1 = classid 1:30 htb=20 rate 256kbit ceil 256kbit
tc qdisc add dev eth0 parent 1:30 = handle 30: sfq=20 perturb 10
# partition-3
tc class add dev eth0 parent 1:1 = classid 1:40 htb=20 rate 128kbit ceil 128kbit
tc qdisc add dev eth0 parent 1:40 = handle 40: sfq=20 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=20 16Mbit ceil 16Mbit burst 3598b cburst 3598b
 Sent 238 bytes 3 = pkts=20 (dropped 0, overlimits 0 requeues 0)
 lended: 0 borrowed: 0 = giants:=20 0
 tokens: 1794 ctokens: 1794
 
class htb 1:10 parent 1:1 leaf 10: prio 0 rate 1Mbit ceil 16Mbit = burst=20 1724b cburst 3598b
 Sent 238 bytes 3 pkts (dropped 0, overlimits = 0=20 requeues 0)
 lended: 3 borrowed: 0 giants: 0
 tokens: = 13345=20 ctokens: 1794
 
class htb 1:20 parent 1:1 leaf 20: prio 0 rate 1Mbit ceil 1Mbit = burst 1724b=20 cburst 1724b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 = requeues=20 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 14131 = ctokens:=20 14131
 
class htb 1:30 parent 1:1 leaf 30: prio 0 rate 256Kbit ceil 256Kbit = burst=20 1631b cburst 1631b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 = requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: = 52224=20 ctokens: 52224
 
class htb 1:40 parent 1:1 leaf 40: prio 0 rate 128Kbit ceil 128Kbit = burst=20 1615b cburst 1615b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 = requeues 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: = 103424=20 ctokens: 103424
I am also graphing the 'Sent' bytes value as reported above and I = noticed=20 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
------=_NextPart_000_0047_01C81036.2D059C80-- --===============1369801943== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1369801943==--