HTB versus CBQ - comparative testing

Linux Advanced Routing and Traffic Control

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

 



Hi !

First of all i want to tell you all that i was very anctious to test HTB, as information on HTB
website led me to believe that HTB would be a much better choice than CBQ (at the current time i
use CBQ to manage the bandwidth). There are attached to this email some 4 pictures showing the
test i’ve conducted with both CBQ and HTB. Before you look at them let me describe the whole
setup:

- one server running red hat linux 8.0 with 2.4.18-14 kernel (with builtin support for HTB), one
eth, apache serving one 120 mb file for the pourpose of test downloading, ipchains & HotSaNIC for
collecting medium transfer data every 10 seconds and making the graphs as .gif images; The CBQ &
HTB lines used were created by cbq-init and htb-init scripts (the newest versions on the web)
- 2 stations acting as clients downloading the file from the server with 3 simultaneous flows
simulating this way sucking the maximum downloading speed allowed, at every point on the graphs.
- the total bandwidth is 128kbit divided equaly between the 2 client ip’s with the possibility of
borowing the unused bandwith, the queueing disciplines bounded to HTB or CBQ beeing SFQ with
perturb set to 5 seconds, and prio set to 5 each client ip
- the actual cbq setup used:
------------------------------------------------------------------------------
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 cbq bandwidth 10Mbit avpkt 1000 cell 8
tc class change dev eth0 root cbq weight 1Mbit allot 1514

tc class add dev eth0 parent 1: classid 1:20 cbq bandwidth 10Mbit rate 128Kbit weight 12Kbit prio
5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded

tc class add dev eth0 parent 1:20 classid 1:25 cbq bandwidth 10Mbit rate 64Kbit weight 6Kbit prio
5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:25 handle 25 sfq perturb 5
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.2 classid 1:25

tc class add dev eth0 parent 1:20 classid 1:30 cbq bandwidth 10Mbit rate 64Kbit weight 6Kbit prio
5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:30 handle 30 sfq perturb 5
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.3 classid 1:30
-----------------------------------------------------------------------------------
- the actual htb setup used:
-----------------------------------------------------------------------------------
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 30 r2q 6

tc class add dev eth0 parent 1: classid 1:2 htb rate 128kbit

tc class add dev eth0 parent 1:2 classid 1:10 htb rate 64kbit ceil 128kbit burst 1k prio 5
tc qdisc add dev eth0 parent 1:10 handle 10 sfq perturb 5
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.2 classid 1:10

tc class add dev eth0 parent 1:2 classid 1:20 htb rate 64kbit ceil 128kbit burst 1k prio 5
tc qdisc add dev eth0 parent 1:20 handle 20 sfq perturb 5
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.3 classid 1:20

tc class add dev eth0 parent 1:2 classid 1:30 htb rate 1000Kbit
tc qdisc add dev eth0 parent 1:30 handle 30 sfq perturb 5
-----------------------------------------------------------------------------------


As you all can see from cbq-test.gif there are 3 segments of data: first segment ip1 (black flow)
downloads at full speed; in segment 2 ip2 begins (red flow) downloading and imediately the 2
clients equalize; the last segment shows ip2 performing at full speed as ip1 stops. Comparing this
with the htb-test.gif you can easely see that CBQ switches between 1 ip and 2 ip’s downloading at
the same time almost instantly as HTB doesn’t realize for 90 seconds first time and 60 seconds the
second time, that there is no more traffic from one ip and should let the other ip perform at full
speed. Why this gap ? It’s realy frustrating ! That’s the first question. (P.S. : first i tried
the HTB test with only one downloading flow and believe me that i was amazed to discover that HTB
doesn’t think about this 60-90 seconds, but FOREVER !!!!).

The second matter shown as well on the two graphs cbq-test.gif & htb-test.gif is : when one ip
performs at full speed there are very LARGE variations of medium speed from 11 kbytes to 18 kbytes
in the HTB test compared with the CBQ test. I don’t want to get a straight wire at 16 kbytes (128
kbit – the whole bandwidth) as CBQ or any other thing cannot do that, but why is it that HTB
creates large variations compared to CBQ ? That’s the second question.

If my english is bad forgive me.....and also if i did something wrong with this setup i’ve
described.....and if so please correct me !!!!


Cristi
Iasi-Romania

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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