Setting proper SQM to ensure low latency and jitter

Greetings friends, first of all, I am kind of a newbie in terms of networking and stuff, so please bear with me and accept my utmost bows for helping out! Lately I have installed OpenWRT on my TL-WR1043ND to have some more options of lessening the impact of 2 WiFi users on my ingame latency (I am the only one wired user in the network)

First of all, my internet itself isn't the best - I have an Ubiquiti 5GHz receiver on my roof which connects with ISP transmitter through radio signal, 12mbps download/1.5mbps upload. If nobody is using the network except me, then my latency is fairly good and stays under 60ms with very minor jitter. As soon as other users start to use streaming sites (youtube, Netflix) via WiFi, my latency starts to go like this 40ms>55ms>70ms>90ms>110ms>150ms with some packet loss and enormous jitter. I have had set up an SQM instance on my WAN according to howto on openwrt site, but it doesn't really help much or I have messed up the configuration. I have typed in 10000 ingress and 1200 egress, cake+piece_of_cake discipline and ATM 44 overhead layer. I was also trying to use nft-qos to throttle the bandwith of the IPs that use the streaming platforms, but it seems like it does nothing. Another thing I was thinking on if maybe I should get a more powerful router since 1043 is fairly old today? I do also know that I am expecting bit too much from such a poor connection, but it is how it is :stuck_out_tongue:
I appreciate any help very much!

Welcome!

I have no answers, but more questions :wink:

Could you please post the following data (mostly the output of commands run on the router via ssh)

  1. cat /etc/config/sqm

  2. tc -s qdisc

  3. SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm stop

  4. run a dslreports speedtest according to https://forum.openwrt.org/t/sqm-qos-recommended-settings-for-the-dslreports-speedtest-bufferbloat-testing/2803 and post the link to the results here

  5. SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm start

  6. tc -s qdisc

  7. run another dslreports speedtest and post the link to the results here

  8. tc -s qdisc

  9. Copy and paste the content of the "Share Your Result" box from https://www.speedguide.net/analyzer.php

That way we might be able to see what happens and why...

EDIT: fixed superfluous spaces, sorry for the confusion...

1 Like

Firstly I'd like to thank you for replying and guiding me through! Unfortunately I am running into a problem on step #3, when I enter the command it outputs "-ash: /etc/init.d/: Permission denied" for some reason.

2 Likes

There is stray space in 3 and 5

SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm stop
SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm start
1 Like

Damn, I feel so stupid right now, thanks for pointing it out.
So here goes the data:
1.

config queue
option debug_logging '0'
option verbosity '5'
option enabled '1'
option interface 'eth0.2'
option qdisc 'cake'
option script 'piece_of_cake.qos'
option qdisc_advanced '0'
option overhead '44'
option linklayer 'ethernet'
option download '8000'
option upload '1000'

2.

qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 702575292 bytes 2618070 pkt (dropped 0, overlimits 0 requeues 4)
backlog 0b 0p requeues 4
maxpacket 1494 drop_overlimit 0 new_flow_count 7 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 8029: dev eth0.2 root refcnt 2 bandwidth 1Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 187911 bytes 2753 pkt (dropped 1, overlimits 2185 requeues 0)
backlog 0b 0p requeues 0
memory used: 34496b of 4Mb
capacity estimate: 1Mbit
min/max network layer size: 40 / 1480
min/max overhead-adjusted size: 84 / 1524
average network hdr offset: 14

              Tin 0

thresh 1Mbit
target 18.2ms
interval 113.2ms
pk_delay 4.3ms
av_delay 634us
sp_delay 51us
backlog 0b
pkts 2756
bytes 189513
way_inds 0
way_miss 10
way_cols 0
drops 1
marks 0
ack_drop 0
sp_flows 3
bk_flows 1
un_flows 0
max_len 1494
quantum 300

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
Sent 5338151 bytes 3785 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 802a: dev ifb4eth0.2 root refcnt 2 bandwidth 8Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 5371719 bytes 3772 pkt (dropped 11, overlimits 6366 requeues 0)
backlog 2988b 2p requeues 0
memory used: 51584b of 4Mb
capacity estimate: 8Mbit
min/max network layer size: 46 / 1480
min/max overhead-adjusted size: 90 / 1524
average network hdr offset: 14

              Tin 0

