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.
intresting, would be usefull if only it could be merged ibto the firmware
 
hello to all.
first of all, thanks for sharing the script. Ive been trying to set it up on my ac68u but im unsure if its working or not.

since i was having some issues with pscp, i did it the manual way and created a 0755 folder on my /jffs/scripts/ path called FreshJR_QOS. Inside, i placed FreshJR_QOS_v1_9.txt but im just unsure if router will read this txt file.
I appended a logger "QoS OK" at the very end of the script in order to see any signs of it on the main log but i havent been able to see changes.

my firewall-start file looks:

Code:
#!/bin/sh
/jffs/scripts/FreshJR_QOS

could you please tell me if im on the right track? after rebooting the router, i dont see any log updates showing that that script ran. am i supposed to see any changes on the webui as well?

thanks!
 
hello to all.
first of all, thanks for sharing the script. Ive been trying to set it up on my ac68u but im unsure if its working or not.

since i was having some issues with pscp, i did it the manual way and created a 0755 folder on my /jffs/scripts/ path called FreshJR_QOS. Inside, i placed FreshJR_QOS_v1_9.txt but im just unsure if router will read this txt file.
I appended a logger "QoS OK" at the very end of the script in order to see any signs of it on the main log but i havent been able to see changes.

my firewall-start file looks:

Code:
#!/bin/sh
/jffs/scripts/FreshJR_QOS

could you please tell me if im on the right track? after rebooting the router, i dont see any log updates showing that that script ran. am i supposed to see any changes on the webui as well?

thanks!

0755 is NOT a folder. chmod sets permissions to 0755 to make the script marked as an executable.

What manual way did you transfer the file? Copy/paste into shell VI text editor?

Pscp transfer should work. Make sure you change the ip address from 192.168.1.1 if your router has a different address.
 
my bad. i didnt explain correctly. folder is FreshJR_QOS and is chmoded as 0755
i copied the txt file with winscp but i dont see any activity after rebooting the router

0755 is NOT a folder. chmod sets permissions to 0755 to make the script marked as an executable.

What manual way did you transfer the file? Copy/paste into shell VI text editor?

Pscp transfer should work. Make sure you change the ip address from 192.168.1.1 if your router has a different address.
 
my bad. i didnt explain correctly. folder is FreshJR_QOS and is chmoded as 0755
i copied the txt file with winscp

Run the following commands

Code:
cd /jffs/scripts
l

The output should contain this

Code:
-rwxr-xr-x    1 admin    root         17230 Aug 24 13:32 FreshJR_QOS

FreshJR_QOS is not a folder. It is the script FreshJR_QOS_v1_9.txt renamed into FreshJR_QOS (no file extension).

If you have FreshJR_QOS_v1_9.txt inside a FreshJR_QOS folder, then there is your problem.
 
Code:
admin@RT-AC68U:/jffs/scripts/FreshJR_QOS# cd /jffs/scripts
admin@RT-AC68U:/jffs/scripts# l
drwxr-xr-x    2 admin    root             0 Aug 28 18:40 FreshJR_QOS/
-rwxr-xr-x    1 admin    root           263 Aug 20 09:34 dnsmasq.postconf*
-rwxr-xr-x    1 admin    root            36 Aug 28 18:41 firewall-start*
-rwxr-xr-x    1 admin    root           316 Aug 20 09:34 post-mount*
admin@RT-AC68U:/jffs/scripts#
 
Run the following commands


FreshJR_QOS is not a folder. It is the script FreshJR_QOS_v1_9.txt renamed into FreshJR_QOS (no file extension).

If you have FreshJR_QOS_v1_9.txt inside a FreshJR_QOS folder, then there is your problem.


ohhhh i see! let me check into that
 
QoS WAN Overhead option was set to 40 and ATM ticked ( since I use ADSL), I noticed after multiple tests that the best results of speed connection & minimal bufferbloat were gained after disableing (unticking) ATM option and setting the overhead number to Zero. MTU/MRU both set to 1492. Have any of you guys experienced a similar situation? What could be the explanation of this?
 
QoS WAN Overhead option was set to 40 and ATM ticked ( since I use ADSL), I noticed after multiple tests that the best results of speed connection & minimal bufferbloat were gained after disableing (unticking) ATM option and setting the overhead number to Zero. MTU/MRU both set to 1492. Have any of you guys experienced a similar situation? What could be the explanation of this?
atm is for people on adsl1/2/2+ connections, its a protocol use I think or its a transport method I cant remember off the top of my head, but I know its used in adsl connections, but not vdsl2 aka FTTN, that uses ptm which is more efficient.
 
