From mboxrd@z Thu Jan 1 00:00:00 1970 From: sava cristian Date: Thu, 17 Oct 2002 11:25:40 +0000 Subject: [LARTC] HTB versus CBQ - comparative testing Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi ! First of all i want to tell you all that i was very anctious to test HTB, a= s 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 p= ictures showing the test i=92ve 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, i= pchains & 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 ve= rsions 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=92s= with the possibility of borowing the unused bandwith, the queueing disciplines bounded to HTB or CB= Q 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 128K= bit 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 64= Kbit 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 64= Kbit 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 se= gment 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 ip= 1 stops. Comparing this with the htb-test.gif you can easely see that CBQ switches between 1 ip and= 2 ip=92s downloading at the same time almost instantly as HTB doesn=92t realize for 90 seconds firs= t time and 60 seconds the second time, that there is no more traffic from one ip and should let the o= ther ip perform at full speed. Why this gap ? It=92s realy frustrating ! That=92s the first questio= n. (P.S. : first i tried the HTB test with only one downloading flow and believe me that i was amaze= d to discover that HTB doesn=92t think about this 60-90 seconds, but FOREVER !!!!). The second matter shown as well on the two graphs cbq-test.gif & htb-test.g= if 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=92t want to get a straigh= t wire at 16 kbytes (128 kbit =96 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=92s the second question. If my english is bad forgive me.....and also if i did something wrong with = this setup i=92ve 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/