Hi,
I am confused about configuring QoS.
I’ve started creating a very simple setup :
| Downlink speed (kbit/sec): | 90000 | |
|---|---|---|
| Uplink speed (kbit/sec): | 90000 |
And
Class: 111
| Interface | Class | Priority | Guaranteed bandwidth | Maximum bandwidth | Burst | Ceil Burst | TOS | Action |
|---|---|---|---|---|---|---|---|---|
| red0 | 111 | 6 | 1 | 500000 | ||||
| undefined | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| Remark: | Queueing: | |
|---|---|---|
| Port-Rule: | (tcp) | |
| undefined | ---- | ---- |
| Port-Rule: | (tcp) | Destination Port: 80 |
|---|
| Port-Rule: | (udp) | Destination Port: 443 |
|---|
| Port-Rule: | (udp) | Destination Port: 80 |
|---|
Class: 211
| Interface | Class | Priority | Guaranteed bandwidth | Maximum bandwidth | Burst | Ceil Burst | TOS | Action |
|---|---|---|---|---|---|---|---|---|
| imq0 | 211 | 6 | 1 | 500000 | ||||
| undefined | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| Remark: | Queueing: | |
|---|---|---|
| Port-Rule: | (tcp) | Source port: 443 |
| undefined | ---- | ---- |
| Port-Rule: | (tcp) | Source port: 80 |
|---|
| Port-Rule: | (udp) | Source port: 443 |
|---|
| Port-Rule: | (udp) | Source port: 80 |
|---|
(I plan to add other class later)
(also note that the uplink/downlink speed is on purpose way too low for testing purpose)
I activate QoS and do a little speedtest from www.speedtest.net :
Download Mbps
943.85
Upload Mbps
809.07
Which is way above what it should be, as I should be limited to the configured link speed and the class I set up.
Here is the QoS status from ipfire webui :
[qdisc]
qdisc htb 1: root refcnt 2 r2q 10 default 0x110 direct_packets_stat 2829982 direct_qlen 1000
Sent 3397130563 bytes 4173094 pkt (dropped 0, overlimits 751 requeues 5)
backlog 0b 0p requeues 5
qdisc cake 111: parent 1:111 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms atm overhead 48
Sent 5445563 bytes 60539 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
memory used: 76231b of 15140Kb
capacity estimate: 0bit
min/max network layer size: 40 / 1500
min/max overhead-adjusted size: 106 / 1749
average network hdr offset: 14
Bulk Best Effort Voice
thresh 0bit 0bit 0bit
target 5ms 5ms 5ms
interval 100ms 100ms 100ms
pk_delay 0us 177us 0us
av_delay 0us 15us 0us
sp_delay 0us 2us 0us
backlog 0b 0b 0b
pkts 0 60539 0
bytes 0 5445563 0
way_inds 0 230 0
way_miss 0 260 0
way_cols 0 0 0
drops 0 0 0
marks 0 0 0
ack_drop 0 0 0
sp_flows 0 0 0
bk_flows 0 1 0
un_flows 0 0 0
max_len 0 23264 0
quantum 1514 1514 1514
qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 3802840240 bytes 3483797 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc htb 2: root refcnt 2 r2q 10 default 0x210 direct_packets_stat 1376257 direct_qlen 32
Sent 3933761567 bytes 3483676 pkt (dropped 121, overlimits 111628 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 211: parent 2:211 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms atm overhead 48
Sent 164819410 bytes 116715 pkt (dropped 121, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
memory used: 588084b of 15140Kb
capacity estimate: 0bit
min/max network layer size: 46 / 1500
min/max overhead-adjusted size: 106 / 1749
average network hdr offset: 14
Bulk Best Effort Voice
thresh 0bit 0bit 0bit
target 5ms 5ms 5ms
interval 100ms 100ms 100ms
pk_delay 0us 447us 0us
av_delay 0us 55us 0us
sp_delay 0us 3us 0us
backlog 0b 0b 0b
pkts 0 116836 0
bytes 0 164993669 0
way_inds 0 65 0
way_miss 0 267 0
way_cols 0 0 0
drops 0 121 0
marks 0 0 0
ack_drop 0 0 0
sp_flows 0 1 0
bk_flows 0 1 0
un_flows 0 0 0
max_len 0 51054 0
quantum 1514 1514 1514
[class]
class htb 1:111 parent 1:1 leaf 111: prio 6 rate 1Kbit ceil 500Mbit burst 1600b cburst 1600b
Sent 5445563 bytes 60539 pkt (dropped 0, overlimits 103 requeues 0)
backlog 0b 0p requeues 0
lended: 655 borrowed: 59884 giants: 0
tokens: -242125 ctokens: 377
class htb 1:1 root rate 90Mbit ceil 90Mbit burst 1600b cburst 1600b
Sent 5445563 bytes 60539 pkt (dropped 0, overlimits 648 requeues 0)
backlog 0b 0p requeues 0
lended: 59884 borrowed: 0 giants: 0
tokens: 2099 ctokens: 2099
class cake 111:7dd parent 111:
(dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
deficit 158 count 0 blue_prob 0
class htb 2:1 root rate 90Mbit ceil 90Mbit burst 1600b cburst 1600b
Sent 164819410 bytes 116715 pkt (dropped 0, overlimits 109995 requeues 0)
backlog 0b 0p requeues 0
lended: 116023 borrowed: 0 giants: 0
tokens: 2139 ctokens: 2139
class htb 2:211 parent 2:1 leaf 211: prio 6 rate 1Kbit ceil 500Mbit burst 1600b cburst 1600b
Sent 164819410 bytes 116715 pkt (dropped 0, overlimits 1633 requeues 0)
backlog 0b 0p requeues 0
lended: 692 borrowed: 116023 giants: 0
tokens: 16164269 ctokens: 385
class cake 211:608 parent 211:
(dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
deficit 1090 count 0 blue_prob 0
class cake 211:6b8 parent 211:
(dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
deficit -1084 count 0 blue_prob 0
[filter]
filter parent 1: protocol ip pref 49152 u32 chain 0
filter parent 1: protocol ip pref 49152 u32 chain 0 fh 800: ht divisor 1
filter parent 1: protocol ip pref 49152 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:111 not_in_hw (rule hit 2889990 success 60060)
mark 0x006f 0x00ff (success 60060)
filter parent 2: protocol ip pref 49152 u32 chain 0
filter parent 2: protocol ip pref 49152 u32 chain 0 fh 800: ht divisor 1
filter parent 2: protocol ip pref 49152 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 2:211 not_in_hw (rule hit 1438422 success 62451)
mark 0xd300 0xff00 (success 62451)
[iptables]
Chain QOS-OUT (1 references)
pkts bytes target prot opt in out source destination
2889491 3287262847 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x0/0xff
191 19289 MARK tcp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff tcp dpt:443 MARK xset 0x6f/0xff
31 1756 MARK tcp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff tcp dpt:80 MARK xset 0x6f/0xff
83 87125 MARK udp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff udp dpt:443 MARK xset 0x6f/0xff
0 0 MARK udp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff udp dpt:80 MARK xset 0x6f/0xff
81 4268 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xffLAYER7 l7proto !unset MARK xset 0x6e/0xff
386 112438 CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x0/0xff CONNMARK save mask 0xff
Chain QOS-INC (1 references)
pkts bytes target prot opt in out source destination
1491934 3799902663 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x0/0xff00
180 9576 MARK tcp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 tcp spt:443 MARK xset 0xd300/0xff00
31 1756 MARK tcp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 tcp spt:80 MARK xset 0xd300/0xff00
54 22103 MARK udp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 udp spt:443 MARK xset 0xd300/0xff00
0 0 MARK udp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 udp spt:80 MARK xset 0xd300/0xff00
119 20561 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00LAYER7 l7proto !unset MARK xset 0xd200/0xff00
384 53996 CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x0/0xff00 CONNMARK save mask 0xff00
What am I doing wrong ? Why am not getting speed limited by QoS ?