QoS WAN Overhead option was set to 40 and ATM ticked ( since I use ADSL), I noticed after multiple tests that the best results of speed connection & minimal bufferbloat were gained after disableing (unticking) ATM option and setting the overhead number to Zero. MTU/MRU both set to 1492. Have any of you guys experienced a similar situation? What could be the explanation of this?

Wan overhead adds x amount of bytes, in your case 40, per packet transfered.

The higher your WAN overhead set, the lower your available bandwidth throughput from QOS limits.

It is intended to account for actual overhead present (added) anywhere from the start of your modem(coax,telephone,etc) to the bandwidth limiter ISP side.

Your router cannot see that bandwidth, but it can account for it by adding X bytes per packet.

By you setting wan overhead to 40 was similar setting a lower QOS limit, albeit a little different because the remaining bandwidth limit depends on the rate of packets being transferred

Bufferbloat should of remained constant.
 
atm is for people on adsl1/2/2+ connections, its a protocol use I think or its a transport method I cant remember off the top of my head, but I know its used in adsl connections, but not vdsl2 aka FTTN, that uses ptm which is more efficient.
PTM is not available in my area unfortunately I'm stuck with ADSL2+

Wan overhead adds x amount of bytes, in your case 40, per packet transfered.

The higher your WAN overhead set, the lower your available bandwidth throughput from QOS limits.

It is intended to account for actual overhead present (added) anywhere from the start of your modem(coax,telephone,etc) to the bandwidth limiter ISP side.

Your router cannot see that bandwidth, but it can account for it by adding X bytes per packet.

By you setting wan overhead to 40 was similar setting a lower QOS limit, albeit a little different because the remaining bandwidth limit depends on the rate of packets being transferred

Bufferbloat should of remained constant.

My set up is as the following: (ISP Modem - No internet connection>> RT-AC68P - WAN Configured as PPPoE) I made sure my ISP modem WAN light is off and only the signal shows it is bridged to the Router.

What option in WAN overhead should I choose? PPPoE LLC/Snap (I know ISP works with this type of connection not VC/Mux) or RFC2684/RFC1483 Bridged LLC/Snap?
 
PTM is not available in my area unfortunately I'm stuck with ADSL2+



My set up is as the following: (ISP Modem - No internet connection>> RT-AC68P - WAN Configured as PPPoE) I made sure my ISP modem WAN light is off and only the signal shows it is bridged to the Router.

What option in WAN overhead should I choose? PPPoE LLC/Snap (I know ISP works with this type of connection not VC/Mux) or RFC2684/RFC1483 Bridged LLC/Snap?
which isp, for adsl 2?, If you aussie like me I can suggest a cheap modem for bridge only, I use to have amazing latency on it.
 
Used this script a while ago, had some issues which @FreshJR couldn't reproduce, but as I have a feeling that bandwidth isn't properly divided between devices, thought I gave it another shot. I've started from scratch, have no VoIP (well, I do, but not over my ASUS router, phones are directly connected to the bridged router/modem which I got from my ISP), so that's no issue I believe. We don't use Facetime, Skype or similar services and there's only little instant messaging, so assigned only 5% to that category in the script. Main priorities are streaming meda, websurfing and file transferring.

As I have only basic knowledge of QoS, some of these question might be (somewhat) noob-ish, but I'd like to understand it.

First of all, I already had the default QoS with fq_codel discipline by @RMerlin enabled. Before re-installing FreshJR's script I created a customized priority profile, which looks like this:
N2gUdVi.jpg


Settings on the main QoS page look like this:
LRuwPjl.jpg


And the variables in FreshJR's QoS script divide like this:

Code:
    ####################  Variables Setup #####################

    #Percent of download speed guaranteed per QOS catagory, change below as desired (sum should equal 100)
        NetControl_DownBandPercent=5                        #This value can be adjust as desired
        VoIP_DownBandPercent=5                                #This value can be adjust as desired
        Gaming_DownBandPercent=15                            #This value can be adjust as desired
        Others_DownBandPercent=15                            #This value can be adjust as desired        #Note: New destination for all unidentified traffic per script default
        WebSurfing_DownBandPercent=15                        #This value can be adjust as desired
        Video_DownBandPercent=20                            #This value can be adjust as desired
        FileTransfer_DownBandPercent=20                        #This value can be adjust as desired
        Default_DownBandPercent=5                            #This value can be adjust as desired        #Note: Original destination all for unidentified traffic, no traffic should flow here
   
    #Percent of upload speed guaranteed per QOS catagory, change below as desired (sum should equal 100)
        NetControl_UpBandPercent=5                            #This value can be adjust as desired
        VoIP_UpBandPercent=5                                #This value can be adjust as desired
        Gaming_UpBandPercent=15                                #This value can be adjust as desired
        Others_UpBandPercent=25                                #This value can be adjust as desired        #Note: New destination for all unidentified traffic per script default
        WebSurfing_UpBandPercent=15                            #This value can be adjust as desired
        Video_UpBandPercent=10                                #This value can be adjust as desired
        FileTransfer_UpBandPercent=20                        #This value can be adjust as desired
        Default_UpBandPercent=5                                #This value can be adjust as desired        #Note: Original destination all for unidentified traffic, no traffic should flow here

