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!

Looking for feedback from FlexQoS users about whether the FlexQoS scheduled check at 3:30 AM ever does anything on your router. It doesn't on mine, suggesting it could be removed.

Please run the command below to search your syslogs for the nightly check and let me know if it ever doesn't say "No TC modifications necessary"

Bash:
grep -E "^[A-Za-z]{3} [0-9]{1,2} 03:30:[0-9]{2} FlexQoS:" /tmp/syslog.log-1 /tmp/syslog.log

Code:
/tmp/syslog.log-1:Oct 20 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=5139) called with 1 args: -check
/tmp/syslog.log-1:Oct 20 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 21 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=31067) called with 1 args: -check
/tmp/syslog.log-1:Oct 21 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 22 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=15949) called with 1 args: -check
/tmp/syslog.log-1:Oct 22 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 23 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=8386) called with 1 args: -check
/tmp/syslog.log-1:Oct 23 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 24 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=30462) called with 1 args: -check
/tmp/syslog.log-1:Oct 24 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 25 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=12105) called with 1 args: -check
/tmp/syslog.log-1:Oct 25 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 26 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=23257) called with 1 args: -check
/tmp/syslog.log:Oct 26 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 27 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=5233) called with 1 args: -check
/tmp/syslog.log:Oct 27 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 28 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=28006) called with 1 args: -check
/tmp/syslog.log:Oct 28 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 29 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=9353) called with 1 args: -check
/tmp/syslog.log:Oct 29 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 30 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=27442) called with 1 args: -check
/tmp/syslog.log:Oct 30 03:30:02 FlexQoS: No TC modifications necessary
I seem to remember back when I used FreshJR version the check only looked for tc rules, but if iptables rules had wandered off it wouldn't reapply due to the logic test used. I hacked up the persistence check to make it always reapply instead of conditionally. I don't know if you improved how the check worked or not so thought I'd mention it
 
I seem to remember back when I used FreshJR version the check only looked for tc rules, but if iptables rules had wandered off it wouldn't reapply due to the logic test used. I hacked up the persistence check to make it always reapply instead of conditionally. I don't know if you improved how the check worked or not so thought I'd mention it
Yes, back in August I put additional logic in the check to count the iptables rules present compared to what’s expected. If fewer than expected, initiate a firewall restart instead of just applying the tc rules only.
 
Hi,

I've installed FlexQoS v1.0.5 but it seems to have really hit my WAN performance.

I have Virgin Media and, if I enable Traditional QoS, I get 365 Mbps down and 35 Mbps up. If I enable Flex QoS, this reduces to 240 Mbps down and 25 Mbps up.

Is this a known issue? I have disabled FlexQoS, but even enabling Adaptive QoS now seems to hit the WAN speed.

With FlexQoS enabled my router's CPU is maxing out at 33% on Core 1, so I don't think it is maxing out the CPU.

Am I missing something? Are there some settings that I need to tweak?

Thanks,
 

Attachments

  • image_2020-11-01_154758.png
    image_2020-11-01_154758.png
    14.6 KB · Views: 100
  • image_2020-11-01_160344.png
    image_2020-11-01_160344.png
    14.7 KB · Views: 102
  • image_2020-11-01_160536.png
    image_2020-11-01_160536.png
    14.4 KB · Views: 92
Last edited:
Hi Dave,

Thank you for the amazing script which finally made the QoS work for me. I mainly use it to make sure that my HiFi Lossless Audio streaming which requires 2-4Mb/s and is very time sensitive does not get interrupted when the kids play games and stream movies or use TikTok. To do that I have created a custom rule to route the streaming traffic from my streamer to the "Others" Class which I moved all the way to the top of the priority list just below "Net Control". Most of the streaming traffic gets classified by Trend Micro engine as Mark 030005 or Mark 040050. The issues I experience is that when I use Mark 030005 in the IP table rules whilst the traffic is classified as "Others" under the Tracked connection there is no bandwidth utilization shown in the pie chart under Others Class (see V1) and I believe the traffic is classified as "File transfer" which is the original Trend Micro Classification. However when I use Mark 03**** in the IP table rules it all works fine (see V2). Bizarrely when I set the Mark to 030000 in the IP table rules it still shows the Bandwidth utilization under "Others" Class in the pie chard but under the Tracked connection there is no traffic shown under "Others" class since I don't even know if there is an App with Mark 030000 (see V3) but certainly my streamer does not generate traffic with Mark to 030000.

