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!

Run flexqos debug where you will see new lines for Quantum. I’d like to know if any are not “default”.

I was hesitant to change the minimum quantum, so I’m not sure what to have you look for, but knowing if you see any odd behavior or slowdowns will be useful. This minimum may not stay in the final release, but it’s worth trying during beta.
Code:
FlexQoS v0.9.2 released 07/09/2020

Debug:

tc WAN iface: eth0
Undf Prio: 2
Undf FlowID: 1:13
Classes Present: 8
Down Band: 16384
Up Band  : 1382
***********
Net Control = 1:10
Work-From-Home = 1:14
Gaming = 1:11
Others = 1:13
Web Surfing = 1:15
Streaming = 1:12
Downloads = 1:17
Defaults = 1:16
***********
Downrates -- 819, 2457, 4915, 1638, 3276, 1638, 819, 819
Downceils -- 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384
Downbursts -- 3198b, 3198b, 3197b, 3198b, 3198b, 3198b, 3199b, 3199b
DownCbursts -- 19193b, 19193b, 19193b, 19193b, 19193b, 19193b, 19193b, 19193b
DownQuantums -- default, default, default, default, default, default, default, default
***********
Uprates -- 69, 207, 138, 414, 276, 138, 69, 69
Upceils -- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382
Upbursts -- 3199b, 3198b, 3198b, 3199b, 3198b, 3199b, 3198b, 3199b
UpCbursts -- 3198b, 3198b, 3198b, 3198b, 3198b, 3198b, 3198b, 3198b
UpQuantums -- 1514, default, default, default, default, default, 1514, 1514
iptables settings: <>>udp>>500,4500>>3<>>udp>16384:16415>>>3<>>tcp>>119,563>>5<>>tcp>>80,443>08****>7
iptables -D POSTROUTING -t mangle -o br0   -p udp  -m multiport  --sports 500,4500  -j MARK --set-mark 0x80060001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o br0   -p udp  -m multiport  --sports 500,4500  -j MARK --set-mark 0x80060001
iptables -D POSTROUTING -t mangle -o debug   -p udp  -m multiport  --dports 500,4500  -j MARK --set-mark 0x40060001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o debug   -p udp  -m multiport  --dports 500,4500  -j MARK --set-mark 0x40060001
iptables -D POSTROUTING -t mangle -o br0   -p udp  --dport 16384:16415   -j MARK --set-mark 0x80060001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o br0   -p udp  --dport 16384:16415   -j MARK --set-mark 0x80060001
iptables -D POSTROUTING -t mangle -o debug   -p udp  --sport 16384:16415   -j MARK --set-mark 0x40060001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o debug   -p udp  --sport 16384:16415   -j MARK --set-mark 0x40060001
iptables -D POSTROUTING -t mangle -o br0   -p tcp  -m multiport  --sports 119,563  -j MARK --set-mark 0x80030001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o br0   -p tcp  -m multiport  --sports 119,563  -j MARK --set-mark 0x80030001
iptables -D POSTROUTING -t mangle -o debug   -p tcp  -m multiport  --dports 119,563  -j MARK --set-mark 0x40030001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o debug   -p tcp  -m multiport  --dports 119,563  -j MARK --set-mark 0x40030001
iptables -D POSTROUTING -t mangle -o br0   -p tcp  -m multiport  --sports 80,443 -m mark --mark 0x80080000/0xc03f0000 -j MARK --set-mark 0x803f0001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o br0   -p tcp  -m multiport  --sports 80,443 -m mark --mark 0x80080000/0xc03f0000 -j MARK --set-mark 0x803f0001
iptables -D POSTROUTING -t mangle -o debug   -p tcp  -m multiport  --dports 80,443 -m mark --mark 0x40080000/0xc03f0000 -j MARK --set-mark 0x403f0001 >/dev/null 2>&1
iptables -A POSTROUTING -t mangle -o debug   -p tcp  -m multiport  --dports 80,443 -m mark --mark 0x40080000/0xc03f0000 -j MARK --set-mark 0x403f0001
appdb rules: <000000>6<00006B>6<0D0007>5<0D0086>5<0D00A0>5<12003F>4<13****>4<14****>4<1A****>5
realtc filter change dev br0 prio 2 protocol all handle 827::800 u32 flowid 1:13
realtc filter change dev eth0 prio 2 protocol all handle 827::800 u32 flowid 1:13
realtc filter add dev br0 protocol all prio 2 u32 match mark 0x8000006B 0xc03fffff flowid 1:13
realtc filter add dev eth0 protocol all prio 2 u32 match mark 0x4000006B 0xc03fffff flowid 1:13
realtc filter add dev br0 protocol all prio 15 u32 match mark 0x800D0007 0xc03fffff flowid 1:17
realtc filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0007 0xc03fffff flowid 1:17
realtc filter add dev br0 protocol all prio 15 u32 match mark 0x800D0086 0xc03fffff flowid 1:17
realtc filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0086 0xc03fffff flowid 1:17
realtc filter add dev br0 protocol all prio 15 u32 match mark 0x800D00A0 0xc03fffff flowid 1:17
realtc filter add dev eth0 protocol all prio 15 u32 match mark 0x400D00A0 0xc03fffff flowid 1:17
realtc filter add dev br0 protocol all prio 20 u32 match mark 0x8012003F 0xc03fffff flowid 1:15
realtc filter add dev eth0 protocol all prio 20 u32 match mark 0x4012003F 0xc03fffff flowid 1:15
realtc filter change dev br0 prio 22 protocol all handle 802::800 u32 flowid 1:15
realtc filter change dev eth0 prio 22 protocol all handle 802::800 u32 flowid 1:15
realtc filter change dev br0 prio 23 protocol all handle 804::800 u32 flowid 1:15
realtc filter change dev eth0 prio 23 protocol all handle 804::800 u32 flowid 1:15
realtc filter change dev br0 prio 2 protocol all handle 827::802 u32 flowid 1:17
realtc filter change dev eth0 prio 2 protocol all handle 827::802 u32 flowid 1:17
realtc class change dev br0 parent 1:1 classid 1:10 htb overhead 18 linklayer ethernet prio 0 rate 819Kbit ceil 16384Kbit burst 3198b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:11 htb overhead 18 linklayer ethernet prio 1 rate 2457Kbit ceil 16384Kbit burst 3198b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:12 htb overhead 18 linklayer ethernet prio 2 rate 4915Kbit ceil 16384Kbit burst 3197b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:13 htb overhead 18 linklayer ethernet prio 3 rate 1638Kbit ceil 16384Kbit burst 3198b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:14 htb overhead 18 linklayer ethernet prio 4 rate 3276Kbit ceil 16384Kbit burst 3198b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:15 htb overhead 18 linklayer ethernet prio 5 rate 1638Kbit ceil 16384Kbit burst 3198b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:16 htb overhead 18 linklayer ethernet prio 6 rate 819Kbit ceil 16384Kbit burst 3199b cburst 19193b
realtc class change dev br0 parent 1:1 classid 1:17 htb overhead 18 linklayer ethernet prio 7 rate 819Kbit ceil 16384Kbit burst 3199b cburst 19193b
realtc class change dev eth0 parent 1:1 classid 1:10 htb overhead 18 linklayer ethernet prio 0 rate 69Kbit ceil 1382Kbit burst 3199b cburst 3198b quantum 1514
realtc class change dev eth0 parent 1:1 classid 1:11 htb overhead 18 linklayer ethernet prio 1 rate 207Kbit ceil 1382Kbit burst 3198b cburst 3198b
realtc class change dev eth0 parent 1:1 classid 1:12 htb overhead 18 linklayer ethernet prio 2 rate 138Kbit ceil 1382Kbit burst 3198b cburst 3198b
realtc class change dev eth0 parent 1:1 classid 1:13 htb overhead 18 linklayer ethernet prio 3 rate 414Kbit ceil 1382Kbit burst 3199b cburst 3198b
realtc class change dev eth0 parent 1:1 classid 1:14 htb overhead 18 linklayer ethernet prio 4 rate 276Kbit ceil 1382Kbit burst 3198b cburst 3198b
realtc class change dev eth0 parent 1:1 classid 1:15 htb overhead 18 linklayer ethernet prio 5 rate 138Kbit ceil 1382Kbit burst 3199b cburst 3198b
realtc class change dev eth0 parent 1:1 classid 1:16 htb overhead 18 linklayer ethernet prio 6 rate 69Kbit ceil 1382Kbit burst 3198b cburst 3198b quantum 1514
realtc class change dev eth0 parent 1:1 classid 1:17 htb overhead 18 linklayer ethernet prio 7 rate 69Kbit ceil 1382Kbit burst 3199b cburst 3198b quantum 1514
 
