What's new

[Release] FreshJR Adaptive QOS (Improvements / Custom Rules / and Inner workings)

  • 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.
noticed this in log today..

Apr 15 14:50:02 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Apr 15 14:50:02 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Apr 15 14:50:02 kernel: ioctl_iqos_op_config() fail!
Apr 15 14:50:02 kernel: ERR[qos_start:3344] QoS is already started!
Apr 15 14:50:02 kernel: ioctl_iqos_op_switch(1) fail!
 
After boot, and the router comes online. It takes approximately 2, maybe 3 minutes longer for pages to start rendering.

The fast version introduces a delay before anything in firewall-start is executed. This is done as a workaround to prevent potential QOS error messages. (Gives the system more time to intercept and modify original QOS commands)

Under normal circumstances, internet connectivity works prior to any firewall-start scripts being executed.

In your configuration it is more than possible that no dns resolution is happening until dnscrypt is executed. If Dnscrypt is triggered to run from firewall-start, I can see you not having internet until the firewall-start delay ( dnscrypt not yet executed) due to QOS is over. The delay is only present in the fast version of the script.

Switch to the compatible version to get rid of the firewall-start delay. (This will shift the delay from firewall-start being executed into delaying the execution of FreshJR QOS)

This scenario can also happen if you have other scripts, that take a long time to execute, present before the dnscrypt in your firewall-start file. The compatible version of my script runs in the background so no worries there.

But yea, one or the other has to be delayed.

noticed this in log today..

Apr 15 14:50:02 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Apr 15 14:50:02 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Apr 15 14:50:02 kernel: ioctl_iqos_op_config() fail!
Apr 15 14:50:02 kernel: ERR[qos_start:3344] QoS is already started!
Apr 15 14:50:02 kernel: ioctl_iqos_op_switch(1) fail!

You can ignore that (unless keeps repeating nonstop).

The error message you mentioned occurs WITHOUT FreshJR QOS installed.

The fast version of the script employs methods to mitigate, but not completely eliminate, the occurance of this message.

The compatible version just lets the message occur as it would without the script present.
 
Last edited:
@FreshJR youre a genius. Thanks for fixing this mess and wanted to ask if u take any donations? Appreciate the hard work...
 
Switch to the compatible version to get rid of the firewall-start delay. (This will shift the delay from firewall-start being executed into delaying the execution of FreshJR QOS)

Slight change on a few pages but on others taking the same amount of time to get going as the experimental version. I (personally) think the experimental was more uniform in allowing traffic. I’ll keep plugging away on experimental. Just made the move back.

Many thanks for the reply.
 
Slight change on a few pages but on others taking the same amount of time to get going as the experimental version. I (personally) think the experimental was more uniform in allowing traffic. I’ll keep plugging away on experimental. Just made the move back.

Many thanks for the reply.

You are imagining things. The scripts perform identically.

They only use different methods to execute modifications to the original parameters. The end configuration is identical.

The compatible version has a 5minute delay, before ANY script modifications take effect, after clicking apply. It could be that you started testing before the modifications were executed.

That or it's just regular network deviation or even altered performance due to 2+ devices are being alloted bandwidth simultaneously.
 
