HTB

Linux Advanced Routing and Traffic Control

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

 



Hello,

I have problems with htb. The problem is that when I download
any file via shaper with htb, the traffic is very dinamic, 
it jumps, for example:
if i have set ceil = 128kbit the results that it jumps from 112kbps
to 144kbps or smth like that maybe its not very bad, but when the
traffic drops down to 40kbps or less and then after 1 or 2 seconds
jumps to 144kbps, its bad :-( and it is often.

Root class is 20Mbit
There are about 7000 classes (on two interfaces)

an example script: 

===============================================================================================
#!/bin/sh

TC="/sbin/tc"

INT_IF="eth1"
EXT_IF="eth0"

$TC qdisc del dev $INT_IF root
$TC qdisc del dev $EXT_IF root
$TC qdisc add dev $INT_IF root handle 1: htb r2q 1 default 2000 # tried default r2q
$TC qdisc add dev $EXT_IF root handle 1: htb r2q 1 default 2000

$TC class add dev $INT_IF parent 1: classid 1:1 htb quantum 60000 rate 20Mbit ceil 20Mbit
$TC class add dev $EXT_IF parent 1: classid 1:1 htb quantum 40000 rate 20Mbit ceil 20Mbit
$TC class add dev $INT_IF parent 1:1 classid 1:2000 htb quantum 1500 rate 1kbit ceil 5kbit
$TC class add dev $EXT_IF parent 1:1 classid 1:2000 htb quantum 1500 rate 1kbit ceil 5kbit
$TC qdisc add dev $INT_IF parent 1:2000 handle 2000: sfq perturb 10
$TC qdisc add dev $EXT_IF parent 1:2000 handle 2000: sfq perturb 10
$TC class add dev $INT_IF parent 1:1 classid 1:2001 htb quantum 60000 rate 682kbit ceil 2048kbit # tried to let htb itself calculate quantum, the same 
$TC class add dev $EXT_IF parent 1:1 classid 1:2001 htb quantum 60000 rate 682kbit ceil 2048kbit
$TC qdisc add dev $INT_IF parent 1:2001 handle 2001: sfq perturb 10
$TC qdisc add dev $EXT_IF parent 1:2001 handle 2001: sfq perturb 10
$TC filter add dev $INT_IF protocol ip parent 1:0 prio 1 u32 match ip dst x.x.x.x flowid 1:2001
$TC filter add dev $EXT_IF protocol ip parent 1:0 prio 1 u32 match ip src x.x.x.x flowid 1:2001
$TC class add dev $INT_IF parent 1:1 classid 1:2002 htb quantum 1500 rate 42kbit ceil 128kbit
$TC class add dev $EXT_IF parent 1:1 classid 1:2002 htb quantum 1500 rate 42kbit ceil 128kbit
$TC qdisc add dev $INT_IF parent 1:2002 handle 2002: sfq perturb 10
$TC qdisc add dev $EXT_IF parent 1:2002 handle 2002: sfq perturb 10
$TC filter add dev $INT_IF protocol ip parent 1:0 prio 1 u32 match ip dst x.x.x.x flowid 1:2002
$TC filter add dev $EXT_IF protocol ip parent 1:0 prio 1 u32 match ip src x.x.x.x flowid 1:2002

================================================================================================

linux 2.4.25
network cards: eepro100
HTB 3

Xeon 2.4GHz

Maybe I need to tune kernel, HZ or smth?

sorry for bad english 

--
Arturas
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
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