Tuning HTB
Hi!
I'm trying to share a 64 kbits/s ISDN connection for FTP downloads and WWW. FTP should slow down WWW a little a possible.
I tried HTB (with kernel 2.4.18) with the following (amongst other) settings:
$TC qdisc add dev $IF root handle 1: htb default 20
$TC class add dev $IF parent 1: classid 1:1 htb rate 64kbit burst 2k
$TC class add dev $IF parent 1:1 classid 1:10 htb rate 63kbit ceil 64kbit
burst 2k
$TC class add dev $IF parent 1:1 classid 1:20 htb rate 1kbit ceil 64kbit
prio 1
$TC qdisc add dev $IF parent 1:10 handle 10: sfq perturb 10 $TC qdisc add dev $IF parent 1:20 handle 20: sfq perturb 10
FLT="$TC filter add dev $IF protocol ip parent 1:0" $FLT prio 1 u32 match ip sport 80 0xffff flowid 1:10
The packets pass through the respective classes. But FTP doesn't seem to be slowed down when WWW traffic starts. When doing http and ftp downloads at the same time, I expected the FTP side to slow down a lot, but during my tests the ftp download had more throughput than the http.
Any thoughts?
Thanks!
- Christian
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
The setup is OK. But you have to be sure you are the bottleneck and not the modem. You can do this by lowering the maximium to 62 (or 63, just try some numbers). That way you are slowing down the internet link, but YOU are controlling it :)
Stef
Quoted 36 lines · Christian Volk
Hi!
I'm trying to share a 64 kbits/s ISDN connection for FTP downloads and WWW. FTP should slow down WWW a little a possible.
I tried HTB (with kernel 2.4.18) with the following (amongst other) settings:
$TC qdisc add dev $IF root handle 1: htb default 20
$TC class add dev $IF parent 1: classid 1:1 htb rate 64kbit burst 2k
$TC class add dev $IF parent 1:1 classid 1:10 htb rate 63kbit ceil 64kbit
burst 2k
$TC class add dev $IF parent 1:1 classid 1:20 htb rate 1kbit ceil 64kbit
prio 1$TC qdisc add dev $IF parent 1:10 handle 10: sfq perturb 10 $TC qdisc add dev $IF parent 1:20 handle 20: sfq perturb 10
FLT="$TC filter add dev $IF protocol ip parent 1:0" $FLT prio 1 u32 match ip sport 80
0xffffflowid 1:10The packets pass through the respective classes. But FTP doesn't seem to be slowed down when WWW traffic starts. When doing http and ftp downloads at the same time, I expected the FTP side to slow down a lot, but during my tests the ftp download had more throughput than the http.
Any thoughts?
Thanks!
- Christian
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 4 lines · Stef Coene
The setup is OK. But you have to be sure you are the bottleneck and not the modem. You can do this by lowering the maximium to 62 (or 63, just try some numbers). That way you are slowing down the internet link, but YOU are controlling it :)
Thanks!
Should the 1:1 rate be set to the interface rate (10 Mbit) or the connection rate (64kbit)?
I'm currently trying:
1:1 htb rate 10 Mbit burst 12k
1:10 htb rate 50kbit ceil 62kbit burst 2k
1:20 htb rate 1kbit ceil 62kbit prio 1
Doesn't make much of a difference, ftp doesn't slow down enough to let the www page through without (or with little) delay.
I'll keep reading docs and shuffling numbers.
- Christian
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 10 lines · Christian Volk
Quoted 4 lines · Stef Coene
The setup is OK. But you have to be sure you are the bottleneck and not the modem. You can do this by lowering the maximium to 62 (or 63, just try some numbers). That way you are slowing down the internet link, but YOU are controlling it :)
Thanks!
Should the 1:1 rate be set to the interface rate (10 Mbit) or the connection rate (64kbit)?
Connection rate
Quoted 5 lines
I'm currently trying:
1:1 htb rate 10 Mbit burst 12k
1:10 htb rate 50kbit ceil 62kbit burst 2k
1:20 htb rate 1kbit ceil 62kbit prio 1
Try this :
1:1 htb rate 62kbit burst 12k
1:10 htb rate 50kbit ceil 62kbit burst 2k
1:20 htb rate 1kbit ceil 62kbit prio 1
Stef
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 4 lines · you
Try this :
1:1 htb rate 62kbit burst 12k
1:10 htb rate 50kbit ceil 62kbit burst 2k
1:20 htb rate 1kbit ceil 62kbit prio 1
Thanks for your help!
I'm now at :
1:1 htb rate 62Kbit burst 12Kb
1:10 htb rate 50Kbit ceil 62Kbit burst 7Kb
1:20 htb rate 1Kbit ceil 58Kbit
It works ok now. Lowering the ceil for :20 to 58Kbit made :10 a bit more responsive with the few space Kbits at hand.
It works best if the www data through :10 is also continuous, otherwise :20 keeps the upper hand :-).
I'd like to see :20 stay throttled longer after a package was dequeued from :10, to give the next arriving :10 package a better chance.
I'm currently trying the dcache option, maybe it'll have an influence.
- Christian
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/