What's new

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

Switched to fq and it didn't make a difference. I turned off QoS and retested and got similar results. Tried other clients and they don't seem to have the same problem, which is strange because the throttled client is my desktop that I always use for testing because it gets highest throughout. This may be a 386 induced problem, but not sure yet.
Reinstalled wireless drivers and problem is resolved.
 
Please run these commands and post the output. Seems you are unable to download the webpage correctly.
Code:
grep flexqos.asp /tmp/syslog.log*
ls -l /tmp/flexqos*
df /tmp
ls -l /jffs/addons/flexqos
df /jffs
nslookup raw.githubusercontent.com
which md5sum
date
curl -v https://raw.githubusercontent.com/dave14305/FlexQoS/master/flexqos.asp -o /jffs/addons/flexqos/flexqos.asp
flexqos check
Problem now resolved. Turns out it was modem related. I'm stuck (happily) in rural France where 4g is the only game in town for reasonable internet (around 60 Mbps/dl, bit less up) I typically use 2 modems - a Huawei usb modem (apparently it's not in 'true' modem config) and another, bridged, Huawei 4g router connected via the wan port. For reasons I wont elaborate, I was accessing the internet entirely via the usb modem during setup of the ac86u. For all intents and purposes the modems have worked well for a couple of years (except in load balance config - forget it) . I came across an old post by FreshJR where he noted that all upload traffic has to pass through eth0 to be traffic managed. That explained why under my QoS traffic Classification tab showed no upload activity whatsover, although offered a nice pie chart of download traffic. In my world 1 + 1 usually = 3, so I removed the usb modem entirely, hooked up the eth0/wan port to the other 4g modem and boom, everything worked - your FlexQoS script installed as expected, upload traffic now visible and an issue with VOIP call disconnects disappeared. While I realise this is an unusual combination of circumstances, there's now quite a community of users who are abandoning their landlines and moving entirely to 4g - perhaps this experience may be useful to a few. Many thanks for your help and for the script!
 
Is FlexQoS supposed to limit upload and/or download speed of the built in speed test?

With Flex enabled, download speed of clients is appropriately limited, but download speed in router speedtest is not. But both the upload speed of clients AND the router speedtest is limited with QoS active. I like the behavior of the former since this allows for full bandwidth testing on the fly without deactivating QoS.
 
Is FlexQoS supposed to limit upload and/or download speed of the built in speed test?

With Flex enabled, download speed of clients is appropriately limited, but download speed in router speedtest is not. But both the upload speed of clients AND the router speedtest is limited with QoS active. I like the behavior of the former since this allows for full bandwidth testing on the fly without deactivating QoS.
Adaptive QoS will only be able to limit the upload side of a router-based speedtest, because the download limiting happens on the LAN interface (br0) of the router. The router speedtest doesn't go through the br0 interface, so it is not limited. The upload speedtest to the internet goes through the WAN interface (usually eth0 on most models), so it is limited per the QoS settings.

CAKE implements an ingress shaper on the WAN interface which would limit download speeds coming from the internet to the router on eth0.
 
Adaptive QoS will only be able to limit the upload side of a router-based speedtest, because the download limiting happens on the LAN interface (br0) of the router. The router speedtest doesn't go through the br0 interface, so it is not limited. The upload speedtest to the internet goes through the WAN interface (usually eth0 on most models), so it is limited per the QoS settings.

CAKE implements an ingress shaper on the WAN interface which would limit download speeds coming from the internet to the router on eth0.
@dave14305 having used both CAKE and Flex, what would you recommend to people to achieve lower latency based on your research? I know each environment is different and I keep switching back and forth between then every week haha. I like the customization Flex allows but just wondering what's your take on these options available. To QoS or not to QoS. Appreciated!!!
 
@dave14305 having used both CAKE and Flex, what would you recommend to people to achieve lower latency based on your research? I know each environment is different and I keep switching back and forth between then every week haha. I like the customization Flex allows but just wondering what's your take on these options available. To QoS or not to QoS. Appreciated!!!
Either choice will work for most people. At higher bandwidths, CAKE suffers from the lack of HW acceleration. Adaptive QoS suffers from lack of transparency from Trend Micro. Adaptive QoS will always be updated by ASUS from time to time. CAKE is dependent on one person (often missing-in-action) to compile CAKE for new models/kernels, and Adamm for most script updates (we know that story). So I think FlexQoS has the best chance at longevity based on how the current landscape looks to me.

