I have two access points (one for guests, the other for main use) and my PC is connected via LAN cable to the router. I play fps (mainly valorant) a lot so having latency is important. So I want to make my PC the highest priority (lowest latency, above guest/main network) and limit guest network speed so that when people are downloading from guest/main network my gaming won't be affected.
I tried to achieve this by setting up SQM on both my PC and guest network but with lower down/up speeds on the guest network and while it did limit the speed of the guest network, it didn't remove latency from my PC while downloading from guest/main networks as I tested using waveform bufferbloat tester. Is there anything I can to do achieve this?
I guess your increased latency with no SQM comes from line saturation.
Limiting bandwidth with SQM works against that, but it comes with the cost of (much) higher CPU utilization on your router.
So you trade basically line capacity (which is a thing your ISP has a say in) with compute power (which is something your personal router manages).
There's a chance your SQM settings for your guest network max out your routers CPU in a way that now the limiting factor is no longer the line capacity but the CPU of your router. That would be my idea, especially since the MT7621 CPU of your router ins't exactly a powerhouse and using SQM (here I'm not entirely sure) might come at the cost of not using that much hardware offloading and doing stuff in software that would otherwise be done on hardware.
I'd play with SQM settings a bit.
Watch CPU utilization on your router via SSH
download stuff from your guest network.
If the CPU caps at close to 100%, limit the allowed bandwidth in half
repeat until your game gets down to an acceptable latency value.
Then start playing with different SQM strategies and magic numbers.
Once you found SQM settings with minimal CPU utilization, slowly turn up the allowed bandwidth for your guest until you suffer bad latency again.
Turn down the allowed bandwidth back a notch to ensure best latency
Can you give us some numbers?
What's your connection bandwidth with no SQM?
What's your latency with no ongoing download with no SQM?
What's the latency peaking up to when downloads are happening with no SQM?
To what bandwidth did you limit your guests when enabling SQM?
To which numbers do latency beak while downloads are going on with enabled SQM? Are they the same as with no SQM or are they slightly better but not optimal?
Hey,
I'm downloading a test file from my guest network with SQM enabled on guest/lan (which my PC is connected to) and here are the results by running "top" command in terminal:
Why two separate SQM instances? I think it would be better to just stick with the one on wan. I suppose you could set DSCPs for gaming traffic to video or voice so that other traffic like guest traffic is throttled first.
Does indeed seem bit of a weedy router but maybe sub 100Mbit/s would be OK.
So having multiple SQM instances is just fine, however the traffic shaper component that actually limits the traffic is quite CPU intensive and not all routers are beefy enough to operate enough sqm instances... You normally already use two instances one for upload and one for download, but you can add others on different interfaces OR you simply run OpenWrt on the Guest AP as well and do the limiting there...
However, game control traffic is generally relative low volume, so maybe try cake's per interal IP fairness mode, which might already solve most of your problem.
No matter how you want to proceed the first step should be making sure your wan sqm instances are operating well. So could you please post the following pieces of information:
Mmmh that appears to be a dual core MIPS 1004Kc @880 MHz (note 1004Kc supports SMT so this results in 4 CPU cores reported to the OS)... Note MIPS was great in its days, but has not seen any real development/advances in the last decade...
From your top results we see that dring the load test you only have 57% idle left and 30% sirq load... with 4 CPU cores saturating a full core will result in 25% load, so it is well possible that on your 70/40 link your cake instances are already CPU limited with your two SQM instances....
I would guess you need a faster router or reduce your shaper rates.
For the fun of it, try simple.qos/fq_codel and repeat the speedtest under load...
(HTB/fq_codel should keep latency under load lower, but simply reduce the throughput, unlike cake which preserves the requested max shaper rate closer at a cost in latency if the CPU is overloaded; cake does offer a few features that still make it more desirable for a home link though).
Mmmh, for console output it is less work and an friendlier to read result if you do not take a screenshot, but simply copy and paste the text from the terminal window into the forum editor window, Then either
Just make sure you "sandwich" your text between two rows of backtick characters ` (which themselves will be invisible in the preview) looking in something like this in the editor:
```
Your Pasted Text as preformatted text with fixed width font
1
1111 (note with fixed-width fonts the numbers are right-aligned)
```
but looking like this in the rendered forum:
Your Pasted Text as preformatted text with fixed width font
1
1111 (note with fixed-width fonts the numbers are right-aligned)
or
Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
Please edit your post accordingly. Thank you!
If you want to "hide" config files just use the Hide Details option in the cog drop down list, like this:
Which hosts did you run the speedtests from, guest or non-guest, WiFi or wired?
I also note that you used an inward facing port (LAN1) for your supposed "wan" shaper, which is not going to work, as this will not do internet access shaping for all devices connected via WiFi to the router.
You see the result of this also in the speed tests, getting a 45.0 Mbps upload with a 40 Mbps upload shaper should not be possible, but due to SQM residing on inward facing LAN1 the internal directionality and the internet directionality are flipped, and you essentially sahpe internet download to 40Mbps and internet upload to 70 Mbps... (and since 70 Mbps is above your true internet upload speed, this shaper does nothing to keep your upload latency under load increase under control).
So please post the output of: ifstatus wan | grep device
so we can figure out which interface you should use to control internet bufferbloat. Let's first get this fixed, before we move on, OK?
Also I notice Vodafone Germany as your ISP, I take it you are on a DSL link (judged from the shaper settings and speed test without sqm). If so, wht modem are you using? If it is a Fritzbox, please also post screenshots of all the tabs in the area "Internet -> DSL Informationen" in the GUI...
Let's start easy and get your wan interface SQM instance up and running, and move to the Guest network after that. It might be possible that cake's internet IP fairness mode might already be enough to make you games work well, but that is not the first thing to tackle... Let's start with the wan interface...
Not sure, for the gaming configuration this might exactly be what he ultimately needs (I really really like this approach, and plan to add this to sqm-scripts eventually , but my own primary router is still on iptables so I can neither test nor "dog-food" this right now so have to give it a pass).
However I think we should start simple and increase complexity gradually until performance is sufficient for the OP's needs. He can always go and try to improve things further later, after we got the basic configuration working as intended.
nft_rules_vars="# ### START OF CUSTOMISABLE NFT VARS SECTION (DO NOT DELETE THIS LINE) ###
# correspondence between protocol, destination port and DSCPs
# the format is:
# 'protocol' . 'destination port' . dscp_set_bulk OR dscp_set_besteffort OR dscp_set_video OR dscp_set_voice
define PROTO_DPORT_DSCP_MAP = {
tcp . 53 : goto dscp_set_voice, # DNS
udp . 53 : goto dscp_set_voice, # DNS
tcp . 853 : goto dscp_set_voice, # DNS-over-TLS
udp . 853 : goto dscp_set_voice, # DNS-over-TLS
udp . 123 : goto dscp_set_voice # NTP
}
# local MAC addresses to set to bulk (e.g. IoT devices)
# replace MAC address below with comma separated entries
define BULK_MACS = {
02:00:00:00:00:00
}
# ### END OF CUSTOMISABLE NFT VARS SECTION (DO NOT DELETE THIS LINE) ###"
EOT
hi so can you delete this and add my own rules example
nft_rules_vars="# ### START OF CUSTOMISABLE NFT VARS SECTION (DO NOT DELETE THIS LINE) ###
# correspondence between protocol, destination port and DSCPs
# the format is:
# 'protocol' . 'destination port' . dscp_set_bulk OR dscp_set_besteffort OR dscp_set_video OR dscp_set_voice
define new rules dopam
your rules here
# ### END OF CUSTOMISABLE NFT VARS SECTION (DO NOT DELETE THIS LINE) ###"
EOT
I ran the speed test from my PC which is LAN1. Also, I thought I set the inward limit to 70mbps? Did I get it wrong?
option download '70000'
option upload '40000'
Here are the info you requested:
root@OpenWrt:~# ifstatus wan | grep device
"l3_device": "wan",
"device": "wan",
Where can I get the DSL information? I looked for it in Luci but couldn't find it. I also set SQM up using the how-to you provided but in guest network and lan1 as you saw. Should I change my lan1 to wan? I thought wan was everything so I only set it up on lan1.