Has anybody used HTB?
Until now I've been using HTB instead of CBQ and it worked quite
good. I try now to prio ICMP and SSHwith the following:
tc_htb qdisc add dev eth1 root handle 1: htb default 10
# total #78Kbytes tc class add dev eth1 parent 1: classid 1:1 htb rate 76kbps ceil 78kbps burst 2k
#50Kbytes
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 48kbps ceil
76kbps burst 2k
#PRIO as qdisk for this slice
tc qdisc add dev eth1 parent 1:10 handle 100: prio
#I try to avoid a situation where a "massive" ping would disrupt
everything else
tc qdisc add dev eth1 parent 100:1 handle 101 tbf rate 8kbps
latency 1500ms burst 1540
#The second band (probably HTTP) shouldn't eat everything from FTP
which should be tc filtered in band 3...
tc qdisc add dev eth1 parent 100:2 handle 102:1 htb default 100221
tc class add dev eth1 parent 102:1 classid 1002:1 htb rate 40kbps
ceil 76kbps burst 2k
... and the last line gives me an error: RTNETLINK answers: Invalid
argument. Why?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Your setup doesn't make much sense. Two htbs can be done but there is no benefit.
tc qdisc add dev eth1 parent 100:2 handle 102:1 is wrong because each qdisc handle takes form X:0 not X:1 ... devik
Quoted 26 lines · eth
Until now I've been using HTB instead of CBQ and it worked quite
good. I try now to prio ICMP and SSHwith the following:
tc_htbqdisc add dev eth1 root handle 1: htb default 10# total #78Kbytes tc class add dev eth1 parent 1: classid 1:1 htb rate 76kbps ceil 78kbps burst 2k#50Kbytes
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 48kbps ceil
76kbps burst 2k
#PRIO as qdisk for this slice
tc qdisc add dev eth1 parent 1:10 handle 100: prio
#I try to avoid a situation where a "massive" ping would disrupt
everything else
tc qdisc add dev eth1 parent 100:1 handle 101 tbf rate 8kbps
latency 1500ms burst 1540
#The second band (probably HTTP) shouldn't eat everything from FTP
which should be tc filtered in band 3...
tc qdisc add dev eth1 parent 100:2 handle 102:1 htb default 100221tc class add dev eth1 parent 102:1 classid 1002:1 htb rate 40kbps
ceil 76kbps burst 2k
Quoted 8 lines
... and the last line gives me an error: RTNETLINK answers: Invalid
argument. Why?_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 3 lines · Martin Devera
Your setup doesn't make much sense. Two htbs can be done but there is no benefit.
Well... what I'm trying to do is to get a 50Kbytes/s slice in which ICMP and ssh should work perceptible faster than other and, below, http should work perceptible faster than the rest. I try to put the first htb for the 50K overall limit and then make PRIO as qdisc for the first htb. Each of the bands from this PRIO should have some form of limitting and I thought htb would do nice here to. In my view (everybody, please correct me if I'm wrong...) there should be some form of upper limit for the bands of PRIO so I can avoid the sittuation where e.g. 15 machines start to ping so the PRIO's band 0 is always full and no other traffic works...
Quoted 4 lines
tc qdisc add dev eth1 parent 100:2 handle 102:1 is wrong because each qdisc handle takes form X:0 not X:1 ... devik
Thanks, I'll try it. :)
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
you can use one htb here like:
root (your full link, rateÎil%6k)
\
ssh+icmp leaf (prio=0 ratePk ceil%6k) http leaf (prio=1 rate0k ceil%6k)
other leaf (prio=2 rate0k ceil%6k)
This is only example - I don't remember correct numbers you want. In above ssh+icmp will go always first as long as they are under 50k, then http is priorized as long as it is in 100k limit ....
devik
Quoted 16 lines · eth
Quoted 3 lines · Martin Devera
Your setup doesn't make much sense. Two htbs can be done but there is no benefit.
Well... what I'm trying to do is to get a 50Kbytes/s slice in which ICMP and ssh should work perceptible faster than other and, below, http should work perceptible faster than the rest. I try to put the first htb for the 50K overall limit and then make PRIO as qdisc for the first htb. Each of the bands from this PRIO should have some form of limitting and I thought htb would do nice here to. In my view (everybody, please correct me if I'm wrong...) there should be some form of upper limit for the bands of PRIO so I can avoid the sittuation where e.g. 15 machines start to ping so the PRIO's band 0 is always full and no other traffic works...
Quoted 8 lines
Quoted 4 lines
tc qdisc add dev eth1 parent 100:2 handle 102:1 is wrong because each qdisc handle takes form X:0 not X:1 ... devik
Thanks, I'll try it. :)
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 8 lines · Martin Devera
you can use one htb here like:
root (your full link, rateÎil%6k)
\
ssh+icmp leaf (prio=0 ratePk ceil%6k)
http leaf (prio=1 rate0k ceil%6k)
other leaf (prio=2 rate0k ceil%6k)
Quoted 5 lines
This is only example - I don't remember correct numbers you want. In above ssh+icmp will go always first as long as they are under 50k, then http is priorized as long as it is in 100k limit ....
My first attempt was close to your example, like this:
tc class add dev eth1 parent 1:0 classid 1:1 htb rate 626kbit ceil 628kbit burst 2k
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 388kbit ceil 400kbit burst 2k
tc class add dev eth1 parent 1:10 classid 1:110 htb rate 32kbit ceil
32kbit burst 2k prio 1
tc qdisc add dev eth1 parent 1:110 handle 10:0 pfifo limit 10
tc class add dev eth1 parent 1:10 classid 1:120 htb rate 32kbit ceil
400kbit burst 2k prio 2
tc qdisc add dev eth1 parent 1:120 handle 12:0 sfq perturb 10
tc class add dev eth1 parent 1:10 classid 1:130 htb rate 112kbit ceil
400kbit burst 2k prio 3
tc qdisc add dev eth1 parent 1:130 handle 13:0 sfq perturb 10
I've tc-ed ICMP to be 1:110, ssh to be 1:120 and the rest 1:130. Guess what? Look at the following example, you can notice that although ICMP should be the highest prio, sometimes it's not. Maybe I've made, again, some mistakes or maybe prio from HTB needs more tuning... :)
64 bytes from 192.168.1.64: icmp_seq676 ttl7 timeh2 usec 64 bytes from 192.168.1.64: icmp_seq677 ttl7 timeh2 usec 64 bytes from 192.168.1.64: icmp_seq678 ttl7 timeh5 usec 64 bytes from 192.168.1.64: icmp_seq679 ttl7 timeh5 usec 64 bytes from 192.168.1.64: icmp_seq680 ttl7 timeq3 usec 64 bytes from 192.168.1.64: icmp_seq681 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq682 ttl7 timef5 usec 64 bytes from 192.168.1.64: icmp_seq683 ttl7 timee5 usec 64 bytes from 192.168.1.64: icmp_seq684 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq685 ttl7 timeg3 usec 64 bytes from 192.168.1.64: icmp_seq686 ttl7 timeh9 usec 64 bytes from 192.168.1.64: icmp_seq687 ttl7 timeq2 usec 64 bytes from 192.168.1.64: icmp_seq688 ttl7 timeq4 usec 64 bytes from 192.168.1.64: icmp_seq689 ttl7 time=1.410 msec 64 bytes from 192.168.1.64: icmp_seq690 ttl7 timeq1 usec 64 bytes from 192.168.1.64: icmp_seq691 ttl7 timei0 usec 64 bytes from 192.168.1.64: icmp_seq692 ttl7 timeh7 usec 64 bytes from 192.168.1.64: icmp_seq693 ttl7 timeh9 usec 64 bytes from 192.168.1.64: icmp_seq694 ttl7 timeh9 usec 64 bytes from 192.168.1.64: icmp_seq695 ttl7 timeq2 usec 64 bytes from 192.168.1.64: icmp_seq696 ttl7 time=1.487 msec 64 bytes from 192.168.1.64: icmp_seq697 ttl7 timeh5 usec 64 bytes from 192.168.1.64: icmp_seq698 ttl7 timef9 usec 64 bytes from 192.168.1.64: icmp_seq699 ttl7 timeh4 usec 64 bytes from 192.168.1.64: icmp_seq700 ttl7 timeg6 usec 64 bytes from 192.168.1.64: icmp_seq701 ttl7 timef0 usec 64 bytes from 192.168.1.64: icmp_seq702 ttl7 timeq5 usec 64 bytes from 192.168.1.64: icmp_seq703 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq`704 ttl7 timep2 usec
64 bytes from 192.168.1.64: icmp_seq`705 ttl7 timep5 usec <---
From now on I start and stop 4 ftp transfers
64 bytes from 192.168.1.64: icmp_seq706 ttl7 time=1.554 msec 64 bytes from 192.168.1.64: icmp_seq707 ttl7 timei0 usec 64 bytes from 192.168.1.64: icmp_seq708 ttl7 time=4.287 msec 64 bytes from 192.168.1.64: icmp_seq709 ttl7 time=1.491 msec 64 bytes from 192.168.1.64: icmp_seq710 ttl7 time=3.105 msec 64 bytes from 192.168.1.64: icmp_seq711 ttl7 timei0 usec 64 bytes from 192.168.1.64: icmp_seq712 ttl7 time=1.461 msec 64 bytes from 192.168.1.64: icmp_seq713 ttl7 timeh6 usec 64 bytes from 192.168.1.64: icmp_seq714 ttl7 time=1.481 msec 64 bytes from 192.168.1.64: icmp_seq715 ttl7 time=1.415 msec <-- I stop playing with ftp and let them flow
64 bytes from 192.168.1.64: icmp_seq716 ttl7 time=1.295 msec 64 bytes from 192.168.1.64: icmp_seq717 ttl7 timeq3 usec 64 bytes from 192.168.1.64: icmp_seq718 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq719 ttl7 timee2 usec 64 bytes from 192.168.1.64: icmp_seq720 ttl7 time’1 usec 64 bytes from 192.168.1.64: icmp_seq721 ttl7 time‚8 usec 64 bytes from 192.168.1.64: icmp_seq722 ttl7 timeg1 usec 64 bytes from 192.168.1.64: icmp_seq723 ttl7 timeh4 usec 64 bytes from 192.168.1.64: icmp_seq724 ttl7 timeq6 usec 64 bytes from 192.168.1.64: icmp_seq725 ttl7 timeq7 usec 64 bytes from 192.168.1.64: icmp_seq726 ttl7 timeg0 usec 64 bytes from 192.168.1.64: icmp_seq727 ttl7 timeh1 usec 64 bytes from 192.168.1.64: icmp_seq728 ttl7 timei5 usec 64 bytes from 192.168.1.64: icmp_seq729 ttl7 timeh0 usec 64 bytes from 192.168.1.64: icmp_seq730 ttl7 time=1.416 msec 64 bytes from 192.168.1.64: icmp_seq731 ttl7 timeq3 usec 64 bytes from 192.168.1.64: icmp_seq732 ttl7 timei5 usec 64 bytes from 192.168.1.64: icmp_seq733 ttl7 timei1 usec 64 bytes from 192.168.1.64: icmp_seq734 ttl7 timeg5 usec 64 bytes from 192.168.1.64: icmp_seq735 ttl7 timex2 usec 64 bytes from 192.168.1.64: icmp_seq736 ttl7 timef2 usec 64 bytes from 192.168.1.64: icmp_seq737 ttl7 timef0 usec 64 bytes from 192.168.1.64: icmp_seq738 ttl7 timef2 usec 64 bytes from 192.168.1.64: icmp_seq739 ttl7 timeq1 usec 64 bytes from 192.168.1.64: icmp_seq740 ttl7 timeh4 usec 64 bytes from 192.168.1.64: icmp_seq741 ttl7 timeh1 usec 64 bytes from 192.168.1.64: icmp_seq742 ttl7 timeg5 usec 64 bytes from 192.168.1.64: icmp_seq743 ttl7 timef9 usec 64 bytes from 192.168.1.64: icmp_seq744 ttl7 timeg2 usec 64 bytes from 192.168.1.64: icmp_seq745 ttl7 time=1.454 msec
You can see that every once and then prio from HTB misses some prio
as long as lower traffic is constant in terms of number of connections; I can testify too that the traffic to the shaped class is still smoth; HTB has some problems when starting and stopping connections, watch my notice above. The listing above made me attempt to make a htb root and from there a PRIO with it's default 3 bands and each of then limited with HTBs... I quit after it looks like HTB doesn't like being a leaf of a PRIO's band. I've made the correction you suggested in the last mail but they were of no use. OTOH root HTB with PRIO and TBF on each leaf would make the band 0 *REALLY* prio, I'm sorry I don't have the listing with ICMP's you'll have to take my word for it ;-). Still in the second case (PRIO+TBF) FTP on the lower bands was very poor distributed in terms of who gets what amount of traffic; plus it was exactly like I thought, if you start 10 pings you drown the other bands... dilema!
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines
I've tc-ed ICMP to be 1:110, ssh to be 1:120 and the rest 1:130. Guess what? Look at the following example, you can notice that although ICMP should be the highest prio, sometimes it's not. Maybe I've made, again, some mistakes or maybe prio from HTB needs more tuning... :)
It is possible. On what hw you did the test ? 10Mbit eth ? If yes then there is possible to have approx 2ms jitter in delay because you can go in when large FTP packet is already in transit.
You can try to do hierarchy of htb/prio/htb but from my side of view I'd rather repair htb's priorization if there is bug ;)
devik
Quoted 74 lines
64 bytes from 192.168.1.64:
icmp_seq676 ttl7 timeh2 usec 64 bytes from 192.168.1.64: icmp_seq677 ttl7 timeh2 usec 64 bytes from 192.168.1.64:icmp_seq678 ttl7 timeh5 usec 64 bytes from 192.168.1.64: icmp_seq679 ttl7 timeh5 usec 64 bytes from 192.168.1.64:icmp_seq680 ttl7 timeq3 usec 64 bytes from 192.168.1.64: icmp_seq681 ttl7 timeh8 usec 64 bytes from 192.168.1.64:icmp_seq682 ttl7 timef5 usec 64 bytes from 192.168.1.64: icmp_seq683 ttl7 timee5 usec 64 bytes from 192.168.1.64:icmp_seq684 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq685 ttl7 timeg3 usec 64 bytes from 192.168.1.64:icmp_seq686 ttl7 timeh9 usec 64 bytes from 192.168.1.64: icmp_seq687 ttl7 timeq2 usec 64 bytes from 192.168.1.64:icmp_seq688 ttl7 timeq4 usec 64 bytes from 192.168.1.64: icmp_seq689 ttl7 time=1.410 msec 64 bytes from 192.168.1.64:icmp_seq690 ttl7 timeq1 usec 64 bytes from 192.168.1.64: icmp_seq691 ttl7 timei0 usec 64 bytes from 192.168.1.64:icmp_seq692 ttl7 timeh7 usec 64 bytes from 192.168.1.64: icmp_seq693 ttl7 timeh9 usec 64 bytes from 192.168.1.64:icmp_seq694 ttl7 timeh9 usec 64 bytes from 192.168.1.64: icmp_seq695 ttl7 timeq2 usec 64 bytes from 192.168.1.64:icmp_seq696 ttl7 time=1.487 msec 64 bytes from 192.168.1.64: icmp_seq697 ttl7 timeh5 usec 64 bytes from 192.168.1.64:icmp_seq698 ttl7 timef9 usec 64 bytes from 192.168.1.64: icmp_seq699 ttl7 timeh4 usec 64 bytes from 192.168.1.64:icmp_seq700 ttl7 timeg6 usec 64 bytes from 192.168.1.64: icmp_seq701 ttl7 timef0 usec 64 bytes from 192.168.1.64:icmp_seq702 ttl7 timeq5 usec 64 bytes from 192.168.1.64: icmp_seq703 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq`704 ttl7 timep2 usec
64 bytes from 192.168.1.64: icmp_seq`705 ttl7 timep5 usec <---
From now on I start and stop 4 ftp transfers
64 bytes from 192.168.1.64:icmp_seq706 ttl7 time=1.554 msec 64 bytes from 192.168.1.64: icmp_seq707 ttl7 timei0 usec 64 bytes from 192.168.1.64:icmp_seq708 ttl7 time=4.287 msec 64 bytes from 192.168.1.64: icmp_seq709 ttl7 time=1.491 msec 64 bytes from 192.168.1.64:icmp_seq710 ttl7 time=3.105 msec 64 bytes from 192.168.1.64: icmp_seq711 ttl7 timei0 usec 64 bytes from 192.168.1.64:icmp_seq712 ttl7 time=1.461 msec 64 bytes from 192.168.1.64: icmp_seq713 ttl7 timeh6 usec 64 bytes from 192.168.1.64:icmp_seq714 ttl7 time=1.481 msec 64 bytes from 192.168.1.64: icmp_seq715 ttl7 time=1.415 msec <-- I stop playing with ftp and let them flow
64 bytes from 192.168.1.64:icmp_seq716 ttl7 time=1.295 msec 64 bytes from 192.168.1.64: icmp_seq717 ttl7 timeq3 usec 64 bytes from 192.168.1.64:icmp_seq718 ttl7 timeh8 usec 64 bytes from 192.168.1.64: icmp_seq719 ttl7 timee2 usec 64 bytes from 192.168.1.64:icmp_seq720 ttl7 time’1 usec 64 bytes from 192.168.1.64: icmp_seq721 ttl7 time‚8 usec 64 bytes from 192.168.1.64:icmp_seq722 ttl7 timeg1 usec 64 bytes from 192.168.1.64: icmp_seq723 ttl7 timeh4 usec 64 bytes from 192.168.1.64:icmp_seq724 ttl7 timeq6 usec 64 bytes from 192.168.1.64: icmp_seq725 ttl7 timeq7 usec 64 bytes from 192.168.1.64:icmp_seq726 ttl7 timeg0 usec 64 bytes from 192.168.1.64: icmp_seq727 ttl7 timeh1 usec 64 bytes from 192.168.1.64:icmp_seq728 ttl7 timei5 usec 64 bytes from 192.168.1.64: icmp_seq729 ttl7 timeh0 usec 64 bytes from 192.168.1.64:icmp_seq730 ttl7 time=1.416 msec 64 bytes from 192.168.1.64: icmp_seq731 ttl7 timeq3 usec 64 bytes from 192.168.1.64:icmp_seq732 ttl7 timei5 usec 64 bytes from 192.168.1.64: icmp_seq733 ttl7 timei1 usec 64 bytes from 192.168.1.64:icmp_seq734 ttl7 timeg5 usec 64 bytes from 192.168.1.64: icmp_seq735 ttl7 timex2 usec 64 bytes from 192.168.1.64:icmp_seq736 ttl7 timef2 usec 64 bytes from 192.168.1.64: icmp_seq737 ttl7 timef0 usec 64 bytes from 192.168.1.64:icmp_seq738 ttl7 timef2 usec 64 bytes from 192.168.1.64: icmp_seq739 ttl7 timeq1 usec 64 bytes from 192.168.1.64:icmp_seq740 ttl7 timeh4 usec 64 bytes from 192.168.1.64: icmp_seq741 ttl7 timeh1 usec 64 bytes from 192.168.1.64:icmp_seq742 ttl7 timeg5 usec 64 bytes from 192.168.1.64: icmp_seq743 ttl7 timef9 usec 64 bytes from 192.168.1.64:icmp_seq744 ttl7 timeg2 usec 64 bytes from 192.168.1.64: icmp_seq745 ttl7 time=1.454 msec
Quoted 19 lines
You can see that every once and then prio from HTB misses some prio
as long as lower traffic is constant in terms of number of connections; I can testify too that the traffic to the shaped class is still smoth; HTB has some problems when starting and stopping connections, watch my notice above. The listing above made me attempt to make a htb root and from there a PRIO with it's default 3 bands and each of then limited with HTBs... I quit after it looks like HTB doesn't like being a leaf of a PRIO's band. I've made the correction you suggested in the last mail but they were of no use. OTOH root HTB with PRIO and TBF on each leaf would make the band 0 *REALLY* prio, I'm sorry I don't have the listing with ICMP's you'll have to take my word for it ;-). Still in the second case (PRIO+TBF) FTP on the lower bands was very poor distributed in terms of who gets what amount of traffic; plus it was exactly like I thought, if you start 10 pings you drown the other bands... dilema!
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Martin Devera wrote:<br>
<blockquote type="cite" cite="mid:[email protected]">
<blockquote type="cite">
<pre wrap="">I've tc-ed ICMP to be 1:110, ssh to be 1:120 and the rest 1:130. Guess <br>what? Look at the following example, you can notice that although ICMP <br>should be the highest prio, sometimes it's not. Maybe I've made, again, <br>some mistakes or maybe prio from HTB needs more tuning... :)<br></pre> </blockquote>
<pre wrap=""><!----><br>It is possible. On what hw you did the test ? 10Mbit eth ? If yes then<br>there is possible to have approx 2ms jitter in delay because you can<br>go in when large FTP packet is already in transit.</pre>
</blockquote>
You guessed right, I was on 10Mbit ethernet. Then again, how did PRIO managed
to make it happen?<br>
<br>
Wait a second. Can't we... I mean you... make a decision to stop sending the pending packet if something more important has just arrived? I guess not... giving a seconf thought it's like once the driver has "spited" the bytes in the NIC's hardware buffer they're gone for good... unless there is a standard in the kernel to say "Stop now nomatter what".<br>
<br>
If things are like you say the smaller the MTU the smaller the effect, right?<br>
<blockquote type="cite" cite="mid:[email protected]">
<pre wrap="">You can try to do hierarchy of htb/prio/htb but from my side of view<br>I'd rather repair htb's priorization if there is bug ;)<br></pre> </blockquote>
Well... it'll be nice to have an htb option with 0 to 9 with 0 being the
most draconian in terms of prio and lousy in terms of bucketing and 9 the
oposite. But again I'm not in your's shoes... ;-)<br>
<br>
</body>
</html>_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/