Confused about QoS configuration and downlink/uplink speed

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 ?

To be perfectly honest I also had a lot of trouble understanding this logic. It is not due to IPFire, but standards that IPFire follows.

and

I ended up chatting with an AI to get it sorted and eventually getting a bit of a grip on it, but that was some time ago and I set it and forgot it… :upside_down_face:

I have found that the class speeds are what determines the final speed, regardless of what you set your link speeds to at the top of the page. I think the link speeds are more for establishing percentages of bandwidth usage in a default configuration.

In my setup, I always have the top-of-the-page link speeds set at or above my ISP speeds, then throttle bandwidth within each class.

1 Like

Thanks !

But even that doesn’t explain what I saw : I still get way higher bandwidth than what the class is setup to.

I do note that I shouldn’t bother with link speed :wink:

I should note that creating custom classes, like your 111, can lead to issues. I typically stay with the default class numbers, and just modify them for the traffic I am targeting. I do have a thread here where I go through my custom setup.

Thanks, I’ll look at it.

It is allowed to use un used band with so its not a hard limit.

that is my understanding