Is luci-app-qos up to date or still relevant?

Hi.

Yes, yes, I know, we have sqm and it's almost always a set and forget solution where it will fix almost all of our (especially upload-related) bufferbloat issues. And I love it, I don't have to limit google drive on each computer and sacrifice unused upload anymore.

But now I want a configuration where the router will GUARANTEE(on a best effort ofc) to keep a certain traffic at lowest possible latency. I have a shit DSL link(connected to dsl modem*, alongside another router with 4g load balance for some traffic via mwan3 and ipset-dns), and I get random lag spikes while playing a game, so I wanted to set up something like "if it's udp port 22101-22102, make sure it gets to the internet before my grandpa's 911 call".

I shall add that the game traffic's speed seems to be low and individual packet sizes small, like most other real time online video games, so maybe the lag is due to very small packets waiting at some sort of buffer or something, idk not sure

network looks like this:
laptop > zyxel multy m1 (router on a stick via managed switch and vlans) [192.168.69.1/24] > modem [192.168.1.1/24] > pppoe gw 10.99.128.1 over dsl > wan
or for 4g path
multy m1 > a third vlan > 4g modem

After searching a bit, now I have more questions than before.

  1. luci-app-qos or luci-app-nft-qos? Which one is used for prioritising traffic today?
  2. I also have SQM enabled. Do I need to use only one of them at a time?
  3. Do I even need qos? Is there a way to prioritize directly via SQM, or do I even need to do so? Could the problem be somewhere else?
  4. I just want to fix random lag spikes while playing genshin(pic below). Somehow the lag spike doesn't happen on any other game or other real time apps though, just genshin. and only on my wifi, not on other networks or neither on when the home wifi is using the 4G only(a.k.a i pull the plug on the modem, but obviously that also results in higher sustained latency). Happens on both phone and pc, so it's not the devices fault for sure. Maybe it's peering, but I doubt it since both 4G and DSL is from turk telekom)

my normal ping is usually around 44-52ms. im thinking if it was a WAN related issue cloudflare ping should've gone up as well...
image

*(yes, it's doing double nat because 1) i dont care, we have cgnat anyways 2) i have an isp iptv service that needs to work so no i'm not doing bridge)

so yeah what should i do thanks.

You are evil

3 Likes

You are looking for qosify, which is a modern prioritization tool using the same qdiscs as SQM. (Qosify is alternative to SQM, not an add-on)

if you want to avoid lags during online play, then I would advise you not to use SQM.
there is a good article that describes how to set it up properly so that everything works
https://wiki.archlinux.org/title/sysctl

Out of curiosity, what do you propose to set via sysctl, and how will that achieve low latency and low jitter?

1 Like

Is qosify more CPU-Friendly in prioritizing certain packets?

More friendly than what? Qosify is eBPF based so should be pretty CPU efficient... but it still feeds

will check it out tonight, thanks. it doesn't have a luci ui tho, so i browsed the web and stole some random turkish guys qosify config, will post here once i understand what it even does

waifus are more important

Also check qosmate which re-uses same connection classification as firewall. ebpf hardware absent might be better (like most normal routers)

1 Like

yeah came across it after posting, and was tinkering ever since, uninstalled it like five minutes ago, because although it seemed like i configured everything correctly, speedtest packages were still showing up as CS0 (i did port 8080 as cs1 for test), valorant was correctly put onto cs4 though, but when i did speedtest my valorant ping skyrocketed so i think qdisc wasnt working at all, will go back to qosify and do the same testing shortly

and yes i restart the router in between

1 Like

It does not capture local "output" traffic by default.

im testing qosify now, so can't really go back to the ui to change that, but still please let me know how to do so and i will go try qosmate again

speaking of qosify, its not as pleasant to configure, but it looks like its working, just tested and speedtest gets capped around 15 megs (total downlink 44mbps), i still see some jitter, will try putting specifically valorant udp traffic onto EF and see if it changes

(speedtest and game runs on different devices)

Find what works, tell us too.
Local benchmarks are not representative in any way, some SoCs are wildly optimized for moving packets while the CPU is weak for general tasks.

1 Like

my router is this: https://openwrt.org/toh/zyxel/wsm20

so yeah not the best soc, but tests are done on my computer not on the router itself