I hope that helps.
 

Attachments

  • V1.png
    V1.png
    436 KB · Views: 117
  • V2.png
    V2.png
    455.5 KB · Views: 116
  • V3.png
    V3.png
    444.1 KB · Views: 104
Last edited:
Hi Dave,

Thank you for the amazing script which finally made the QoS work for me. I mainly use it to make sure that my HiFi Lossless Audio streaming which requires 2-4Mb/s and is very time sensitive does not get interrupted when the kids play games and stream movies or use TikTok. To do that I have created a custom rule to route the streaming traffic from my streamer to the "Others" Class which I moved all the way to the top of the priority list just below "Net Control". Most of the streaming traffic gets classified by Trend Micro engine as Mark 030005 or Mark 040050. The issues I experience is that when I use Mark 030005 in the IP table rules whilst the traffic is classified as "Others" under the Tracked connection there is no bandwidth utilization shown in the pie chart under Others Class (see V1) and I believe the traffic is classified as "File transfer" which is the original Trend Micro Classification. However when I use Mark 03**** in the IP table rules it all works fine (see V2). Bizarrely when I set the Mark to 030000 in the IP table rules it still shows the Bandwidth utilization under "Others" Class in the pie chard but under the Tracked connection there is no traffic shown under "Others" class since I don't even know if there is an App with Mark 030000 (see V3) but certainly my streamer does not generate traffic with Mark to 030000.

I hope that helps.
Run flexqos debug at the SSH command prompt and paste the results, please.
 
Run flexqos debug at the SSH command prompt and paste the results, please.

Thanks Dave,

Please see attached. I ran the command when I had V1, V2 and V3 setups. I'm not sure if this will make any difference but just in case.
 

Attachments

  • Debug.pdf
    124.1 KB · Views: 104
Thanks Dave,

Please see attached. I ran the command when I had V1, V2 and V3 setups. I'm not sure if this will make any difference but just in case.
I am pushing a hotfix since I seem to have introduced a bug when I implemented the inverted mark logic. Check for an update in a few minutes and see if it helps.
 
I am pushing a hotfix since I seem to have introduced a bug when I implemented the inverted mark logic. Check for an update in a few minutes and see if it helps.

Many thanks Dave,

It all woks fine now.

PS Any plans to introduce the ability to put multiple Marks in a rule similar to what I can do with Ports and IP Addresses?
 
Many thanks Dave,

It all woks fine now.

PS Any plans to introduce the ability to put multiple Marks in a rule similar to what I can do with Ports and IP Addresses?
Good to hear.

With the ability to add individual marks or wildcard marks, I'm not sure I could deal with the logic of handling both scenarios in the same rule if someone tried to add both at once.
 
Good to hear.

With the ability to add individual marks or wildcard marks, I'm not sure I could deal with the logic of handling both scenarios in the same rule if someone tried to add both at once.
No problem it makes sense. I did add an extra line in the IP Table with different mark so that does the job.
 
Hi,

I've installed FlexQoS v1.0.5 but it seems to have really hit my WAN performance.

I have Virgin Media and, if I enable Traditional QoS, I get 365 Mbps down and 35 Mbps up. If I enable Flex QoS, this reduces to 240 Mbps down and 25 Mbps up.

Is this a known issue? I have disabled FlexQoS, but even enabling Adaptive QoS now seems to hit the WAN speed.

With FlexQoS enabled my router's CPU is maxing out at 33% on Core 1, so I don't think it is maxing out the CPU.

Am I missing something? Are there some settings that I need to tweak?

Thanks,
Adaptive QoS will partially disable NAT acceleration, so a possible drop in throughput could be expected if your speeds are high enough and CPU slow enough. Traditional QoS will FULLY disable NAT acceleration, so the throughput effects should be far worse. You claim the opposite, so something is abnormal to me in your setup.

