What's new

FlexQoS FlexQoS 1.0 - 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!

No sign of QoS restarting in syslog.

ASUSWRT-Merlin RT-AC68U 384.19_0 Fri Aug 14 19:17:44 UTC 2020
admin@RT-AC68U-E990:/tmp/home/root# realtc -s class show dev br0 parent 1:
class htb 1:11 parent 1:1 leaf 11: prio 1 rate 4608Kbit ceil 43776Kbit burst 4799b cburst 54391b
Sent 3359 bytes 11 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 11 borrowed: 0 giants: 0
tokens: 128688 ctokens: 155172

class htb 1:10 parent 1:1 leaf 10: prio 0 rate 460Kbit ceil 43776Kbit burst 3199b cburst 54391b
Sent 2001 bytes 20 pkt (dropped 0, overlimits 0 requeues 0)
rate 16bit 0pps backlog 0b 0p requeues 0
lended: 20 borrowed: 0 giants: 0
tokens: 841312 ctokens: 155032

class htb 1:1 root rate 46080Kbit ceil 46080Kbit burst 57600b cburst 57600b
Sent 242677408 bytes 195322 pkt (dropped 0, overlimits 0 requeues 0)
rate 1118Kbit 138pps backlog 0b 0p requeues 0
lended: 135122 borrowed: 0 giants: 0
tokens: 154657 ctokens: 154657

class htb 1:2 root leaf 2: prio 0 rate 1Gbit ceil 1Gbit burst 1249375b cburst 1249375b
Sent 1750540 bytes 1683 pkt (dropped 0, overlimits 0 requeues 0)
rate 328bit 1pps backlog 0b 0p requeues 0
lended: 1384 borrowed: 0 giants: 0
tokens: 156187 ctokens: 156187

class htb 1:13 parent 1:1 leaf 13: prio 3 rate 460Kbit ceil 43776Kbit burst 3199b cburst 54391b
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
Is that all the output? There should be lines for classes 1:10 - 1:17. Can you post the output of cat /tmp/flexqos_tcrules
 
Is that all the output? There should be lines for classes 1:10 - 1:17. Can you post the output of cat /tmp/flexqos_tcrules

admin@RT-AC68U-E990:/tmp/home/root# cat /tmp/flexqos_tcrules
filter add dev br0 protocol all prio 5 u32 match mark 0x8009ffff 0xc03fffff flowid 1:10
filter add dev eth0 protocol all prio 5 u32 match mark 0x4009ffff 0xc03fffff flowid 1:10
filter add dev br0 protocol all prio 5 u32 match mark 0x8006ffff 0xc03fffff flowid 1:16
filter add dev eth0 protocol all prio 5 u32 match mark 0x4006ffff 0xc03fffff flowid 1:16
filter add dev br0 protocol all prio 5 u32 match mark 0x8008ffff 0xc03fffff flowid 1:11
filter add dev eth0 protocol all prio 5 u32 match mark 0x4008ffff 0xc03fffff flowid 1:11
filter add dev br0 protocol all prio 5 u32 match mark 0x800affff 0xc03fffff flowid 1:12
filter add dev eth0 protocol all prio 5 u32 match mark 0x400affff 0xc03fffff flowid 1:12
filter add dev br0 protocol all prio 5 u32 match mark 0x8018ffff 0xc03fffff flowid 1:14
filter add dev eth0 protocol all prio 5 u32 match mark 0x4018ffff 0xc03fffff flowid 1:14
filter add dev br0 protocol all prio 5 u32 match mark 0x8004ffff 0xc03fffff flowid 1:15
filter add dev eth0 protocol all prio 5 u32 match mark 0x4004ffff 0xc03fffff flowid 1:15
filter add dev br0 protocol all prio 5 u32 match mark 0x8003ffff 0xc03fffff flowid 1:13
filter add dev eth0 protocol all prio 5 u32 match mark 0x4003ffff 0xc03fffff flowid 1:13
filter add dev br0 protocol all prio 5 u32 match mark 0x803fffff 0xc03fffff flowid 1:17
filter add dev eth0 protocol all prio 5 u32 match mark 0x403fffff 0xc03fffff flowid 1:17
filter add dev br0 protocol all prio 2 u32 match mark 0x80000000 0xc000ffff flowid 1:17
filter add dev eth0 protocol all prio 2 u32 match mark 0x40000000 0xc000ffff flowid 1:17
filter change dev br0 prio 7 protocol all handle 821::800 u32 flowid 1:17
filter change dev eth0 prio 7 protocol all handle 821::800 u32 flowid 1:17
filter change dev br0 prio 3 protocol all handle 822::800 u32 flowid 1:17
filter change dev eth0 prio 3 protocol all handle 822::800 u32 flowid 1:17
class change dev br0 parent 1:1 classid 1:10 htb prio 0 rate 460Kbit ceil 43776Kbit burst 3200b cburst 54400b quantum 5750
class change dev eth0 parent 1:1 classid 1:10 htb prio 0 rate 153Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 1912
class change dev br0 parent 1:1 classid 1:11 htb prio 1 rate 4608Kbit ceil 43776Kbit burst 4800b cburst 54400b quantum 57600
class change dev eth0 parent 1:1 classid 1:11 htb prio 1 rate 1536Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 19200
class change dev br0 parent 1:1 classid 1:12 htb prio 2 rate 460Kbit ceil 43776Kbit burst 3200b cburst 54400b quantum 5750
class change dev eth0 parent 1:1 classid 1:12 htb prio 2 rate 153Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 1912
class change dev br0 parent 1:1 classid 1:13 htb prio 3 rate 460Kbit ceil 43776Kbit burst 3200b cburst 54400b quantum 5750
class change dev eth0 parent 1:1 classid 1:13 htb prio 3 rate 153Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 1912
class change dev br0 parent 1:1 classid 1:14 htb prio 4 rate 460Kbit ceil 43776Kbit burst 3200b cburst 54400b quantum 5750
class change dev eth0 parent 1:1 classid 1:14 htb prio 4 rate 153Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 1912
class change dev br0 parent 1:1 classid 1:15 htb prio 5 rate 460Kbit ceil 43776Kbit burst 3200b cburst 54400b quantum 5750
class change dev eth0 parent 1:1 classid 1:15 htb prio 5 rate 153Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 1912
class change dev br0 parent 1:1 classid 1:16 htb prio 6 rate 2304Kbit ceil 27648Kbit burst 3200b cburst 33600b quantum 28800
class change dev eth0 parent 1:1 classid 1:16 htb prio 6 rate 768Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 9600
class change dev br0 parent 1:1 classid 1:17 htb prio 7 rate 2304Kbit ceil 27648Kbit burst 3200b cburst 33600b quantum 28800
class change dev eth0 parent 1:1 classid 1:17 htb prio 7 rate 768Kbit ceil 9216Kbit burst 3200b cburst 11200b quantum 9600
admin@RT-AC68U-E990:/tmp/home/root#
 
