What's new

FlexQoS FlexQoS 1.3.2 - Flexible QoS Enhancement Script for Adaptive QoS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
There must be more going on - maybe a combination of what your provider does and the router:

I am using the same router and Steam and don't see the problem you are seeing. When I had Gig Fiber I had zero packetloss no matter what I did (Steam, Backblaze etc...) - with 200/200mpbs Fiber I get packetloss when I max out the downstream - likely part of my provider (quantum) traffic shaping... With FlexQoS and fc disable that problem goes away and everything is 100% stable with ping increases <10ms on a fully loaded link...
I agree, maybe there is some kind of disturbance from the provider (or modem)
 
There must be more going on - maybe a combination of what your provider does and the router:

I am using the same router and Steam and don't see the problem you are seeing. When I had Gig Fiber I had zero packetloss no matter what I did (Steam, Backblaze etc...) - with 200/200mpbs Fiber I get packetloss when I max out the downstream - likely part of my provider (quantum) traffic shaping... With FlexQoS and fc disable that problem goes away and everything is 100% stable with ping increases <10ms on a fully loaded link...
I think there's a huge difference between the 500/50 and the 1000/50 uplink that I've switched to (AX58U vs AX86U) and I think it's the RT-AX86U, at least partially.

Someone's trying to actually hit that 1G downstream and it's barely able to do so. The 500/50 line was at the limit of the AX58U and with QoS it managed to be there with little hassle.
Again, QoS is off, so this router - being able to hit the maximum downstream - is struggling massively with trying to hit those TCP/HTTP streams Steam is pushing.

The SoC should be able to do this, though, as QoS is off. I still think something's holding back what's possible.

I'm moving on. The AX86U will provide Wi-Fi, but no routing.
 
I agree, maybe there is some kind of disturbance from the provider (or modem)
None. No changes. The AX58U handled its load properly, no fuss. IMHO the 1G>500M switch is the issue all in all.

Edit: Or the AX86U actually is bugged as a couple of reputable posts have suggested.
Edit 2: Might this be a hardware issue? Everything's looking normal, but this is a open-box unit.
 
Last edited:
I usually put Gaming near the top, with reduced max bandwidth to stop a mis-categorisation playing havoc with things
Does this work, ie reduce ping spikes in games, if so what do you reduce max bandwidth to?
 
I have a suggestion, dunno if it is Simple to implement or not.
When filtering an device (ip), make the graph shows only the traffic from that filtered device.
 
This is reminiscent of the VPN download as upload issues of the past.

Try a new iptables rule without the catch all.
Bash:
iptables -t mangle -A POSTROUTING -o eth0 -m mark --mark 0x80000000/0xc0000000 -j MARK --set-xmark 0x40000000/0xC0000000
Finally after finishing school I had some time to reset the router. I did the ASUS recovery flash this time. Reset everything to factory defaults.

So after doing all that it seems like I found the source of this problem.

This upload/download issue is caused strictly by using IPv6. If I have IPv6 disabled then I have no issue with upload and download swapped.