Was the download occuring over ports 80 or 443? Need to see your other rules to see if anything overrode them.
Here is my configuration. The IPs listed are for a different service, and I believe the download was using port 443 . I have not changed the AppDB table, I'm not sure why there are empty spots in the middle.
upload_2020-7-9_20-52-14.png
 
Here is my configuration. The IPs listed are for a different service, and I believe the download was using port 443 . I have not changed the AppDB table, I'm not sure why there are empty spots in the middle.
View attachment 24632
I can only guess that your firewall rules were reset at some point, which would erase the custom rules. It’s the only way I can think of that something showing in the connection list as Game Transferring would still show up in Gaming.

Fix the AppDB section by deleting the empty rows or clicking the Reset link in the heading and clicking Apply.
 
I can only guess that your firewall rules were reset at some point, which would erase the custom rules. It’s the only way I can think of that something showing in the connection list as Game Transferring would still show up in Gaming.

Fix the AppDB section by deleting the empty rows or clicking the Reset link in the heading and clicking Apply.
Thanks, I did the reset. If I see it happening again, is there additional debug info that would help?
 
Thanks, I did the reset. If I see it happening again, is there additional debug info that would help?
It could have been old problems with earlier versions, depending how long you’ve been running it. But after the reset, it should remain stable.
 