thresh 8Mbit
target 5.0ms
interval 100.0ms
pk_delay 17.6ms
av_delay 5.7ms
sp_delay 905us
backlog 2988b
pkts 3785
bytes 5391141
way_inds 3
way_miss 18
way_cols 0
drops 11
marks 0
ack_drop 0
sp_flows 2
bk_flows 2
un_flows 0
max_len 1494
quantum 300

3.
/usr/lib/sqm/run.sh: line 57: can't create : nonexistent directory
SQM: Stopping SQM on eth0.2
SQM: ifb associated with interface eth0.2: ifb4eth0.2
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev eth0.2 ingress
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev eth0.2 root
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev ifb4eth0.2 root
SQM: /usr/lib/sqm/stop-sqm: ifb4eth0.2 shaper deleted
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0.2 down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete ifb4eth0.2 type ifb
SQM: /usr/lib/sqm/stop-sqm: ifb4eth0.2 interface deleted

4.

I had to type in 4 for the streams to not get any error during test.

5.

/usr/lib/sqm/run.sh: line 57: can't create : nonexistent directory
SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 8000 Kbps, out: 1000 Kbps
SQM: fn_exists: function candidate name: sqm_start
SQM: fn_exists: TYPE_OUTPUT: sqm_start: not found
SQM: fn_exists: return value: 1
SQM: Using generic sqm_start_default function.
SQM: fn_exists: function candidate name: sqm_prepare_script
SQM: fn_exists: TYPE_OUTPUT: sqm_prepare_script is a function
SQM: fn_exists: return value: 0
SQM: sqm_start_default: starting sqm_prepare_script
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
SQM: QDISC cake is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
SQM: QDISC cake is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: sqm_start_default: Starting piece_of_cake.qos
SQM: ifb associated with interface eth0.2:
SQM: Currently no ifb is associated with eth0.2, this is normal during starting of the sqm system.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name ifb4eth0.2 type ifb
SQM: fn_exists: function candidate name: egress
SQM: fn_exists: TYPE_OUTPUT: egress is a function
SQM: fn_exists: return value: 0
SQM: egress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 root
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: LLA: default link layer adjustment method for cake is cake
SQM: cake link layer adjustments: overhead 44 mpu 0
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 root cake bandwidth 1000kbit overhead 44 mpu 0 besteffort
SQM: sqm_start_default: egress shaping activated
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
SQM: QDISC ingress is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: fn_exists: function candidate name: ingress
SQM: fn_exists: TYPE_OUTPUT: ingress is a function
SQM: fn_exists: return value: 0
SQM: ingress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 handle ffff: ingress
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 handle ffff: ingress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4eth0.2 root
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: LLA: default link layer adjustment method for cake is cake
SQM: cake link layer adjustments: overhead 44 mpu 0
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev ifb4eth0.2 root cake bandwidth 8000kbit overhead 44 mpu 0 besteffort wash
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0.2 up
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc filter add dev eth0.2 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth0.2
SQM: sqm_start_default: ingress shaping activated
SQM: piece_of_cake.qos was started on eth0.2 successfully

6.

qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 855095123 bytes 2895653 pkt (dropped 0, overlimits 0 requeues 5)
backlog 0b 0p requeues 5
maxpacket 1494 drop_overlimit 0 new_flow_count 8 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 802d: dev eth0.2 root refcnt 2 bandwidth 1Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 520178 bytes 7078 pkt (dropped 2, overlimits 5546 requeues 0)
backlog 0b 0p requeues 0
memory used: 49280b of 4Mb
capacity estimate: 1Mbit
min/max network layer size: 28 / 1480
min/max overhead-adjusted size: 72 / 1524
average network hdr offset: 14

              Tin 0

