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.
No it doesn't (neither does stock QOS).



Yes it is working. The fast version doesn't use those variables, that's why they are not apart of the debug output.

EDIT:

Also from looking at the last few debug logs and seeing common user preferences on Traffic Prioritization, For my setup I would be putting "Others" at least above "File Transfers". See "Issue 1" in the first post for reasoning! But there is no wrong or right setup, so enjoy however you decide to set it up.

Thank you, and I've taken your advice and moved 'Others' up.
 
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.

@FreshJR what I'm I looking for when running this command in SSH:

tc filter show dev br0

Just want to make sure the script is running properly. Also when i run the debug command (
/jffs/scripts/FreshJR_QOS -debug)
I only see instructions and command use and that is it...
 
Last edited:
@FreshJR what I'm I looking for when running this command in SSH:

tc filter show dev br0

Just want to make sure the script is running properly. Also when i run the debug command I only see instructions and that is it...


Just check for presence of traffic in the "Defaults" catagory in WebUI under QOS Statistics to visually confirm it is working.

Fast Version -> No Traffic
Compatible Version -> Very Low amounts of traffic

--

The output of "tc filter show dev br0" was just for me to check for performance discrepancies on a users AC86u. Do not worry about it's output.

--

The debug command was updated/introduced in newer version of the script. If you are getting no output from debug, I would just reupload the current version of corresponding script file with pscp (from the first page) or check the spelling of the debug command.
 
It should be possible to get the script working persistantly across reboots on stock ASUS firmware, using a hacky trick.

How it works:
Stock ASUS firmware has a configurable script trigger upon USB mount.

We can use this trigger to execute FreshJR_QOS post boot and simultaneously setup a cron job so the script is checked for persistence if a USB drive is left in the router.

This will be less reliable than Merlins offered firewall-start functionality, but if users rarely make WebUI changes, it should be offer a fair amount of persistence/up time.

This alternative hacky install procedure for stock ASUS firmware will added/merged into the compatible version of the script if stability/viability is confirmed.
 
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. )

Thanks. That was the first thing I tried after slapping my forehead. I even turned off WiFi on my phone for 30 minutes and tried again. Still classified as Betternet in apps analysis and as Others in QoS Statistics.
 
Thanks. That was the first thing I tried after slapping my forehead. I even turned off WiFi on my phone for 30 minutes and tried again. Still classified as Betternet in apps analysis and as Others in QoS Statistics.

No worries @sbsnb , we have more debugging tools.

1) Enter this command in putty to turn on logging for "betternet" packets

Code:
iptables -I POSTROUTING -t mangle -m mark --mark 0x800b006e/0xc03fffff -j LOG

2) Make a wifi call. A lot of "betternet" packets should show up in system log. I just need to look at a few lines.

3) Turn off logging for "betternet" packets by typing this command into putty.

Code:
iptables -D POSTROUTING -t mangle -m mark --mark 0x800b006e/0xc03fffff -j LOG

Let's continue the results and analysis in a private conversation.
 
@FreshJR , when messing with the Fake tc script what are you normally changing here? Do u edit any lines here or u just simply using together with the main script?
 
Thanks Fresh, i think its making more since. So within the main script and Im using my setup mainly for gaming, i noticed the default settings have gaming download & upload both at 15% per QOS category. Would raising this say to 20/ 25% and bringing VOIP down by 5% improve my gaming experience? Or it really doesnt matter?
 
Last edited:
Thanks Fresh, i think its making more since. So within the main script and Im using my setup mainly for gaming, i noticed the default settings have gaming download & upload both at 15% per QOS category. Would raising this say to 20/ 25% and bringing VOIP down by 5% improve my gaming experience? Or it really doesnt matter?

It shouldn't really matter, gaming doesn't use much traffic anyway. Current settings are overkill, but upon increasing it you wouldn't notice any difference.

The order of categories matters more than the percents, as long as the minimums per catagory exceed like 3mbps each.
 
Signed up just to say thanks FreshJR.
I upgraded my router to an Asus router from my 10+ year old Netgear, only to find that the stock Asus qos was awfully disappointing compared to the one I was using on dd-wrt. I was experiencing 1000ms+ ping spikes and even lost packets if I was running speedtest on a device while pinging my ISP. I was about to simply give up on this Asus routers and relegating it to being an AP, when I found this thread.

Using the compatibility script, the difference was basically night and day. Ran the same tests and pings never went above 17ms across multiple tests. Ran netperf scripts to check for bufferbloats, and again pings remained sub 25ms for maxing downloads, and less than 170ms (max) , 18ms (mean) for maxing uploads.

Anyhow, thanks a lot for working on this.
It is quite something.

p.s.
This is unnecessary, but if there could be a GUI
for modifying some of the QOS rules (perhaps by setting up a secured miniserver on 192.168.x.y) I feel like I will have less chance of unintentionally butchering the router settings.
 