I use this rules:D
DownCeil="$(printf "%.0f" $(nvram get qos_ibw))"
UpCeil="$(printf "%.0f" $(nvram get qos_obw))"
DownCeil="$(expr ${DownCeil} \* 95 / 100)"
UpCeil="$(expr ${UpCeil} \* 95 / 100)"
 
I use this rules:D
DownCeil="$(printf "%.0f" $(nvram get qos_ibw))"
UpCeil="$(printf "%.0f" $(nvram get qos_obw))"
DownCeil="$(expr ${DownCeil} \* 95 / 100)"
UpCeil="$(expr ${UpCeil} \* 95 / 100)"
I do also it rounds the bandwidth to a whole number and makes it what ever percentage is set.
 
Dave, I had to remove Flex this morning. After the last change, my router locked up and I couldn't connect to it anymore. I only have 15 up and 1.5 down if that is relevant. I did post that debug info in post #501. At the time it was working fine as far as I could tell with no custom rules other than what is in the script.
 
Dave, I had to remove Flex this morning. After the last change, my router locked up and I couldn't connect to it anymore. I only have 15 up and 1.5 down if that is relevant. I did post that debug info in post #501. At the time it was working fine as far as I could tell with no custom rules other than what is in the script.
I doubt flex would be the cause of your issue. If you use amtm, download option 'J3'. If you get this issue again, ssh into router and reset the web. This should allow you to log back in.
 
I doubt flex would be the cause of your issue. If you use amtm, download option 'J3'. If you get this issue again, ssh into router and reset the web. This should allow you to log back in.

I have no idea what caused the issue. Just trying to be helpful. Dave posted this with the last update:

I was hesitant to change the minimum quantum, so I’m not sure what to have you look for, but knowing if you see any odd behavior or slowdowns will be useful. This minimum may not stay in the final release, but it’s worth trying during beta.

I have an RT-AC68U and much slower internet than basically everyone here, I guess.
 
I have no idea what caused the issue. Just trying to be helpful. Dave posted this with the last update:



I have an RT-AC68U and much slower internet than basically everyone here, I guess.
Did the whole router lock up (no traffic to/from internet), or just the web interface?
 
@dave14305 what made you decide to reapply rules every 5min ? Why not every hour or maybe every 4 hours ?
 
@dave14305 what made you decide to reapply rules every 5min ? Why not every hour or maybe every 4 hours ?
It's a one-time check that occurs 5 minutes after the script applies the tc rules. If that 5 minute job has to apply rules for any reason, it will trigger another job 5 minute later to make sure the changes stick.

Do you see it running every 5 minutes?
 
Did the whole router lock up (no traffic to/from internet), or just the web interface?

I should have checked closer. There was no internet service and the web interface was unreachable. I had an ssh session open in PuTTY and it did not disconnect until I rebooted. My wife was streaming Philo or YouTube TV and I was working in my office and the internet went out for all devices. I couldn't connect to my modem's web page nor the router. The modem looked fine from looking at the lights on it. Rebooting the Asus resolved the issue.
 
It's a one-time check that occurs 5 minutes after the script applies the tc rules. If that 5 minute job has to apply rules for any reason, it will trigger another job 5 minute later to make sure the changes stick.

Do you see it running every 5 minutes?
Yep my log is filled with them but luckily the too big message is gone.
 
I have no idea what caused the issue. Just trying to be helpful. Dave posted this with the last update:



I have an RT-AC68U and much slower internet than basically everyone here, I guess.

I've noted the same on my AC68U -- locks up occasionally (maybe too often). Interesting it's just not myself seeing this.
 
Yep my log is filled with them but luckily the too big message is gone.
Have you deleted the Untracked appdb rule, or set it to Game Downloads? Can you post a 10-minute syslog excerpt showing what happens between 3 different invocations of the check?
 
I've noted the same on my AC68U -- locks up occasionally (maybe too often). Interesting it's just not myself seeing this.
What does your debug output show for UpQuantums/DownQuantums?
 
Have you deleted the Untracked appdb rule, or set it to Game Downloads? Can you post a 10-minute syslog excerpt showing what happens between 3 different invocations of the check?
Log.png

Only thing I changed was the local IP (PS4 system) under the "Game Downloads" section
 
Log.png

Only thing I changed was the local IP (PS4 system) under the "Game Downloads" section
That's only 1 occurrence. I want to understand why it's triggering so often. I want to also see what happened at 17:34 or 17:44.

Or you can run:
Code:
sh -x /jffs/addons/flexqos/flexqos.sh check
and PM me the results via pastebin.com.
 

Latest threads

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