If you're at the point where you're worrying about latency between either option, your needs are probably highly specialized. Why do you keep switching? What doesn't work well when you decide to switch to the other side? You can't out-run a bad diet, and you can't out-qos a bad connection (or the speed of light).

Hopefully others will share their thoughts as well. I'm by no means the first or final word on this topic.
 
No questions or comments on FlexQOS itself. Just a lurker coming out of hiding to say thank you very much, @dave14305 for picking up where FreshJR left off! Was looking for an update there and found this updated project. It's been working like a charm, and I appreciate the bits you've added on!

Just sent a quick PayPal donation as a thank you. Keep up the good work <3
 
No questions or comments on FlexQOS itself. Just a lurker coming out of hiding to say thank you very much, @dave14305 for picking up where FreshJR left off! Was looking for an update there and found this updated project. It's been working like a charm, and I appreciate the bits you've added on!

Just sent a quick PayPal donation as a thank you. Keep up the good work <3
Thank you, kindly!
 
1. Adaptive QoS will always be updated by ASUS from time to time... So I think FlexQoS has the best chance at longevity based on how the current landscape looks to me.
...
2. In all firmware, the fq_codel choice replaces the secondary htb queue discipline used to manage per-device traffic within an application category.

1. Does this mean fq_codel option still rely on asus? I thought they no longer support it since 386.x
2. As quoted from changelog, does that mean it's not as full fledge as the previous fq_codel in merlin 384.x/.19? What was the "secondary htb queue discipline" that it replaces?

Thank you.
 
1. Does this mean fq_codel option still rely on asus? I thought they no longer support it since 386.x
2. As quoted from changelog, does that mean it's not as full fledge as the previous fq_codel in merlin 384.x/.19? What was the "secondary htb queue discipline" that it replaces?