The rates are now working after I removed mark 000000 from 192.168.128/30
 

Attachments

  • Screenshot (99).png
    Screenshot (99).png
    382 KB · Views: 129
  • Screenshot (99)_LI.jpg
    Screenshot (99)_LI.jpg
    102.1 KB · Views: 123
Last edited:
a couple of questions when you have time.

1) when flexos installs... does it create a backup copy of whatever the router qos defaults were at the time of install... meaning when I uninstall it will go back to whatever the qos settings were before?

2) If I create a backup using the create backup feature of flexos that I see in amtm after install, will that overwrite any of the potential backup settings from install time (if there were any as queried above)

3) in the 1.0.5 you wrote of an enhancement :

  • Add DoT port 853 to router traffic exclusion hard-coded rule
Not entirely sure what you mean or what the effect of this is. Could you add some words please?

Many thanks

Edward
 
Had a power outage today, after power was back the FlexQoS tab was empty, only the headlines were there. "flexqos restart" didn't resolve it, only a forced "flexqos update" with "reinstall yes" fixed it. No idea what it was, had it the first time. Normally reboots don't do such things.
 
1) when flexos installs... does it create a backup copy of whatever the router qos defaults were at the time of install... meaning when I uninstall it will go back to whatever the qos settings were before?
FlexQoS won't change any of the original Adaptive QoS settings (bandwidth, QoS mode, scheduler), so when (or if) you uninstall it should be back to stock behavior.
2) If I create a backup using the create backup feature of flexos that I see in amtm after install, will that overwrite any of the potential backup settings from install time
The backup/restore feature only backs up the FlexQoS custom settings. No firmware settings are impacted.
3) in the 1.0.5 you wrote of an enhancement :

  • Add DoT port 853 to router traffic exclusion hard-coded rule
Not entirely sure what you mean or what the effect of this is. Could you add some words please?
This is actually a minor change made in the first release to prevent the router's DoT traffic (if enabled) from being classified as Downloads by the legacy rule created by the original FreshJR_QOS script. DoT on Merlin wasn't a thing back then, so this just helped to ensure it didn't get down-prioritized from Net Control to Downloads. I never fully understood the purpose early on, and only slightly understand it now. :)
 
Had a power outage today, after power was back the FlexQoS tab was empty, only the headlines were there. "flexqos restart" didn't resolve it, only a forced "flexqos update" with "reinstall yes" fixed it. No idea what it was, had it the first time. Normally reboots don't do such things.
I'm wondering if the extra javascript files didn't get generated on boot, which would break the UI. Any syslog hints?
 
I'm wondering if the extra javascript files didn't get generated on boot, which would break the UI. Any syslog hints?
Found nothing useful, but something was completely weird because qos bw was set to lte also but dsl was connected - so wan-event didn't run correct too... strange things happening... :D
 
I do have a question about the software operation. Let's say we have an ISP that is throttling download bandwidth to users between say 7pm-11pm each night based on an unknown formula that considers total number of users and also considers packet inspection. The amount of throttling varies with the load that evening from the user base they are seeing and the application you are using ... say file transfer get lower priority, VPNs get lower priority. Though voip, video and audio streaming get high priority from the ISP.