Last edited:
I have upgraded from 68P to ac86u. While the router seems faster and everything but adaptive QoS is not performing the same and it shows high buffer bloat on dslreports with the same settings used with 68P. Also this line : ${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 563 0xffff flowid ${Downloads} that I added before in the script used to be effective with previous router but with 86u it doesn't do anything and the traffic is recognized as VoIP. Any idea what could be happening here? btw the setting of Full Cone NAT is enabled under WAN.
 
I have upgraded from 68P to ac86u. While the router seems faster and everything but adaptive QoS is not performing the same and it shows high buffer bloat on dslreports with the same settings used with 68P. Also this line : ${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 563 0xffff flowid ${Downloads} that I added before in the script used to be effective with previous router but with 86u it doesn't do anything and the traffic is recognized as VoIP. Any idea what could be happening here? btw the setting of Full Cone NAT is enabled under WAN.

Paste the output of the command below into pastebin.

Code:
tc filter show dev br0

I will take a look at the rule structure. There have been reports of QOS working, but less effectively, on the AC86u.

I do not know what is causing this performance difference, but I remember the qos rule structure was exactly the same, so there is nothing to modify from my end as the problem may lie deeper under the hood.

Need to confirm.
 
Last edited:
You are imagining things.

Yes maybe so, just ask the Mrs. ;)

I was not referring to your script. Just how pages seemed to resolve. My initial comment was about the first 2 maybe 3 minutes of boot up and how I was able to access the internet.

They only use different methods to execute modifications to the original parameters. The end configuration is identical.

I agree.

The compatible version has a 5minute delay, before ANY script modifications take effect, after clicking apply. It could be that you started testing before the modifications were executed.

I did not mean your different scripts performed differently.

Personal I am leaning towards dnscrypt causing my issues.

Well to be truthful its likely not an issue per say, its just I need to allow a window after reboot to allow scripts to fully execute and things to settle down. Also its likely dnscrypt could be blocking connections during its start process, to prevent leaking. By adding your script, I just increased the work load of the router and its simply gonna take a few minutes after boot to settle down.
For me the experimental version just seemed to allow my router to return to a usable state quicker.
Maybe its just me, I don't know, and I was only able to run 2 reboot tests with the compatible version.

I am traveling for the next week and unable to do a proper comparison with dnscrypt removed. Ill do that when I get home. I personally feel Ill see a huge difference with it removed. Even if the results change Ill add it back after my testing.

I don't expect to be rebooting often, and I should never see a difference in all likely hood, because once all the scripts are up and running, everything works perfectly.

Your script has worked wonders on my connection, I am ecstatic at its results.
 
Confirmed I just removed dnscrypt remotely and rebooted. The Mrs reports no delay issues with accessing pages on reboot.

Looks like I have a tinkering project over, the next weekend. Many thanks for the thoughts @FreshJR
 
Hey guys im trying to run this script on the GT-Ac5300, firstly i don't see Administration -> System -> Enable JFFS custom scripts and configs in my version of the firmware 3.0.0.4.384_20648-g21e3702 . When I try and run the CMD commands (as admin) and after changing the admin to my username i get this message scp: /jffs/scripts/FreshJR_QOS: No such file or directory. I'm assuming that that is because its not allowing me to create a jffs partition, but that router is a beast and has more than enough ram to run a jffs partition so im wondering is there is a way not using the GUI to activate jffs custom scripts, through ssh or something. Any suggestions? Could i Use download master or something, and if all else fails could one use a usb drive to run the script.
 
Last edited:
I successfully installed the compatible version of the script on my RT-AC88U. System log shows:

Code:
Apr 15 21:15:06 adaptive QOS: Applying - Down Rules
Apr 15 21:15:06 adaptive QOS: Applying --- Up Rules
Apr 15 21:15:06 adaptive QOS: Modifying Class Rates

But when I make a WiFi call, it is not classified as VOIP. I can tell because VOIP under QOS stats remains at zero while the call is ongoing. I'm on Verizon Wireless and WiFi calls are definitely using UDP port 4500. In Apps Analysis it's capturing my WiFI calls as "Betternet" - it thinks it's a VPN service. Any ideas how to better debug the issue?
 
Last edited:
i don't see Administration -> System -> Enable JFFS custom scripts and configs in my version of the firmware 3.0.0.4.384_20648-g21e3702 .

This is the Asus-WRT Merlin section. You have to be running Merlin FW or one of the other Asus-WRT forks. This means stock Asus firmware is UNSUPPORTED.

Custom firmwares setup a nice scripting environment for user modifications such as this one.

It maybe be possible to get it working on stock Asus firmware, but I see that as a major regression so I will not be investing time into a working solution.

But when I make a WiFi call, it is not classified as VOIP.

The compatible version has a quirk that traffic during the 5 minute period prior to initialization will stay in its originally identified category until that connection is re established. This was briefly mentioned in the front page post.

To rule this out, toggle wifi off and on after the script has been initialized, then make another wifi calling phone call.

If that was the case, it's an unfortunate quirk of the compatible version. Flushing the conntrack table might be enough to reset traffic destination but I have not experimented with that.

If toggling wifi does not get it sorted correctly, there are more debugging paths available.

(Technically you should wait 3 minutes before reconnecting to wifi during this debugging test since that is the timeout for a UDP assured connection to clear itself from the connection table. )
 
Last edited:
any idea what this means?
Apr 16 02:59:46 kernel: ioctl_iqos_op_switch(1) fail!
Apr 16 02:59:49 kernel: ERR[__parse_app_rule:575] Failed to parse app rule catid value
Apr 16 02:59:49 kernel: ERR[parse_qos_conf:1038] Invalid config syntax at line 22.
Apr 16 02:59:49 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Apr 16 02:59:49 kernel: ioctl_iqos_op_config() fail!
Apr 16 02:59:49 kernel: ERR[qos_start:3350] qos_conf is not already!
Apr 16 02:59:49 kernel: ioctl_iqos_op_switch(1) fail!


I just reset the router to factory settings and manually put my settings back in to the router. On another note, what qos settings are best, and for adaptive qos is the manual or automatic bandwidth setting best?
 
Last edited:
any idea what this means?
Apr 16 02:59:46 kernel: ioctl_iqos_op_switch(1) fail!
Apr 16 02:59:49 kernel: ERR[__parse_app_rule:575] Failed to parse app rule catid value
Apr 16 02:59:49 kernel: ERR[parse_qos_conf:1038] Invalid config syntax at line 22.
Apr 16 02:59:49 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Apr 16 02:59:49 kernel: ioctl_iqos_op_config() fail!
Apr 16 02:59:49 kernel: ERR[qos_start:3350] qos_conf is not already!
Apr 16 02:59:49 kernel: ioctl_iqos_op_switch(1) fail!


I just reset the router to factory settings and manually put my settings back in to the router. On another note, what qos settings are best, and for adaptive qos is the manual or automatic bandwidth setting best?

Looks like it hasn't downloaded the the definitions from ASUS yet or created the required database files upon initial run.

Check for definition updates and restart QOS.

You question is explained in the first two posts. Additionally fq-codel is the best.

Edit:
upon looking further into it, the gt-5300 is not supported by Merlin-wrt, so you will be missing out on fq-codel.

To try and get it working, I would check if stock AsusWRT has a cron scheduler installed by typing "cru" into putty.

If it does, the compatible version should work with stock firmware as is except it won't be triggered upon QOS start (firewall-start) as that trigger simply doesn't exist. Instead it would have to be started once manually and then the cron task could continue perferming a daily persistance check.

I doubt AsusWRT has a cron scheduler, but if it does you should the run the following two lines after pscp'ing the file over instead of the install command, changing the path to match.

Code:
chmod 0755 /jffs_directory/FreshJR_QOS
cru a FreshJR_QOS "0 3 * * * /jffs_directory/FreshJR_QOS -check"
 
Last edited:
Paste the output of the command below into pastebin.

Code:
tc filter show dev br0

I will take a look at the rule structure. There have been reports of QOS working, but less effectively, on the AC86u.

I do not know what is causing this performance difference, but I remember the qos rule structure was exactly the same, so there is nothing to modify from my end as the problem may lie deeper under the hood.

Need to confirm.

Can you elaborate please on how to use the code provided? Thanks,
 
Can you elaborate please on how to use the code provided? Thanks,
Login to your router using ssh and run that command at the prompt.
 
Status
Not open for further replies.

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