Hi,
I am using wshaper.htb from wondershaper 1.1a on 2.4.18 with htb2.
I have an adsl (german telekom) 128/768 line. I want to be able to play
quake3 all the time without lag, even when there are heavy uploads going on.
I decided to use the fwmark method, then my line is not influenced at all by
other minimize-delay TOS programs.
So I put marked all quake packets (-p udp --dport 20000:35000 -J
MARK --set-mark 1).
Here you go:
-----------------------------------------------------------
DOWNLINK=2300
UPLINK=2300
DEV=eth0
# install root HTB, point default traffic to 1:20:
tc qdisc add dev $DEV root handle 1: htb default 20
# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit \
burst 6k
# high prio class 1:10:
tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \
burst 6k prio 1
# bulk & default class 1:20 - gets slightly less traffic,
# and a lower priority:
tc class add dev $DEV parent 1:1 classid 1:20 htb \
rate $[9*$UPLINK/10]kbit burst 6k prio 2
# all get Stochastic Fairness:
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
# filters: quake and ping
tc filter add dev $DEV parent 1:0 protocol ip prio 1 handle 1 fw \
flowid 1:10
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip protocol 1 0xff flowid 1:10
-----------------------------------------------------------
So far, so good.
The only problem I have is that, if I dont play quake, all the normal
traffic gets only 90% of my line speed ($[9*$UPLINK/10] kbit). But I want
that traffic to get 100%, but only if I dont play).
Ok, then i modified the 1:20 class to have a ceil statement:
-----------------------------------------------------------
tc class add dev $DEV parent 1:1 classid 1:20 htb \
rate $[9*$UPLINK/10]kbit ceil ${UPLINK}kbit \
burst 6k prio 2
-----------------------------------------------------------
In theorie everything should be fine now, 1:20 gets the whole line as long
as 1:10 doesn''t need any bandwidth.
Problem: I have lag in quake!
So what do you guys think?
Is there any way to limit 1:20 to exactly 90% uplink, as soon as 1:10 has
activity < 10% uplink? Then quake should have enough spare bandwidth. I
tried lower burst settings without luck.
Thanks for your help.
Greetings,
Bjoern