Thank you.
1. ASUS never supported fq_codel. Merlin supported fq_codel. In 386, Trend Micro made it impossible for Merlin to use the same method to replace sfq with fq_codel so Merlin removed the support under Adaptive QoS. fq_codel is supported in Traditional QoS in 386.1 (in fact it's now the only qdisc supported in Traditional QoS). FlexQoS will always depend on Adaptive QoS though. That was my point. As long as Adaptive QoS is around, FlexQoS should be around.
2. It's simpler than the fq_codel implementation that was present in Merlin 384.

In stock Adaptive QoS, there is the top-level htb qdisc and class hierarchy that represents the 8 different application classes (Net Control, Learn-from-Home, etc.). Within each of those 8 classes is another htb qdisc and class hierarchy that represents all the devices on your network. Underneath each of those 2nd-level htb classes was a sfq qdisc (or fq_codel qdisc if using Merlin).

In 384, the traffic being shaped and scheduled in each fq_codel qdisc before was already very isolated (e.g. only Streaming traffic from Dave's iPad, or only Web Surfing traffic from Jerry's laptop). There wasn't a lot of contention within an individual fq_codel qdisc when structured that way, so there were limited flows and limited ability to provide fairness. Dave's iPad is only competing with other streaming traffic from itself (which isn't easy to do), for example, and a separate htb class and fq_codel qdisc is managing my iPad's downloads from the App Store.

My fq_codel implementation eliminates that per-device hierarchy so that ALL traffic within an application category (Streaming, Web Surfing, Downloads, etc.) is commingled into a single fq_codel qdisc for all devices, which I believe will lead to better fairness since the fq_codel qdisc will see all competing traffic within the category. So instead of 100s of fq_codel qdiscs in the old setup, you have 8 (well, 8 for upload and 8 for download).
 
Maybe this will explain what I mean by the old structure. I may have missed a small detail in my haste, but when you look at the diagram, you have to mentally duplicate the same device class hierarchy shown for 13: for all the other htb qdiscs 10: through 17:. The orange coloring shows what elements would be used to manage Web Surfing traffic from my TV.

Adaptive QoS Structure(1).png

In my fq_codel implementation, imagine that middle htb qdisc level being replaced by a single fq_codel qdisc under each application class. I don't have time to make that drawing right now, but it's much simpler looking. :)
 
Last edited:
...
1. FlexQoS will always depend on Adaptive QoS though. That was my point. As long as Adaptive QoS is around, FlexQoS should be around.
...
2. Underneath each of those 2nd-level htb classes was a sfq qdisc (or fq_codel qdisc if using Merlin).
...

1. Just to make sure I got it: so for 386.x merlin + flexqos fq_codel, the top level qdisc is still sfq, the 2nd is fq_codel, hence flexqos dependency on asus' adaptive qos.
2. Did you mean Merlin 384.x? There is no fq_codel in merlin 386.x, unless using flexqos' "simpler" fq_codel option

Thank you!
 
Last edited:
1. Just to make sure I got it: so for 386.x merlin + flexqos fq_codel, the top level qdisc is still sfq, the 2nd is fq_codel, hence flexqos dependency on asus' adaptive qos.
The top level qdisc is htb. The second level qdisc is now fq_codel.
2. Did you mean Merlin 384.x? There is no fq_codel in merlin 386.x, unless using flexqos' "simpler" fq_codel option?
I’m not sure what you’re questioning. There is fq_codel in Merlin 386, but only for Traditional QoS. Or with FlexQoS.
 
I’m not sure what you’re questioning. There is fq_codel in Merlin 386, but only for Traditional QoS. Or with FlexQoS.
Sorry, yes I meant/implied adaptive qos.

Also is the reason for not having HFSC only HTB because asus' still on the old 2.6 kernel/sdk?
 
Also is the reason for not having HFSC only HTB because asus' still on the old 2.6 kernel/sdk?
I think you need a math degree to understand how to configure hfsc. It’s available in the Merlin build according to modprobe -l.

FlexQoS has to respect the basic structure of stock Adaptive QoS, in order for the basic categories to work. That means keeping htb.
 
UPDATE: never mind, this only happens when copy/paste, have to type in manually.

Bug: can't enter port range, for example 19302:19309. It keeps saying "Please enter a value between 1 to 65535" and won't let you click OK. Tried with FFox and Chrome
 
I've set my amazon echo's by ip address to use the streaming category and I'm fine with ALL their traffic using that.....but the app rules are overriding this...when I play pandora on it for example the traffic is in web surfing. Is there a way to change it or do I just have to live with it (in which case I don't really need this rule).....additionally I have set security cams to "gaming" but I expect they are also using web surfing for the stream to cloud. FQ1.2.1 on M386.1
 
Last edited:
I've set my amazon echo's by ip address to use the streaming category and I'm fine with ALL their traffic using that.....but the app rules are overriding this...when I play pandora on it for example the traffic is in web surfing. Is there a way to change it or do I just have to live with it (in which case I don't really need this rule).....additionally I have set security cams to "gaming" but I expect they are also using web surfing for the stream to cloud. FQ1.2.1 on M386.1
Are you also using IPv6? iptables custom rules that have IPv4 addresses aren’t applied to IPv6 traffic. Otherwise, post the output of flexqos debug
 
Are you also using IPv6? iptables custom rules that have IPv4 addresses aren’t applied to IPv6 traffic. Otherwise, post the output of flexqos debug

I'm not using ipv6. Cams are in the 192.168.3.2x range and echos/streaming is in the 192.18.3.3x range. Also is there a way to rename the bands even if just for display purposes? I'm not a gamer and would rather have VOIP as the highest level. I know it doesn't matter from a performance perspective. Here is the data as requested:

Code:
FlexQoS v1.2.1 released 2021-02-12