thresh 1Mbit
target 18.2ms
interval 113.2ms
pk_delay 31.4ms
av_delay 1.5ms
sp_delay 25us
backlog 0b
pkts 7080
bytes 523166
way_inds 0
way_miss 18
way_cols 0
drops 2
marks 0
ack_drop 0
sp_flows 2
bk_flows 1
un_flows 0
max_len 1494
quantum 300

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
Sent 14032792 bytes 10185 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 802e: dev ifb4eth0.2 root refcnt 2 bandwidth 8Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 14134984 bytes 10157 pkt (dropped 16, overlimits 16961 requeues 0)
backlog 17928b 12p requeues 0
memory used: 62Kb of 4Mb
capacity estimate: 8Mbit
min/max network layer size: 46 / 1480
min/max overhead-adjusted size: 90 / 1524
average network hdr offset: 14

              Tin 0

thresh 8Mbit
target 5.0ms
interval 100.0ms
pk_delay 23.9ms
av_delay 7.2ms
sp_delay 647us
backlog 17928b
pkts 10185
bytes 14175382
way_inds 0
way_miss 18
way_cols 0
drops 16
marks 0
ack_drop 0
sp_flows 1
bk_flows 2
un_flows 0
max_len 1494
quantum 300

7.

8.

qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 873677604 bytes 2947067 pkt (dropped 0, overlimits 0 requeues 5)
backlog 0b 0p requeues 5
maxpacket 1494 drop_overlimit 0 new_flow_count 8 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 802d: dev eth0.2 root refcnt 2 bandwidth 1Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 5126843 bytes 40979 pkt (dropped 322, overlimits 35425 requeues 0)
backlog 0b 0p requeues 0
memory used: 91360b of 4Mb
capacity estimate: 1Mbit
min/max network layer size: 28 / 1480
min/max overhead-adjusted size: 72 / 1524
average network hdr offset: 14

              Tin 0

thresh 1Mbit
target 18.2ms
interval 113.2ms
pk_delay 7.0ms
av_delay 1.1ms
sp_delay 19us
backlog 0b
pkts 41301
bytes 5549329
way_inds 4
way_miss 129
way_cols 0
drops 322
marks 0
ack_drop 0
sp_flows 2
bk_flows 1
un_flows 0
max_len 1494
quantum 300

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
Sent 76063934 bytes 60710 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 802e: dev ifb4eth0.2 root refcnt 2 bandwidth 8Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
Sent 76553700 bytes 60467 pkt (dropped 243, overlimits 97976 requeues 0)
backlog 0b 0p requeues 0
memory used: 123008b of 4Mb
capacity estimate: 8Mbit
min/max network layer size: 46 / 1480
min/max overhead-adjusted size: 90 / 1524
average network hdr offset: 14

              Tin 0

thresh 8Mbit
target 5.0ms
interval 100.0ms
pk_delay 16.5ms
av_delay 5.8ms
sp_delay 209us
backlog 0b
pkts 60710
bytes 76913874
way_inds 3
way_miss 130
way_cols 0
drops 243
marks 0
ack_drop 0
sp_flows 2
bk_flows 1
un_flows 0
max_len 1494
quantum 300

Nah, please don't completely my oversight; I feel that I should have tested the commands before posting them.

Thanks for all the data!

Okay, even without sqm and just four streams the results look interesting, download goodput way below the expected 12 Mbps, upload okay, both suffering from an unhealthy amount of latency (but even the idle latency is pretty bad with spikes above 100ms on a base RTT of around 30-35ms).

Well, that is barely better... that is the bandwidth is pretty abysmal and the improvements in latency are pretty minor (if at all caused by sqm in the first place)
Bandwidth: theoretical maximum should be around

8 * ((1480-20-20)/(1480+44)) = 7.559 Mbps
1 * ((1480-20-20)/(1480+55)) = 0.938 Mbps

Note, if you put three backticks "````" into a line before pasted text and after you get a block of fixed font text that is a bit easier to read than proportional font text, especially since the mark-up meta tags are ignored in such text blocks.

I am not sure whether sqm really can help you much according to these tests, but why don';t you try the following as a replacement for your /etc/config/sqm?

	option verbosity '5'
	option qdisc_advanced '1'
	option squash_dscp '0'
	option squash_ingress '0'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option linklayer 'ethernet'
	option overhead '44'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option linklayer_adaptation_mechanism 'default'
	option iqdisc_opts 'nat dual-dsthost ingress'
	option eqdisc_opts 'nat dual-srchost'
	option interface 'eth0.2'
	option script 'piece_of_cake.qos'
	option tcMPU '68'
	option download '9000'
	option qdisc 'cake'
	option debug_logging '1'
	option enabled '1'
	option upload '1400'