To fully restore all NAT acceleration, withdraw consent for Trend Micro on the Admin / Privacy page and reboot the router.

FlexQoS shouldn’t be suffering any more than Adaptive QoS though, so I don’t think it’s specifically related to the script.
 
If not sooner, when 386.1 gets released I will remove support within FlexQoS to import and convert old FreshJR_QOS nvram settings to the new FlexQoS/Merlin API format. If FreshJR_QOS diehards haven't converted by now, they'll have to start from scratch (looking at you @Sinner ;)).

It's time to shed the legacy baggage that adds complexity to the code. And by baggage I only mean the code I wrote to convert the old rules, not the core gold of FreshJR's genius. I still marvel sometimes how he was able to write in javascript a function that interprets and applies iptables syntax to a list of connections. That code logic is still mostly untouched and remains the secret sauce of the webui.

I also need to rationalize (a popular IT buzzword these days) the multiple update-related functions that have made their way into the script lately and consolidate them.
 
Hi Dave. After some time with Flexqos I need to inquire about successfully using ZOOM conferencing with this. I see you have a "well known rule" that can be applied for zoom.. but i am thinking those listed ports cant be enough to cover off everything ZOOM uses. My wife is an avid user and one thing that keeps happening even with this rule turned on is she keeps getting either audio drop outs, or low bandwidth warnings, or both even though there is plenty of bandwidth when I check and the ISP is not throttling. Do you have something built in to the code that classifies audio and video traffic from things like zoom, webex and so on? Or do we need to create more "well known app rules" to move the audio for example to the same class as the existing "well known" rule you have? many thanks for your thoughts. Edward
 
Hi Dave. After some time with Flexqos I need to inquire about successfully using ZOOM conferencing with this. I see you have a "well known rule" that can be applied for zoom.. but i am thinking those listed ports cant be enough to cover off everything ZOOM uses. My wife is an avid user and one thing that keeps happening even with this rule turned on is she keeps getting either audio drop outs, or low bandwidth warnings, or both even though there is plenty of bandwidth when I check and the ISP is not throttling. Do you have something built in to the code that classifies audio and video traffic from things like zoom, webex and so on? Or do we need to create more "well known app rules" to move the audio for example to the same class as the existing "well known" rule you have? many thanks for your thoughts. Edward
I haven’t seen any issues personally with Zoom and I have two children on Zoom throughout the day for classes. I also have the Skype/Teams rule setup which shares ports 3478-3479 with Zoom, so try adding that if not done already.

Besides that, you’ll then need to study what the connections from your wife’s machine look like in the Tracked Connections table. I usually pay close attention to just udp connections in these cases.

I don’t do any classification within the script. It’s all done by the Trend Micro component of the firmware, or else any custom rules visible in the GUI.

EDIT: Also make sure you’re running the latest hotfix since there was a bug found on Sunday.
 
Last edited:
Adaptive QoS will partially disable NAT acceleration, so a possible drop in throughput could be expected if your speeds are high enough and CPU slow enough. Traditional QoS will FULLY disable NAT acceleration, so the throughput effects should be far worse. You claim the opposite, so something is abnormal to me in your setup.

To fully restore all NAT acceleration, withdraw consent for Trend Micro on the Admin / Privacy page and reboot the router.

FlexQoS shouldn’t be suffering any more than Adaptive QoS though, so I don’t think it’s specifically related to the script.

Hi Dave,

Thanks for that suggestion. It was the perfect solution.

------------------

**** Edit ****

Revoking the Trend Micro permissions has disabled Adaptive QoS. If I enable Adaptive QoS it then brings up the Trend Micro agreement again?

1st Screenshot is with Trend Micro and QoS disabled.
2nd Screenshot is with Trend Micro and Adaptive QoS enabled.

I have applied the hotfix.

Thanks,
 

Attachments

  • image_2020-11-03_233834.png
    image_2020-11-03_233834.png
    53.3 KB · Views: 106
  • image_2020-11-04_004006.png
    image_2020-11-04_004006.png
    45.3 KB · Views: 98