Debug date : 2021-02-18 10:02:06-0500
Router Model : RT-AC68U
Firmware Ver : 386.1_2
DPI/Sig Ver : 2.0.1 / 2.216
WAN iface : eth0
tc WAN iface : eth0
IPv6 : disabled
Undf Prio : 2
Down Band : 15360
Up Band : 15360
***********
Net Control : 1:10
Work-From-Home: 1:13
Gaming : 1:11
Others : 1:17
Web Surfing : 1:15
Streaming : 1:12
File Downloads: 1:16
Game Downloads: 1:14
***********
Downrates : 768, 2304, 4608, 3072, 768, 1536, 768, 1536
Downceils : 15360, 15360, 15360, 15360, 15360, 15360, 15360, 15360
Uprates : 768, 2304, 1536, 3072, 768, 1536, 768, 4608
Upceils : 15360, 15360, 15360, 15360, 15360, 15360, 15360, 15360
***********
iptables settings: <>>udp>>500,4500>>3<>>udp>16384:16415>>>3<>>tcp>>119,563>>5<>>tcp>>80,443>08****>7<192.168.3.122>>both>>>>1<192.168.3.65>>both>>>>5<192.168.3.20/30>>b
oth>>>>1<192.168.3.32/29>>both>>>>2<>>both>>53>>0<>>both>>80,443>>4<192.168.3.40/29>>both>>>>3<192.168.3.52/30>>both>>>>1
-o br0 -p udp -m multiport --sports 500,4500 -j MARK --set-mark 0x8006ffff/0xc03fffff
-o eth0 -p udp -m multiport --dports 500,4500 -j MARK --set-mark 0x4006ffff/0xc03fffff
-o br0 -p udp -m multiport --dports 16384:16415 -j MARK --set-mark 0x8006ffff/0xc03fffff
-o eth0 -p udp -m multiport --sports 16384:16415 -j MARK --set-mark 0x4006ffff/0xc03fffff
-o br0 -p tcp -m multiport --sports 119,563 -j MARK --set-mark 0x8003ffff/0xc03fffff
-o eth0 -p tcp -m multiport --dports 119,563 -j MARK --set-mark 0x4003ffff/0xc03fffff
-o br0 -p tcp -m multiport --sports 80,443 -m mark --mark 0x80080000/0xc03f0000 -j MARK --set-mark 0x803fffff/0xc03fffff
-o eth0 -p tcp -m multiport --dports 80,443 -m mark --mark 0x40080000/0xc03f0000 -j MARK --set-mark 0x403fffff/0xc03fffff
-o br0 -d 192.168.3.122 -j MARK --set-mark 0x8008ffff/0xc03fffff
-o eth0 -s 192.168.3.122 -j MARK --set-mark 0x4008ffff/0xc03fffff
-o br0 -d 192.168.3.65 -j MARK --set-mark 0x8003ffff/0xc03fffff
-o eth0 -s 192.168.3.65 -j MARK --set-mark 0x4003ffff/0xc03fffff
-o br0 -d 192.168.3.20/30 -j MARK --set-mark 0x8008ffff/0xc03fffff
-o eth0 -s 192.168.3.20/30 -j MARK --set-mark 0x4008ffff/0xc03fffff
-o br0 -d 192.168.3.32/29 -j MARK --set-mark 0x8004ffff/0xc03fffff
-o eth0 -s 192.168.3.32/29 -j MARK --set-mark 0x4004ffff/0xc03fffff
-o br0 -p tcp -m multiport --sports 53 -j MARK --set-mark 0x8009ffff/0xc03fffff
-o br0 -p udp -m multiport --sports 53 -j MARK --set-mark 0x8009ffff/0xc03fffff
-o eth0 -p tcp -m multiport --dports 53 -j MARK --set-mark 0x4009ffff/0xc03fffff
-o eth0 -p udp -m multiport --dports 53 -j MARK --set-mark 0x4009ffff/0xc03fffff
-o br0 -p tcp -m multiport --sports 80,443 -j MARK --set-mark 0x8018ffff/0xc03fffff
-o br0 -p udp -m multiport --sports 80,443 -j MARK --set-mark 0x8018ffff/0xc03fffff
-o eth0 -p tcp -m multiport --dports 80,443 -j MARK --set-mark 0x4018ffff/0xc03fffff
-o eth0 -p udp -m multiport --dports 80,443 -j MARK --set-mark 0x4018ffff/0xc03fffff
-o br0 -d 192.168.3.40/29 -j MARK --set-mark 0x8006ffff/0xc03fffff
-o eth0 -s 192.168.3.40/29 -j MARK --set-mark 0x4006ffff/0xc03fffff
-o br0 -d 192.168.3.52/30 -j MARK --set-mark 0x8008ffff/0xc03fffff
-o eth0 -s 192.168.3.52/30 -j MARK --set-mark 0x4008ffff/0xc03fffff
***********
appdb rules: <000000>6<00006B>6<0D0007>5<0D0086>5<0D00A0>5<12003F>4<13****>4<14****>4<05****>3
filter change dev br0 prio 2 protocol all handle 828::800 u32 flowid 1:17
filter change dev eth0 prio 2 protocol all handle 828::800 u32 flowid 1:17
filter add dev br0 protocol all prio 2 u32 match mark 0x8000006B 0xc03fffff flowid 1:17
filter add dev eth0 protocol all prio 2 u32 match mark 0x4000006B 0xc03fffff flowid 1:17
filter add dev br0 protocol all prio 15 u32 match mark 0x800D0007 0xc03fffff flowid 1:16
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0007 0xc03fffff flowid 1:16
filter add dev br0 protocol all prio 15 u32 match mark 0x800D0086 0xc03fffff flowid 1:16
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0086 0xc03fffff flowid 1:16
filter add dev br0 protocol all prio 15 u32 match mark 0x800D00A0 0xc03fffff flowid 1:16
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D00A0 0xc03fffff flowid 1:16
filter add dev br0 protocol all prio 20 u32 match mark 0x8012003F 0xc03fffff flowid 1:15
filter add dev eth0 protocol all prio 20 u32 match mark 0x4012003F 0xc03fffff flowid 1:15
filter change dev br0 prio 22 protocol all handle 802::800 u32 flowid 1:15
filter change dev eth0 prio 22 protocol all handle 802::800 u32 flowid 1:15
filter change dev br0 prio 23 protocol all handle 804::800 u32 flowid 1:15
filter change dev eth0 prio 23 protocol all handle 804::800 u32 flowid 1:15
filter change dev br0 prio 8 protocol all handle 808::800 u32 flowid 1:13
filter change dev eth0 prio 8 protocol all handle 808::800 u32 flowid 1:13
class change dev br0 parent 1:1 classid 1:10 htb overhead 4 linklayer ethernet prio 0 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev eth0 parent 1:1 classid 1:10 htb overhead 4 linklayer ethernet prio 0 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev br0 parent 1:1 classid 1:11 htb overhead 4 linklayer ethernet prio 1 rate 2304Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 28800
class change dev eth0 parent 1:1 classid 1:11 htb overhead 4 linklayer ethernet prio 1 rate 2304Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 28800
class change dev br0 parent 1:1 classid 1:12 htb overhead 4 linklayer ethernet prio 2 rate 4608Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 57600
class change dev eth0 parent 1:1 classid 1:12 htb overhead 4 linklayer ethernet prio 2 rate 1536Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 19200
class change dev br0 parent 1:1 classid 1:13 htb overhead 4 linklayer ethernet prio 3 rate 3072Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 38400
class change dev eth0 parent 1:1 classid 1:13 htb overhead 4 linklayer ethernet prio 3 rate 3072Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 38400
class change dev br0 parent 1:1 classid 1:14 htb overhead 4 linklayer ethernet prio 4 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev eth0 parent 1:1 classid 1:14 htb overhead 4 linklayer ethernet prio 4 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev br0 parent 1:1 classid 1:15 htb overhead 4 linklayer ethernet prio 5 rate 1536Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 19200
class change dev eth0 parent 1:1 classid 1:15 htb overhead 4 linklayer ethernet prio 5 rate 1536Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 19200
class change dev br0 parent 1:1 classid 1:16 htb overhead 4 linklayer ethernet prio 6 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev eth0 parent 1:1 classid 1:16 htb overhead 4 linklayer ethernet prio 6 rate 768Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 9600
class change dev br0 parent 1:1 classid 1:17 htb overhead 4 linklayer ethernet prio 7 rate 1536Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 19200
class change dev eth0 parent 1:1 classid 1:17 htb overhead 4 linklayer ethernet prio 7 rate 4608Kbit ceil 15360Kbit burst 3200b cburst 19200b quantum 57600
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

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