i have a simple set of rules to limit download speed from port 80, but when i download (using wget) that speed is broken by a factor of 56 times..
so i reckon i'm doing something wrong.
tc rules:
Code:
sudo /sbin/tc qdisc del dev ppp0 root
sudo /sbin/tc qdisc add dev ppp0 root handle 1: htb default 30
sudo /sbin/tc class add dev ppp0 parent 1: classid 1:1 htb rate 1Kbit
sudo /sbin/tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:1
wget:
Code:
wget http://ftp.au.debian.org/debian/dists/squeeze/main/binary-armel/Packages.gz
--2015-07-14 10:53:14-- http://ftp.au.debian.org/debian/dists/squeeze/main/binary-armel/Packages.gz
Resolving ftp.au.debian.org... 218.100.43.30
Connecting to ftp.au.debian.org|218.100.43.30|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8214629 (7.8M) [application/x-gzip]
Saving to: `Packages.gz'
100[======================================================================>] 8,214,629 56.8K/s in 4m 4s
2015-07-14 11:02:24 (32.8 KB/s) - `Packages.gz' saved [8214629/8214629]
i can see the rule is being triggered, it's just not limiting the speed
cbq.init stats output:
Code:
### eth0: queueing disciplines
qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 6252435 bytes 22005 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
### ppp0: queueing disciplines
qdisc htb 1: root refcnt 2 r2q 10 default 30 direct_packets_stat 182
Sent 35543 bytes 580 pkt (dropped 1781, overlimits 2670 requeues 0)
backlog 0b 2p requeues 0
### ppp0: traffic classes
class htb 1:1 root prio 0 rate 1000bit ceil 1000bit burst 1600b cburst 1600b
Sent 22238 bytes 401 pkt (dropped 1781, overlimits 0 requeues 0)
rate 936bit 2pps backlog 0b 3p requeues 0
lended: 398 borrowed: 0 giants: 0
tokens: -6997893 ctokens: -6997893
### ppp0: filtering rules
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 (rule hit 2343 success 2182)
match 00000050/0000ffff at 20 (success 2182 )
any hints ?