The iqdisc_opts and eqdisc_opts, will configure per-internal-IP fairness, which should give your gaming rig a fairer chance against the streamers. But this will not do miracles, as it seems the air-link to your ISP seems to have pretty variable latency, which is hard to fix from your side...

2 Likes

I will remember to make my next data splashes easier to read!
Yeah my air-link is pretty trash, it seems it just doesn't have enough horse power to provide for all the network users + the latency is low and stable if for example I ping the server which I play on with simple cmd command, it just seems that my link cannot handle sending bigger packets reliably + I can see in some trace route programs that there are problems with ISP infrastructure at this moment due to network being overrun by customers, especially during afternoon. DSLReport test would give better outcome in like 2 or 3 hours I suppose.
Just one question - what should I put before those options to apply them to SQM through SSH?

I also missed step #9 for some reason, here it is:

« SpeedGuide.net TCP Analyzer Results » 
Tested on: 2020.03.19 18:00 
IP address: 185.241.xxx.xx 
Client OS/browser: Windows 10 (Firefox 73.0) 
 
TCP options string: 020405a001010402 
MSS: 1440 
MTU: 1480 
TCP Window: 64240 (not multiple of MSS) 
RWIN Scaling: 0 bits  
Unscaled RWIN : 64240 
Recommended RWINs: 63360, 126720, 253440, 506880, 1013760 
BDP limit (200ms): 2570kbps (321KBytes/s)
BDP limit (500ms): 1028kbps (128KBytes/s) 
MTU Discovery: ON 
TTL: 115 
Timestamps: OFF 
SACKs: ON 
IP ToS: 00000000 (0) 

I have also ran a quick test in pingplotter, but I am not sure if I am interpreting this right:

Thanks, BTW you can always edit your existing posts here :wink:

Probably the most convenient options are:
a) install a user friendly editor on the router and use that for editing:
opkg update ; opkg install nano ; nano /etc/config/sqm
Use Ctrl-O to save, and/or Ctrl-X to save and exit.
b) use WinSCP, as winscp will allow you to directly edit files on the router (or so I habe been told)

That confirms/supports the data from tc -s qdisc, your ISP reduces your MTU/MSS by 20 Bytes, which is fine and not a problem in itself, just something to keep in mind.

P.S.: The pingplotter results look decent, best to always/mostly look at latency and loss of the final destination (hop 9 in your case). Intermittent increased latency or loss along the path typically are not diagnostic of anything. If from a specific hop on latency and/or packet loss increase for all later hops this indicates a problematic link along the path (but pinpointing the location exactly is tricky and typically at least requires another traceroute/mtr/pingplotter measurement in the reverse direction)

Really really big thanks for the help, but I was wondering if there is any option to throttle a certain IP adress in my network? Because there are 2 or 3 mobile devices also connected to the WiFi and I don't want them to be considered equal with other hosts if possible. Or maybe throttle the whole WiFi interface a little.
Nonetheless, I applied the SQM config you provided and will test it under pressure tomorrow. My utmost thanks for your time!

Not with SQM, sorry. The nft-qos package offers that, but I never tested that myself.

I hope these are all connecting via the TL-WR1043ND? If not sqm will not work very well as it needs to be able to control/limit all traffic on your link. If yes, you could just instantiate an sqm instance on one of the wifi interfaces (please note that for inward facing network interfaces like WIFI/WLAN/LAN the meaning of the download and upload fields of sqm is inverted*). Or you could switch your WIFI clients to a guest network (see https://openwrt.org/docs/guide-user/network/wifi/guestwifi/guest-wlan-webinterface) that way all wifi clients combined will only get half of the bandwidth if you wire machine is active**. I would believe that is close to what you desire without you needing to track machines individually by IP and/or MAC addresses.

Best Regards

*) Actually the directions are ingress and egress and from an interfaces, that does not change. What does change is how interface ingress\egress are related/aligned to the internet download and upload directions. To make things simpler in the common case of SQM on a WAN interface we named the fields download and upload, so people would intuitively know what to enter; but the flip-side is that people instantiating SQM on inward facing interfaces need to swap the speed settings in relation to the internet/WAN.