Last edited:
I haven’t seen any issues personally with Zoom and I have two children on Zoom throughout the day for classes. I also have the Skype/Teams rule setup which shares ports 3478-3479 with Zoom, so try adding that if not done already.

Besides that, you’ll then need to study what the connections from your wife’s machine look like in the Tracked Connections table. I usually pay close attention to just udp connections in these cases.

I don’t do any classification within the script. It’s all done by the Trend Micro component of the firmware, or else any custom rules visible in the GUI.

EDIT: Also make sure you’re running the latest hotfix since there was a bug found on Sunday.

you might have something there. Those port numbers match up with this article https://onlinezoomappdownload.com/i...equirements-tcp-8801-8902-9090-udp-3478-3479/
 
Hi Dave, when the signatures are automatically updated, FlexQoS runs afterwards and re-applies the tc rules. However on HND routers such as the RT-AX88U, the tc rules are added instead of the existing ones being replaced which leads to an increase of the rule count every time FlexQoS applies them. This might lead to strange side effects.
Is it possible not applying tc rules after a signature update?
 
Hi Dave, when the signatures are automatically updated, FlexQoS runs afterwards and re-applies the tc rules. However on HND routers such as the RT-AX88U, the tc rules are added instead of the existing ones being replaced which leads to an increase of the rule count every time FlexQoS applies them. This might lead to strange side effects.
Is it possible not applying tc rules after a signature update?
I don’t plan to make it optional since it‘s desirable to reapply the rules after QoS gets reset. If the Asus/Trend bug continues in the 386 versions, I’ll think about a workaround.

I think the workaround would need to manually delete the existing qdiscs and force a service restart_qos. But fortunately for me, I don’t experience this bug so I couldn’t test to see how or if it would work.
 
Looking for feedback from FlexQoS users about whether the FlexQoS scheduled check at 3:30 AM ever does anything on your router. It doesn't on mine, suggesting it could be removed.

Please run the command below to search your syslogs for the nightly check and let me know if it ever doesn't say "No TC modifications necessary"

Bash:
grep -E "^[A-Za-z]{3} [0-9]{1,2} 03:30:[0-9]{2} FlexQoS:" /tmp/syslog.log-1 /tmp/syslog.log

Code:
/tmp/syslog.log-1:Oct 20 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=5139) called with 1 args: -check
/tmp/syslog.log-1:Oct 20 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 21 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=31067) called with 1 args: -check
/tmp/syslog.log-1:Oct 21 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 22 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=15949) called with 1 args: -check
/tmp/syslog.log-1:Oct 22 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 23 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=8386) called with 1 args: -check
/tmp/syslog.log-1:Oct 23 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 24 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=30462) called with 1 args: -check
/tmp/syslog.log-1:Oct 24 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log-1:Oct 25 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=12105) called with 1 args: -check
/tmp/syslog.log-1:Oct 25 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 26 03:30:01 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=23257) called with 1 args: -check
/tmp/syslog.log:Oct 26 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 27 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=5233) called with 1 args: -check
/tmp/syslog.log:Oct 27 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 28 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=28006) called with 1 args: -check
/tmp/syslog.log:Oct 28 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 29 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=9353) called with 1 args: -check
/tmp/syslog.log:Oct 29 03:30:02 FlexQoS: No TC modifications necessary
/tmp/syslog.log:Oct 30 03:30:00 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=27442) called with 1 args: -check
/tmp/syslog.log:Oct 30 03:30:02 FlexQoS: No TC modifications necessary
it does after a signature update which i believe happen at 2am. it reruns the script because aft a sig update its disabled
 
Is it possible not applying tc rules after a signature update?
Of course you can always comment out these 2 lines from /jffs/scripts/service-event-end:
Code:
if [ "$1" = "restart" ] && [ "$2" = "wrs" ]; then { sh /jffs/addons/flexqos/flexqos.sh -check & } ; fi # FlexQoS Addition
if [ "$1" = "start" ] && [ "$2" = "sig_check" ]; then { sh /jffs/addons/flexqos/flexqos.sh -check & } ; fi # FlexQoS Addition
You would only need to repeat this after a FlexQoS version update.
 

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