Marcin Kałuża
2005-May-14 21:20 UTC
Strange HFSC behavior - bug? my misconfiguration/lack of knowledge?
Hi
I''m moving to hfcs (mostly succesfuly:) ), but I''ve
encountered a strange
problem: When I download something from this server using wget (one thread)
via an idle uplink, I get no more than 130 kbit/s, and when I''m using
prozilla (or start more wgets), I get about 200 kbit, but still it''s
not all
the link can do (240) - the rest remamins unused.
Is this my fault or the qdisc? (I must tell that htb works fine - I get all
the bandwidth I can no matter how many threads I use)
I enclose my config below
---------------------------cut---------------------------
$uplink=240kbit
tc qdisc add dev imq0 root handle 1: hfsc default 1009
#main class
tc class add dev imq0 parent 1:0 classid 1:1000 hfsc ls rate $uplink \
ul rate $uplink
#default
tc class add dev imq0 parent 1:1000 classid 1:1009 hfsc ls rate 1kbit \
ul rate 10kbit
#traffic from the server
tc class add dev imq0 parent 1:1000 classid 1:1001 hfsc ls rate $uplink ul
rate $uplink
tc filter add dev imq0 parent 1: protocol ip prio 2 u32 \
match ip src $inetaddr \
flowid 1:1001
#ssh - low delaay
tc class add dev imq0 parent 1:1001 classid 1:1011 hfsc rt m1 100kbit d 15ms
m2 30kbit ls rate $uplink ul rate $uplink
tc filter add dev imq0 parent 1:1001 protocol ip prio 2 u32 match ip sport 22
0xffff flowid 1:1011
tc filter add dev imq0 parent 1:1001 protocol ip prio 2 u32 match ip dport 22
0xffff flowid 1:1011
#rest from the server
tc class add dev imq0 parent 1:1001 classid 1:1013 hfsc ls rate $uplink ul
rate $uplink
tc filter add dev imq0 parent 1:1001 protocol ip prio 3 u32 \
match ip src $inetaddr/32 \
flowid 1:1013
#lan users
tc class add dev imq0 parent 1:1000 classid 1:1002 hfsc ls rate 150kbit ul
rate 150kbit
tc filter add dev imq0 parent 1: protocol ip prio 2 u32 \
match ip src $lanaddr.0/24 \
flowid 1:1002
Andy Furniss
2005-May-16 18:50 UTC
Re: Strange HFSC behavior - bug? my misconfiguration/lack of knowledge?
Marcin Kałuża wrote:> Hi > I''m moving to hfcs (mostly succesfuly:) ), but I''ve encountered a strange > problem: When I download something from this server using wget (one thread) > via an idle uplink, I get no more than 130 kbit/s, and when I''m using > prozilla (or start more wgets), I get about 200 kbit, but still it''s not all > the link can do (240) - the rest remamins unused. > Is this my fault or the qdisc? (I must tell that htb works fine - I get all > the bandwidth I can no matter how many threads I use) > > I enclose my config below > > ---------------------------cut--------------------------- > $uplink=240kbitThis should be uplink=240kbit. As you use imq and haven''t shown the other rules I can''t tell if everythings going to the right places - can you see everythings going to the right place with tc -s class ls dev imq0. Depending on kernel version some people have had problems with imq. The hfsc parts of the script ratelimited accuratly for me. Andy.