**) Actually it would be better to think of this is that your wired machine will get up to half of ingress and egress bandwidth if it actually uses that bandwidth, otherwise the wifi guest will together get all bandwidth that is left over.

Thank you again for the SQM settings - they are doing their job but it is still not enough for me to be satisfied, I have tried to create a new guest network and move all WiFi clients to it, but after configuring everything according to your link, the network itself doesn't work for some reason. Do I need to remove the previous WLAN interface first or? I will try again tho and also I have a question - does the guest network automatically works as you desribed or I need to configure it somehow? ("that way all wifi clients combined will only get half of the bandwidth if you wire machine is active")

Okay, that is odd. I have to admit though, that the last time I set-up a guest network was around 2015 or so, should have mentioned that probably earlier...

It used to be possible to run multiple SSDs on the same radio in paralell, so I assume that the non-guest wifi network does not need to be disabled.

That is a good question, I guess you will need to enable masquerading in the firewall for the guestnetwork somehow... Mmmh, what looked like an easy path is looking like a wild goose chase. Sorry. It still is possible to configure things, but I was looking for something simple and easy to recommend. Not sure how to procede?

I'll probably talk to my ISP tomorrow to maybe increase my bandwith, because there's a possibility of getting additional 5mbps download so maybe that will reduce the problem a little.

Also I found a guide regarding to reducing bufferbloat which practically says to flash your router with dd-wrt
and set up some stuff along with using those 2 commands:

    ifconfig eth0 txqueuelen 2

    ifconfig eth1 txqueuelen 2

I am wondering if this would have any effect on my problem.
Your SQM config works great but I think my problem would be minimised if I would be able to grant at least 50% of the bandwith to myself and leave the other 50% just for WiFi users, because now with fairness applied in SQM, when more than one user will start using WiFi then I am getting less and less with each additional user getting on WiFi.

apply SQM to the wlan0 or whatever your wifi is, set it to an egress maximum of 1/2 the download bandwidth from the ISP... voila, your whole wlan crew get at most put together 1/2 the download... the rest will be for the ethernet

1 Like

Not really, these will instruct a very short hardware queue, but with sqm you basically move the queueing from the hardware queue to a software queue, and manage that software queue well, so that its length is not a problem any more. And since your openwrt router is connected with a fast link to the Ubiquity device, reducing the openwrt router's hardware buffers will not help much at all (you would need to configure the Ubiquity devices buffers to see an effect, but on a bursty MAC like wifi reducing the buffers is trickier than it seems (wifi drivers often have additional layers of buffers) and something requiring balance as otherwise throughput will crater.)

+1; @dlakelan's idea is a great way to implement something now (just make sure to instantiate a shaper each for 2.4 GHz and 5GHz, assuming your router has two wifi bands). It is not the most elegant long-term solution, but it is fast and should let you evaluate quickly whether that type of bandwidth sharing actually helps with your problem.
If it does the easiest way would be to get say an edgerouterX as primary wired router (with OpenWrt) and hook up your TL-WR1043ND as secondary router with NAT enabled, that way all wifi clients will present one and the same IP-address to the cake instance running on the primary router and you get the 1:1 wired:wifi split under load you want, but if the wired machine is not sending receiving the wifi machines will get all available bandwidth (which at your speed seems desirable).

For bonus points, if you are so inclined, you could also use a raspberry pi 4B and a managed switch instead of the edgerouterX, and be prepared for up to gigabit WAN speeds, but at 0.012/0.001.5 Gbps that might be a bit premature...

Yeah I was about to try that, but I am not really sure about the config for that to be the most efficient (qdisc advanced options, link layer adaptation etc.) and if I should remove the per IP fairness on the WAN instance of the SQM?

just do piece of cake everywhere, per IP on wifi and not per ip on wan

Use the same link layer options for all shapers, and also set the ingress keyword for all instances that handle internet ingress traffic (download on WAN, upload for the WLANs and/or LAN).

+1