There is some way to know which ports saved by default in each category in Adaptive QoS.

Example
Gaming: 1, 2, 3, 4, etc.
VoIP and Instant Messaging: 1, 2, 3, 4, etc.
Others: 1, 2, 3, 4, etc.
Web Surfing: 1, 2, 3, 4, etc.
Video and Audio Streaming: 1, 2, 3, 4, etc.
File Transferring: 1, 2, 3, 4, etc.
Default: 1, 2, 3, 4, etc.
 
I have install the script but i have forgot to activate in the script by notepad++
this code lines:

"#${tc} filter add dev br0 protocol all prio $1 u32 match ip dst 192.168.1.100/30 match mark 0x80000000 0x8000ffff flowid ${Gaming}"
"#iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark} &> /dev/null"
"#iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark}"

I have to unistall and install again??


#Percent of download speed guaranteed per QOS category,

NetControl_DownBandPercent=5
VoIP_DownBandPercent=20
Gaming_DownBandPercent=15
Others_DownBandPercent=10
WebSurfing_DownBandPercent=10
Video_DownBandPercent=30
FileTransfer_DownBandPercent=5
Default_DownBandPercent=5

#Percent of upload speed guaranteed per QOS category,

NetControl_UpBandPercent=5
VoIP_UpBandPercent=20
Gaming_UpBandPercent=15
Others_UpBandPercent=30
WebSurfing_UpBandPercent=10
Video_UpBandPercent=10
FileTransfer_UpBandPercent=5
Default_UpBandPercent=5

This valours for gaming and streaming are good??
 
I have install the script but i have forgot to activate in the script by notepad++
this code lines:

"#${tc} filter add dev br0 protocol all prio $1 u32 match ip dst 192.168.1.100/30 match mark 0x80000000 0x8000ffff flowid ${Gaming}"
"#iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark} &> /dev/null"
"#iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark}"

I have to unistall and install again??


#Percent of download speed guaranteed per QOS category,

NetControl_DownBandPercent=5
VoIP_DownBandPercent=20
Gaming_DownBandPercent=15
Others_DownBandPercent=10
WebSurfing_DownBandPercent=10
Video_DownBandPercent=30
FileTransfer_DownBandPercent=5
Default_DownBandPercent=5

#Percent of upload speed guaranteed per QOS category,

NetControl_UpBandPercent=5
VoIP_UpBandPercent=20
Gaming_UpBandPercent=15
Others_UpBandPercent=30
WebSurfing_UpBandPercent=10
Video_UpBandPercent=10
FileTransfer_UpBandPercent=5
Default_UpBandPercent=5

This valours for gaming and streaming are good??

I believe all you have to do is upload the file again via putty as it will overwrite the old version. Just use the instruction on page one.

As per the question about the values, i would ask JR to look it over

 
The script version is the same "FreshJR_QOS_compat_v370"
I forgot to say, my speeds are 250Mb down / 100 Mb up

Ok thanks
 
Make sure you play around with the values you set by setting actual speeds you get via ethernet to the router, and see if what speed you get with that setting and play around increases or decreasing the upload and download until your happy with the performance of the QOS.
 
This is unnecessary, but if there could be a GUI
for modifying some of the QOS rules (perhaps by setting up a secured miniserver on 192.168.x.y) I feel like I will have less chance of unintentionally butchering the router settings.
Ended up spending couple of nights after work to make a local web interface to FreshJR_QOS. It only updates port entries (which is all I need). My old router didn't have space or usb to run servers but apparently even budget routers these days can run a django server without any performance issues.

Btw, where is the ordering of the flowid. If you customize it in the customize menu, does it take?
Or is it hardcoded by the script? I have zero idea how the actual script works, so if anyone can point me to the discussion, it'll be great. Thanks.
 

Attachments

  • myqos.jpg
    myqos.jpg
    88.8 KB · Views: 404
Last edited:
Ended up spending couple of nights after work to make a local web interface to FreshJR_QOS. It only updates port entries (which is all I need). My old router didn't have space or usb to run servers but apparently even budget routers these days can run a django server without any performance issues.

Haha, like the song quote, started laughing.

Just a recommendation, incoming/outgoing might not be the best word to describe the column headers. When dealing with upload or download traffic the in/out directions get completely flipped. This leaves the syntax is very ambiguous as you currently have it (depending from which side you look at traffic flow).

Local port (LAN client) / Server port ( WAN server) sound more appropriate.

Local port (LAN client)
- bro dport
- eth0 sport

Server port (WAN server)
- br0 sport
- eth0 dport

(That should match the syntax I have been using in the comments )

Incoming/outgoing descriptors could work but they would need 4 columns total clarifying to direction. That would confuse users even more.

--

I'll pull up a link to show projects that intergreted with the existing WebUI server that serves the website. A 2nd server is probably uneccessary. ( think it was user @kvic that implemented a custom Ntp sync and stats page within the ASUS UI)
 
Last edited:
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