ef didnt change a thing, i mean logically shouldn't really change anyway, since cake only has 4 queues, and probably ef and cs4 is on the same queue. here are my raw findings though:

valorant traffic is filtered by specifying udp port 7000-8000, as advised by riot games' support article. and to just confirm we are correct on that:

image

from left to right: unloaded on the left, val marked as cs4(class gaming on my config), under download load (speedtest marked as cs1 via port 8080), and traffic marked as EF(class telephony on my config) is on the rightmost.
image image image

and to be fair this is not really much of a jitter compared to what i had on genshin as mentioned in the topic post, 6ms is crazy as is, and still acceptable compared to 100+ ms upload bufferbloat without sqm.

i will test with genshin and see if it still does that 999+ms thing where i cant switch characters and all that

then i might switch back to qosmate one more time

lmk if you want me to test anything else, such as icmp ping flood under load..
you know what, lets test that too

hrping is a ping utility that can draw graphs, spam pings and stuff, very cool

ping to 1.1.1.1 under load (graph starts 3sec before speedtest begins, line cutting out does NOT mean packet loss. graph is not cropped, i just screen grabbed without title bar my bad):

not much different from SQM. just posting it because dont know if sqm is supposed to cut the ping increase off entirely


edit: played genshin for 5-10 mins while the network is under load, seems like im no longer in pain, longer testing is perhaps needed

regular ping under no load: 52-55ms
while speedtest is running: averages 55-56ms, worst 59ms
manual whatsapp backup running: literally no change, still around 55ms

so yeah, looks like qosify is doing a better job than plain sqm at the moment

by the way, another question, is there a way to modify bandwidth values assigned to the queues, shown on qosify-status output? is this thresh bandwidth a minimum guarantee or a maximum limit?

Ask in qosify thread (find it using search above)

1 Like

done

1 Like

So as a final post before closing this topic , no, luci-app-qos is no longer relevant, use qosify or qosmate, qosify worked better for me but qosmate looks promising as well. here is my current config:

BusyBox v1.36.1 (2024-03-22 22:09:42 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.3, r23809-234f1a2efa
 -----------------------------------------------------
root@ist-gw-1:~# cat /etc/config/qosify
config defaults
        list defaults /etc/qosify/*.conf
        option dscp_icmp +besteffort
        option dscp_default_tcp unmarked_traffic
        option dscp_default_udp unmarked_traffic

config class unmarked_traffic
        option ingress CS1
        option egress CS1
        option prio_max_avg_pkt_len 1270
        option dscp_prio CS4
        option bulk_trigger_pps 600
        option bulk_trigger_timeout 10
        option dscp_bulk CS1

config class browsing
        option ingress CS0
        option egress CS0
        option prio_max_avg_pkt_len 575
        option dscp_prio AF41
        option bulk_trigger_pps 1000
        option bulk_trigger_timeout 10
        option dscp_bulk CS1

config class bulk
        option ingress CS1
        option egress CS1

config class besteffort
        option ingress CS0
        option egress CS0

config class network_services
        option ingress CS2
        option egress CS2

config class broadcast_video
        option ingress CS3
        option egress CS3

config class gaming
        option ingress CS4
        option egress CS4

config class multimedia_conferencing
        option ingress AF42
        option egress AF42
        option prio_max_avg_pkt_len 575
        option dscp_prio AF41

config class telephony
        option ingress EF
        option egress EF

config interface wan
        option name wan
        option disabled 0
        option bandwidth_up 15mbit
        option bandwidth_down 44mbit
        option overhead_type manual
        option overhead 44
        # defaults:
        option ingress 1
        option egress 1
        option mode diffserv4
        option nat 1
        option host_isolate 1
        option autorate_ingress 0
        option ingress_options ""
        option egress_options ""
        option options ""

root@ist-gw-1:~# cat /etc/qosify/00-defaults.conf
# SSH
tcp:22    network_services
tcp:58302 network_services

# NTP
udp:123   network_services

# DNS
tcp:53    network_services
tcp:5353  network_services
udp:53    network_services
udp:5353  network_services

# DNS over TLS (DoT)
tcp:853   multimedia_conferencing
udp:853   multimedia_conferencing

# HTTP/HTTPS/QUIC
tcp:80    browsing
tcp:443   browsing
udp:80    browsing
udp:443   browsing
tcp:8080  browsing
udp:8080  browsing

# Microsoft (Download)
dns:*1drv*                 bulk
dns:*backblaze*            bulk
dns:*backblazeb2*          bulk
dns:*ms-acdc.office*       bulk
dns:*onedrive*             bulk
dns:*sharepoint*           bulk
dns:*update.microsoft*     bulk
dns:*windowsupdate*        bulk

# MEGA (Download)
dns:*mega*                 bulk

# Dropbox (Download)
dns:*dropboxusercontent*   bulk

# Google (Download)
dns:*drive.google*            bulk
dns:*googleusercontent*       bulk

# Google (Upload)
dns:upload.video.google.com   bulk
dns:*.drive.google.com        bulk
dns:*.googleapis.com          bulk
dns:*.photos.google.com       bulk
dns:upload.google.com         bulk
dns:*.upload.google.com       bulk
dns:upload.youtube.com        bulk
dns:*.upload.youtube.com      bulk

# Steam (Download)
dns:*steamcontent*            bulk

# Epic Games (Download)
dns:*download.epicgames*      bulk
dns:*download2.epicgames*     bulk
dns:*download3.epicgames*     bulk
dns:*download4.epicgames*     bulk
dns:*epicgames-download1*     bulk

# YouTube
dns:*googlevideo*   besteffort

# Facebook
dns:*fbcdn*         besteffort

# Twitch
dns:*ttvnw*         besteffort

# TikTok
dns:*tiktok*        besteffort

# Netflix
dns:*nflxvideo*     besteffort

# Amazon Prime Video
dns:*aiv-cdn*       besteffort
dns:*aiv-delivery*  besteffort
dns:*pv-cdn*        besteffort

# Disney Plus
dns:*disney*        besteffort
dns:*dssott*        besteffort

# HBO
dns:*hbo*           besteffort
dns:*hbomaxcdn*     besteffort

# BitTorrent
tcp:6881-7000    bulk
tcp:51413        bulk
udp:6771         bulk
udp:6881-7000    bulk
udp:51413        bulk
udp:31331        bulk
tcp:31331        bulk

# Usenet
tcp:119          bulk
tcp:563          bulk

# Zoom, Microsoft Teams, Skype and FaceTime (they use these same ports)
udp:3478-3497    multimedia_conferencing

# Zoom
dns:*zoom*       multimedia_conferencing
tcp:8801-8802    multimedia_conferencing
udp:8801-8810    multimedia_conferencing

# Skype
dns:*skype*      multimedia_conferencing

#discord
dns:*discord.gg* multimedia_conferencing

# FaceTime
udp:16384-16387  multimedia_conferencing
udp:16393-16402  multimedia_conferencing

# Google Meet
udp:19302-19309  multimedia_conferencing

# TeamViewer
tcp:5938         multimedia_conferencing
udp:5938         multimedia_conferencing

# Voice over Internet Protocol (VoIP)
tcp:5060-5061    telephony
udp:5060-5061    telephony

# Voice over WiFi or WiFi Calling (VoWiFi)
udp:500          telephony
udp:4500         telephony

# Live Streaming to YouTube Live, Twitch, Vimeo and LinkedIn Live
tcp:1935-1936           broadcast_video
tcp:2396                broadcast_video
tcp:2935                broadcast_video

#minecraft
tcp:25565        gaming
udp:25565        gaming

#genshin impact
udp:22101        telephony
udp:22102        telephony
udp:42472        gaming
tcp:42472        gaming

#valorant
udp:7000-8000    telephony
udp:8180-8181    telephony
udp:8088         gaming
tcp:8088         gaming
tcp:2099         gaming
tcp:5222         gaming
tcp:5223         gaming
udp:5222         telephony
udp:5223         telephony

root@ist-gw-1:~#

note: i left some gaming ports at telephony for testing, seems like doesnt matter between gaming and telephony anyway

Telephony bin uses 5-10x wifi airtime, video is much more polite.

oh, so dscp marks are not only for cake qdisc, wifi/wmm also considers it, is what i've understand if did so correctly, didn't really think of it since im on ethernet, but got it, thanks.