As an example somedays I might get 50% less than I pay for, other days 75% less than the nominal speed I pay for. And it changes as the load they see evolves. I dont really have an issue with this as I like the price. What do you feel is a better setting for your software in this case? Automatic bandwidth control or Manual as documented? Or dont use it at all?

Many thanks for your input.
 
Last edited:
I do have a question about the software operation. Let's say we have an ISP that is throttling download bandwidth to users between say 7pm-11pm each night based on an unknown formula that considers total number of users and also considers packet inspection. The amount of throttling varies with the load that evening from the user base they are seeing and the application you are using ... say file transfer get lower priority, VPNs get lower priority. Though video and audio streaming get high priority from the ISP.

So somedays I might get 50% less than I pay for, other days 75% less than the nominal speed I pay for. What do you feel is a better setting for your software in this case? Automatic bandwidth control or Manual as documented? Or dont use it at all?

Many thanks for your input.
I just had a similar discussion on Github about Automatic Bandwidth and I really have a hard time understanding why it exists, since it seems to default to an assumed bandwidth of 1895 Mbps, which is not useful when trying to prioritize classes of traffic (Gaming, Streaming, Work-From-Home, etc.).

I ride the coattails of the ASUS/Trend Micro Adaptive QoS engine (and RMerlin's awesome customization options), so I don't know I can prescribe what's best. But this script cannot meaningfully create custom rate adjustments per class when the base rates are based on fictitious bandwidth declarations of 1895 Mbps. I haven't looked deeply enough into how Auto bandwidth behaves over the long term (i.e. does it ever adjust itself from 1895 Mbps?) but in a previous post 5 years ago @vanic had shared that Auto bandwidth assumed 10 Gbps bandwidth.

For the purposes of this script, I would either set manual bandwidth to the worst-case scenario that you expect, or compromise somewhere in the middle and see how it goes. Or wait for me to get smarter, which could take a while. :oops:
 
But this script cannot meaningfully create custom rate adjustments per class
I was not going that far.. (but it would be nice) that sounds like something from a commercial class router that communicates with a more sophisticated network upstream than a residential isp connection offers. I was thinking more basically about what happens if I manually set the bandwidth to amounts that suddenly become no longer valid (manual setting is temporarily too large). My simplistic thinking was that with automatic at least the setting would automatically follow the speeds experienced in real life on some sort of refresh cycle... so mismatches would not last too long and FLEXQOS would not be uploading excessive amounts of traffic for any class.

If I set the manual bandwidth to a very low figure then aren't I essentially throttling my own overall connection to the max figures I input? I was hoping that automatic somehow tested or tracked the max speeds of the highest priority traffic I send and subsequently receive though my router and used that to gauge how fast a service the ISP was currently offering. However from your comments in the previous message it sounds like that is not at all what asus automatic does or possibly asus automatic does nothing in the worst case interpretation. and is just a marketing illusion
 
Last edited:
One thing that could maybe work for you is to create a cron job if throttling is active in a fixed timeframe only and then set the nvram values for up/down bw to the min throttled values you could expect, restart qos&firewall and when this timeframe is over do the same with the normal full-speed nvram values.

At least setting speed values in nvram followed by qos/firewall restart works fine, doing it myself when wan failover occurs (other scenario, same usecase). :)

Code:
nvram set qos_ibw=<down-bw in kbps - for example 8192 for 8 Mbps>
nvram set qos_obw=<up-bw in kbps - for example 1024 for 1 Mbps>
service "restart_qos;restart_firewall"
 
Hello,

I feel like something is really off with version 1.05. Im still getting random ping spikes while playing Call of Duty. i know its hard to notice with general use, but with super latency sensitive games its annoying when it happens. it was not like this in the previous version. maybe its the addition of "Add better error handling when custom appdb or rate rules fail"
 
Hello,

I feel like something is really off with version 1.05. Im still getting random ping spikes while playing Call of Duty. i know its hard to notice with general use, but with super latency sensitive games its annoying when it happens. it was not like this in the previous version. maybe its the addition of "Add better error handling when custom appdb or rate rules fail"
If I look at your earlier screenshot of your rules, you've deleted some of the default AppDB rules that move web traffic out of Net Control. So perhaps that's causing a problem. I also notice you cap your Upload Classes at 60%. Why? Better to cap it in the QoS page if it's the same for all Classes.
 
Hello,

I feel like something is really off with version 1.05. Im still getting random ping spikes while playing Call of Duty. i know its hard to notice with general use, but with super latency sensitive games its annoying when it happens. it was not like this in the previous version. maybe its the addition of "Add better error handling when custom appdb or rate rules fail"
Mine is running fine with the latest FlexQoS on the PS4 Pro (just added the gaming rule and nothing else). You realise it could be cod servers , you’re connection or simply cod’s bad netcode
 
Can anyone explain to me the syntax for the custom rules please as I'm not sure what the meaning of the ! is in front of some of the examples or the /34 (for example) after the IP addresses? I'm assuming all this is to be able to create just one rule to assign multiple network devices to it. For instance, I was thinking of adding my Fire TV Stick and our televisions to the streaming category, which have fixed IP addresses of 10.0.4.203; 10.0.4.204 & 10.0.4.205.
 

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