I have a 150/15 Mbit Cable (DocSis 3.0) connection.

So here are my questions, hopefully someone is willing to answer them. I've read the entire thread and read it partially again, but several things I don't get and I just need some help to optimize things (and understanding a bit more about what I'm actually doing would be nice :D).

1. Is the priority mode in AsusWrt Merlin QoS settings still relevant, or is it completey ignored because of the custom variables (hence priorities) defined in the variables in the script?

2. I selected Cable/Docsis as overhead preset, which results in 18 for WAN overhead. However, when running speedtests (from the command line through speedtest-cli) or with my AC-capable 5Ghz devices) with WAN Overhead at 0 (no preset), I get up- and downstream rates slightly higher than my subscription, around 155 downstream and 15.5Mbit upstream on average, sometimes even higher. My results are lower however when selecting selecting Cable/Docsis. Does this mean that by selecting the Cable/Docsis 3.0 preset I'm actually capping my bandwith by 18%? Cause looking at the speedtest results (taken directly from the router, using speedtest-cli), it seems like my ISP is already compensating network overhead, as I have never ever measured something lower than my actual subscription.

3. I've set up- and downstream manually, as I read that Auto doesn't work that well. Using the default up- and dowstream of my contract, I roughly too 90% of that value (as I read at several places, 85 to 90% of Max Bandwidht) and entered them manually. Is this okay? And is it okay, combined with the 18% percent WAN overhead, cause my speedtests are somewhat dissapoint.

4. I've assigned gaming a rather low priority for now. My kid only gets an hour of computer time on school days and he's basically only playling Roblox, which doesn't appear to be using lots of bandwith.

5. Is there a simple tutorial explaining how to properly identify and if nessecairy redirect incorrectly routed/capped traffic into the right bucket. The more I read, the less I get it, and I really want to.

Can't think of any other questions right now, but I'll know where to find you :D.

Thanks in advance for your patience.
 
I'm sure your supposed to use the 18, overhead value instead of the 90%, it tells the shaper to account for the 18 byte over head present in cable connections rather than a flat 90% of bandwidth making it more accurate, keep in mine the FQ_Codel in the firmware does not have the full feature set due to kernel limitations.

priority mode still is important the script tells the router to guarantee a minimum percentage of bandwidth for each category of traffic.

Auto bandwith is for 10gb connections.

If you use note pad ++ and look intot he script you can see template rules if all else fails just ask me and ill try to help how ever I can.
 
I'm sure your supposed to use the 18, overhead value instead of the 90%, it tells the shaper to account for the 18 byte over head present in cable connections rather than a flat 90% of bandwidth making it more accurate

Thanks for your reply, @Vexira. So, if I understand you correctly, I should leave the values at 15/150 and only apply the preset overhead? I thought the overhead was a percentage, but I understand from you it's an amount of bytes? Per package or?

priority mode still is important the script tells the router to guarantee a minimum percentage of bandwidth for each category of traffic.

I understand what you're saying, but aren't we doing the same thing when editing the variables in the script? It's kinda tricky as I want to get several kinds of traffic an equal amount of bandwidth, but the 'Customize' option in the WebUI doesn't allow to put two categories on the same priority level, yet the script does.

Thanks for the offer. Customizing rules is not for now, currently not really a need for it, but if I can't figure it out, I might reach out to you!
 
Thanks for your reply, @Vexira. So, if I understand you correctly, I should leave the values at 15/150 and only apply the preset overhead?
No, still use the percent of throughput values. The queuing disciplines needs some room in the throughput to operate correctly. The overhead values just improve the accuracy of the calculations in using that extra room.
 
No, still use the percent of throughput values. The queuing disciplines needs some room in the throughput to operate correctly. The overhead values just improve the accuracy of the calculations in using that extra room.

Thanks for your reaction @john9527. I've read different percentages throughout this thread and elsewhere on the web. Is 90% of max bandwidth enough room? Or should I leave more margin? And do these percentages actually limit the maximum available throughput (i.e. if theoretically only one category is being used, will throughput be actually capped at 90% or will it utilize the maximum available bandwidth?
 
Last edited by a moderator:
Status
Not open for further replies.

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