May 4 22:05:17 kernel: rdisc6/1598: potentially unexpected fatal signal 11.
May 4 22:05:17 kernel: Pid: 1598, comm: rdisc6
May 4 22:05:17 kernel: CPU: 1 Tainted: P (2.6.36.4brcmarm #1)
May 4 22:05:17 kernel: PC is at 0x2ae1a8ec
May 4 22:05:17 kernel: LR is at 0x2ae1a910
May 4 22:05:17 kernel: pc : [<2ae1a8ec>] lr : [<2ae1a910>] psr: 20000010
May 4 22:05:17 kernel: sp : 7ec22000 ip : 2ae2e57c fp : 7ee1fa0c
May 4 22:05:17 kernel: r10: 2aabd000 r9 : 7ee1fdc0 r8 : 2aae87f0
May 4 22:05:17 kernel: r7 : 2af09014 r6 : 7ee1f9d8 r5 : 2ae2f344 r4 : 2ae2e4f8
May 4 22:05:17 kernel: r3 : 2ae1a8ec r2 : 000009a0 r1 : 2ae1a95c r0 : 2ae2f344
May 4 22:05:17 kernel: Flags: nzCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
May 4 22:05:17 kernel: Control: 10c53c7d Table: 5940004a DAC: 00000015
May 4 22:05:19 kernel: nf_conntrack_rtsp v0.6.21 loading

The reset is still not helping with packet marking.

For now I have disabled the QoS because Comcast upgraded me to 800/20 and my trusty AC3100 does not go faster than that anyway. Before the upgrade my patch script was still helping a lot with upload bufferbloat from +100 ms to +10 ms. Docsis 3.1 already does PIE and has +10-15 ms upload bufferbloat so if ASUS fixes this closed-source tainted module I'll try again.

I learnt a lot about QoS, packet scheduling, packet inspections and firewall (pfsense and IPFire) in this process.

Thank you all! This community is awesome!!!
 
What I am going to exhibit has already happened twice:
I look at Disney +, successfully detected video stream.
I apply some changes in the bandwidth allocation, click apply, flexqos restarts ........... Disney + video stream is no longer detected but OTHER
 
Running with no qos now for a couple of weeks, seems better all around tbh. A shame because I loved flex when it was working as expected.
 
Just in case it is getting lost in the 388 Beta Thread:
FlexQoS working great with 388.1_beta1 on my RT-AX86U.... and performance etc. just as good as before
(I am still having flow cache disabled - did not try with it enabled)
I haven't tried the beta fw yet, but I've been trying the "develop" version of FlexQoS for a few days without any issues with FC enabled. I'll continue to monitor...
 
What I am going to exhibit has already happened twice:
I look at Disney +, successfully detected video stream.
I apply some changes in the bandwidth allocation, click apply, flexqos restarts ........... Disney + video stream is no longer detected but OTHER
I would make a guess that you might be able to get it back to normal with these commands:
Code:
fc flush
conntrack -F
 
I haven't tried the beta fw yet, but I've been trying the "develop" version of FlexQoS for a few days without any issues with FC enabled. I'll continue to monitor...

Tried beta and "develop," and while QOS "works" in terms of classification, it still throttles downloads waaaay too much with fc enabled. Disabling fc immediately fixes.
 
Tried beta and "develop," and while QOS "works" in terms of classification, it still throttles downloads waaaay too much with fc enabled. Disabling fc immediately fixes.
Thanks for the heads-up.

I ended going back to the stable version (FlexQoS). I was noticing some slight jitter/lag while streaming that I've never experience with the stable one. I didn't test further so I'm not sure if it's related to Flex beta or just something else in my environment. The slight random jitter is gone (for now).
 
Last edited:
Anyone upgraded to latest FlexQoS update?
Screenshot (39).png
 
Anyone upgraded to latest FlexQoS update?View attachment 46626
I made a “post-retirement” fix for this issue with a newer router model. No other changes.

 
Does this work, ie reduce ping spikes in games, if so what do you reduce max bandwidth to?
Yes. #1 cause of ping spikes is first and foremost, FlowCache. I have a script disable that on router reboot. Some packets take 500ms to get through FlowCache, so while good for throughput, it's not so good for latency. It also scrambles the classifications. With torrent traffic going, disabling this was 100% essential.

Second is thinking up defensive limits, in case there's a mis-classification. A good example is XBox download traffic is usually classified as Gaming. That means if you have it set to a high priority and have high downstream limits, it's going to nail your whole connection and kill all competing traffic. Don't expect websites to load (at all) if gaming has a higher downstream limit than web browsing, for example. :p If you fix that with a rule, shoving it down into Downloads, some Steam game traffic ends up in Downloads too. Ugh. You'll get rubber banding and ping spikes then, if anything else needs/takes bandwidth, since Downloads get cut first. Ping and connection reliability has a problem either way, but there is a fix.

Before I figured it out, I had a weekend where websites mysteriously started taking 500 seconds to load. The solution was simply to cap Gaming at 80% of my 50/10mbit connection. (Syncs at about 58/12.5mbit) Right now I give Gaming up to 40mbit, which is adequate for XBox downloads (in theory they take 30% longer to download, but who cares?), which still leaves a good amount of bandwidth for everything else even when it's being a hog.

My games are ping spike free, overall. Very stable connection, even with torrents going in the background. I don't shut anything off when doing Speedtests, because I want a real picture of how things are going. No complaints at all in some of my favourites (Deep Rock Galactic, etc.) - I'm not doing super competitive eSports, but I would notice a laggy connection even in titles like DRG. Some games have server issues from time to time, but usually everyone is complaining about it on Steam, indicating that it's very prevalent. Considering how few times per year I notice any issues, I'd say that it's working as intended.

@dave14305 "Post-retirement"? Are you shelving things for a while? FlexQOS is quite the project. I hope after all this effort, if there's a new generation of routers coming out, you'll take a stab at supporting them. I can't imagine "upgrading" in a few years and not having proper QOS! I'll be running around asking if anyone has seen dave14305 in 2025. ;)
 

Attachments

  • image_2022-12-24_104103199.png
    image_2022-12-24_104103199.png
    46.6 KB · Views: 65
Last edited:
Yes. #1 cause of ping spikes is first and foremost, FlowCache. I have a script disable that on router reboot. Some packets take 500ms to get through FlowCache, so while good for throughput, it's not so good for latency. It also scrambles the classifications. With torrent traffic going, disabling this was 100% essential.

Second is thinking up defensive limits, in case there's a mis-classification. A good example is XBox download traffic is usually classified as Gaming. That means if you have it set to a high priority and have high downstream limits, it's going to nail your whole connection and kill all competing traffic. Don't expect websites to load (at all) if gaming has a higher downstream limit than web browsing, for example. :p If you fix that with a rule, shoving it down into Downloads, some Steam game traffic ends up in Downloads too. Ugh. You'll get rubber banding and ping spikes then, if anything else needs/takes bandwidth, since Downloads get cut first. Ping and connection reliability has a problem either way, but there is a fix.

Before I figured it out, I had a weekend where websites mysteriously started taking 500 seconds to load. The solution was simply to cap Gaming at 80% of my 50/10mbit connection. (Syncs at about 58/12.5mbit) Right now I give Gaming up to 40mbit, which is adequate for XBox downloads (in theory they take 30% longer to download, but who cares?), which still leaves a good amount of bandwidth for everything else even when it's being a hog.

My games are ping spike free, overall. Very stable connection, even with torrents going in the background. I don't shut anything off when doing Speedtests, because I want a real picture of how things are going. No complaints at all in some of my favourites (Deep Rock Galactic, etc.) - I'm not doing super competitive eSports, but I would notice a laggy connection even in titles like DRG. Some games have server issues from time to time, but usually everyone is complaining about it on Steam, indicating that it's very prevalent. Considering how few times per year I notice any issues, I'd say that it's working as intended.

@dave14305 "Post-retirement"? Are you shelving things for a while? FlexQOS is quite the project. I hope after all this effort, if there's a new generation of routers coming out, you'll take a stab at supporting them. I can't imagine "upgrading" in a few years and not having proper QOS! I'll be running around asking if anyone has seen dave14305 in 2025. ;)
@BikeHelmet you mind sharing pics of your new Flex internal setup? Are they still similar to your post #21 on page 2? I appreciate itband Merry Christmas to all.


I do hope @dave14305 continues to support future QoS for newer routers!!!! But I definitely do understand if he doesn't!!!
 
@BikeHelmet you mind sharing pics of your new Flex internal setup? Are they still similar to your post #21 on page 2? I appreciate itband Merry Christmas to all.


I do hope @dave14305 continues to support future QoS for newer routers!!!! But I definitely do understand if he doesn't!!!
Similar? Yes. Exactly the same? No. I do have 50/10mbit VDSL2 now. Sync rate is up around 58/59 and 12/12.5 depending on conditions. Cable in the area is having issues, so it made sense to switch to something more reliable.

There are some changes, but they are very situation specific, and may not apply to most people.

I have been doing remote work, so I added in Work-From-Home at the top and put some more important stuff in there. (Like Zoom meetings and TeamViewer) That allows people to be gaming and not interfere with it more critical stuff. There's still enough bandwidth that everything functions, but I might reduce Work-From-Home's outbound bandwidth by 10% if games were having issues. (For example, when sending large files back and forth with TeamViewer.)

XBox comfortably gets the back seat, which is good.


You'll notice that I'm using two strategies. On the inbound column, there isn't enough minimum bandwidth to guarantee that everything gets the required bandwidth at all times. 50mbit isn't a huge amount to play with. A 4K stream can be 10-20mbit, and most 1080p is at least 3-4mbit. But I really don't want Streaming (with huge 60 second buffers) to go ahead of realtime traffic and latency sensitive stuff like web browsing. Since I can't increase the minimums much without one category or another going down, potentially destroying the responsiveness of that category when a top bucket/category is under heavy load, they are instead quite balanced across all the priority levels, giving everything enough speed to continue happening (if a bit slower); generally this works fine. I then drop the maximums so increase the likelihood that two or three categories share and have all the bandwidth that they need. Streaming has enough (just from the minimums) to maintain 4 average quality streams within the home, or one 4K stream, even if something above it in priority is also gobbling bandwidth. The lower maximums on Gaming and Work From Home prevent those from hogging everything, allowing at least two other categories to get more than expected (more than minimum) bandwidth even when under high utilization. It works pretty well, but sacrifices maximum throughput for some mis-classified XBox downloads and things like TeamViewer file transfers. Might also take longer to load into a game server and receive mod data, unless they use HTTPS (Web Surfing), etc.

On the outbound side, very few categories require as much guaranteed bandwidth, so it's a lot more simple. Crank up the minimum as required on the important categories, keep it low on the rest to choke them as needed, and make sure that total utilization remains within a level that doesn't affect connection ping greatly. Just in case something ends up in the wrong bucket, even unimportant ones have minimums above 1%. This simply improves failure outcomes. If somehow an upload to a website ended up in File Transfers rather than Web Surfing, it'd go at least 4x faster than if it was at 1%, assuming no torrents are active and some other upload is hogging the whole connection. (To force it to the minimum speed.) That would be rare, but if it happened it'd annoy people less having a 45 second upload rather than a 180 second upload.

XBox's are the main bad actor for QOS. An XBox can have connections that are in 6 category buckets - Work-From-Home, Gaming, Web Surfing, Other, Streaming, and File Transfers. If you have an XBox, and have trouble when it's active, you may want to just categorize it by IP address into some mid-tier or low-tier category to stop it from interfering. You would degrade its experience, but save the rest of the network. It is the trickiest device to work around. XBox's love maxing out your buckets completely, whatever they are. I have observed one doing a huge 100GB game download (which takes a while) - in FlexQOS, it had huge amounts of data coming in on Gaming, Web Surfing, Other, and File Transfers. Realistically, downloads should all be File Transfers, not 4 separate categories. I finally got annoyed and shoved some of it by DSCP mark into Learn-From-Home. It can still get the minimums at all times. :p Besides, if a connection is too slow, it'll just try dozens more until it gets one into the Gaming category, maxing that out. Such a PITA device. Microsoft! o_O
 
Status
Not open for further replies.

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top