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.
Just download it (I have it in /jffs/scripts), then chmod 755 AutoBW if needed, and run it. No need to really "Install" it.
Thanks ...last question, you mentioned you added the specific line to FreshJr scripts. Is this line added just one time or its added at different lines within the script? I apologize for my ignorance.
 
Just download it (I have it in /jffs/scripts), then chmod 755 AutoBW if needed, and run it. No need to really "Install" it.
Can you try something like the below instead of needing to modify/require FreshJR? This will exclude outbound traffic from QoS, in theory
Code:
iptables -I OUTPUT -m  multiport -p tcp --dports 5060,8080 -j MARK --set-xmark 0x80000000/0xC0000000
iptables -I OUTPUT -m  multiport -p udp --dports 5060,8080 -j MARK --set-xmark 0x80000000/0xC0000000

EDIT: I've added this to spdmerlin, to be released soon(tm)
 
Last edited:
Can you try something like the below instead of needing to modify/require FreshJR? This will exclude outbound traffic from QoS, in theory
Code:
iptables -I OUTPUT -m  multiport -p tcp --dports 5060,8080 -j MARK --set-xmark 0x80000000/0xC0000000
iptables -I OUTPUT -m  multiport -p udp --dports 5060,8080 -j MARK --set-xmark 0x80000000/0xC0000000

EDIT: I've added this to spdmerlin, to be released soon(tm)
Maybe this is a problem specific to FreshJr QoS only, but in my experience, spdMerlin download traffic is not altered by QoS. Even in setting my QoS download BW to say 5 Mbps ... spdMerlin still shows download speeds for me > 20 Mbps. Conversely, setting my QoS upload BW to 1 Mbps throttles my spdMerlin upload speeds (usually 3-5 Mbps) to below that 1 Mbps limit. The good news is that spdMerlin upload packets are marked (via DPI engine?) with 0x40030001 so those marked packets just have to be filtered into an unthrottled class - hence the tc filter add command with flow id 1:2. That id is an unthrottled class (as identified with tc class show dev eth0 command):
Code:
class htb 1:2 root leaf 2: prio 0 rate 1Gbit ceil 1Gbit burst 1249375b cburst 1249375b
I don't guess that tc filter add command has to necessarily be issued from FreshJR's script.
 
Last edited:
In my experience, spdMerlin download traffic is not altered by QoS. Even in setting my QoS download BW to say 5 Mbps ... spdMerlin still shows download speeds for me > 20 Mbps. Conversely, setting my QoS upload BW to 1 Mbps throttles my spdMerlin upload speeds (usually 3-5 Mbps) to below that 1 Mbps limit. The good news is that spdMerlin upload packets are marked (via DPI engine) with 0x40030001 so those marked packets just have to be filtered into an unthrottled class - hence the tc filter add command with flow id 1:2. That id is an unthrottled class (as identified with tc class show dev eth0 command):
Code:
class htb 1:2 root leaf 2: prio 0 rate 1Gbit ceil 1Gbit burst 1249375b cburst 1249375b
I don't guess that tc filter add command has to necessarily be issued from FreshJR's script.
I've got working iptables rules now which seem to do the trick! Works on WAN and VPN traffic in my tests
 
Where is the traffic classification data saved? Even after resetting router to factory defaults I can see data that seems very old. Is it saved somewhere in cloud and linked to your router somehow? Why do I see old data after resetting router?
 
I have been setting up an RT-AX3000 (RT-AX58U) and am getting errors with FreshJR_QOS that I never saw with my RT-AC3200.

Effectively leaves it in non-functional state. Has anyone seen errors like this and have an idea for a cure? I've been trying to search this thread for answers, but did not find anything (apologies if I missed the solution, would still appreciate someone pointing me to it):
Code:
adaptive QOS: Applying  TC Down Rules
adaptive QOS: Applying  TC Up   Rules
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: Modifying TC Class Rates
kernel: HTB: quantum of class 10011 is big. Consider r2q change.
kernel: HTB: quantum of class 10012 is big. Consider r2q change.
kernel: HTB: quantum of class 10014 is big. Consider r2q change.
adaptive QOS: Illegal "buffer"
adaptive QOS: Usage: ... qdisc add ... htb [default N] [r2q N]
adaptive QOS:                       [direct_qlen P]
adaptive QOS:  default  minor id of class to which unclassified packets are sent {0}
adaptive QOS:  r2q      DRR quantums are computed as rate in Bps/r2q {10}
adaptive QOS:  debug    string of 16 numbers each 0-3 {0}
adaptive QOS:  direct_qlen  Limit of the direct queue {in packets}
adaptive QOS: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
adaptive QOS:                       [prio P] [slot S] [pslot PS]
adaptive QOS:                       [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
adaptive QOS:  rate     rate allocated to this class (class can still borrow)
adaptive QOS:  burst    max bytes burst which can be accumulated during idle period {computed}
adaptive QOS:  mpu      minimum packet size used in rate computations
adaptive QOS:  overhead per-packet size overhead used in rate computations
adaptive QOS:  linklay  adapting to a linklayer e.g. atm
adaptive QOS:  ceil     definite upper class rate (no borrows) {rate}
adaptive QOS:  cburst   burst but for ceil {computed}
adaptive QOS:  mtu      max packet size we create rate map for {1600}
adaptive QOS:  prio     priority of leaf; lower are served first {0}
adaptive QOS:  quantum  how much bytes to serve from leaf at once {use r2q}
adaptive QOS: TC HTB version 3.3
adaptive QOS: Illegal "buffer"
adaptive QOS: Usage: ... qdisc add ... htb [default N] [r2q N]
adaptive QOS:                       [direct_qlen P]
adaptive QOS:  default  minor id of class to which unclassified packets are sent {0}
adaptive QOS:  r2q      DRR quantums are computed as rate in Bps/r2q {10}
adaptive QOS:  debug    string of 16 numbers each 0-3 {0}
adaptive QOS:  direct_qlen  Limit of the direct queue {in packets}
adaptive QOS: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
adaptive QOS:                       [prio P] [slot S] [pslot PS]
adaptive QOS:                       [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
adaptive QOS:  rate     rate allocated to this class (class can still borrow)
adaptive QOS:  burst    max bytes burst which can be accumulated during idle period {computed}
adaptive QOS:  mpu      minimum packet size used in rate computations
adaptive QOS:  overhead per-packet size overhead used in rate computations
adaptive QOS:  linklay  adapting to a linklayer e.g. atm
adaptive QOS:  ceil     definite upper class rate (no borrows) {rate}
adaptive QOS:  cburst   burst but for ceil {computed}
adaptive QOS:  mtu      max packet size we create rate map for {1600}
adaptive QOS:  prio     priority of leaf; lower are served first {0}
adaptive QOS:  quantum  how much bytes to serve from leaf at once {use r2q}
adaptive QOS: TC HTB version 3.3

That block repeats several times when trying to start Adaptive QOS with FreshJR_QOS installed.

For what it is worth, Adaptive QOS doesn't seem to function without FreshJR_QOS on this router either (for reasons unknown to me, because it doesn't even write any errors to the log).

I have nuked and rebuilt all of my configuration three times now, leading me to believe that starting over from scratch is not the solution.
 
heyy guuy do you think it is good for gaming if i put my device on the highes priority on my asus rt-ac5300 with freshjr settings ?
 
Thanks. Yours is a more eloquent and widely applicable solution I think. I will update AutoBW to check for those rules and warn if not found.
Can we have the update script?
 
I have been setting up an RT-AX3000 (RT-AX58U) and am getting errors with FreshJR_QOS that I never saw with my RT-AC3200.

Effectively leaves it in non-functional state. Has anyone seen errors like this and have an idea for a cure? I've been trying to search this thread for answers, but did not find anything (apologies if I missed the solution, would still appreciate someone pointing me to it):
Code:
adaptive QOS: Applying  TC Down Rules
adaptive QOS: Applying  TC Up   Rules
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: RTNETLINK answers: Invalid argument
adaptive QOS: We have an error talking to the kernel
adaptive QOS: Modifying TC Class Rates
kernel: HTB: quantum of class 10011 is big. Consider r2q change.
kernel: HTB: quantum of class 10012 is big. Consider r2q change.
kernel: HTB: quantum of class 10014 is big. Consider r2q change.
adaptive QOS: Illegal "buffer"
adaptive QOS: Usage: ... qdisc add ... htb [default N] [r2q N]
adaptive QOS:                       [direct_qlen P]
adaptive QOS:  default  minor id of class to which unclassified packets are sent {0}
adaptive QOS:  r2q      DRR quantums are computed as rate in Bps/r2q {10}
adaptive QOS:  debug    string of 16 numbers each 0-3 {0}
adaptive QOS:  direct_qlen  Limit of the direct queue {in packets}
adaptive QOS: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
adaptive QOS:                       [prio P] [slot S] [pslot PS]
adaptive QOS:                       [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
adaptive QOS:  rate     rate allocated to this class (class can still borrow)
adaptive QOS:  burst    max bytes burst which can be accumulated during idle period {computed}
adaptive QOS:  mpu      minimum packet size used in rate computations
adaptive QOS:  overhead per-packet size overhead used in rate computations
adaptive QOS:  linklay  adapting to a linklayer e.g. atm
adaptive QOS:  ceil     definite upper class rate (no borrows) {rate}
adaptive QOS:  cburst   burst but for ceil {computed}
adaptive QOS:  mtu      max packet size we create rate map for {1600}
adaptive QOS:  prio     priority of leaf; lower are served first {0}
adaptive QOS:  quantum  how much bytes to serve from leaf at once {use r2q}
adaptive QOS: TC HTB version 3.3
adaptive QOS: Illegal "buffer"
adaptive QOS: Usage: ... qdisc add ... htb [default N] [r2q N]
adaptive QOS:                       [direct_qlen P]
adaptive QOS:  default  minor id of class to which unclassified packets are sent {0}
adaptive QOS:  r2q      DRR quantums are computed as rate in Bps/r2q {10}
adaptive QOS:  debug    string of 16 numbers each 0-3 {0}
adaptive QOS:  direct_qlen  Limit of the direct queue {in packets}
adaptive QOS: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
adaptive QOS:                       [prio P] [slot S] [pslot PS]
adaptive QOS:                       [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
adaptive QOS:  rate     rate allocated to this class (class can still borrow)
adaptive QOS:  burst    max bytes burst which can be accumulated during idle period {computed}
adaptive QOS:  mpu      minimum packet size used in rate computations
adaptive QOS:  overhead per-packet size overhead used in rate computations
adaptive QOS:  linklay  adapting to a linklayer e.g. atm
adaptive QOS:  ceil     definite upper class rate (no borrows) {rate}
adaptive QOS:  cburst   burst but for ceil {computed}
adaptive QOS:  mtu      max packet size we create rate map for {1600}
adaptive QOS:  prio     priority of leaf; lower are served first {0}
adaptive QOS:  quantum  how much bytes to serve from leaf at once {use r2q}
adaptive QOS: TC HTB version 3.3

That block repeats several times when trying to start Adaptive QOS with FreshJR_QOS installed.

For what it is worth, Adaptive QOS doesn't seem to function without FreshJR_QOS on this router either (for reasons unknown to me, because it doesn't even write any errors to the log).

I have nuked and rebuilt all of my configuration three times now, leading me to believe that starting over from scratch is not the solution.
Did you enable cutoms scripts in administration?
 
@Jack Yaz
I'm in a setup
Gpon FTTH
Fiber into ISP provided router with auto configuration backing, ISP set bridge mode on Lan 1 so public ip lands on my Asus device in PPPOE mode , connected well
What preset should i choose in QOS ? running fresh jr script for long and enjoying thoroughly with ATM 0 and leaving preset, should i leave it as it no is or any preset or value would have positive impact further on
Your opinion is precious :D
 
Where is the traffic classification data saved? Even after resetting router to factory defaults I can see data that seems very old. Is it saved somewhere in cloud and linked to your router somehow? Why do I see old data after resetting router?
Did you format the JFFS partion after you did a factory reset? If not try to do this under: Administration - System - Format JFFS partition at next boot - Yes
 
Yes, using Skynet as well (no problems with it thus far).

I wonder if this debug output points to the cause or another symptom of the bigger problem. Upbursts and UpCbursts don't have values and I've been unable to get them to populate:
Code:
FreshJR QOS v8.8
Debug:

adaptive QOS: Undf Prio: 2
adaptive QOS: Undf FlowID: 1:13
adaptive QOS: Classes Present: 8
adaptive QOS: Down Band: 153600
adaptive QOS: Up Band  : 20480
adaptive QOS: ***********
adaptive QOS: Net = 1:10
adaptive QOS: VOIP = 1:11
adaptive QOS: Gaming = 1:12
adaptive QOS: Others = 1:13
adaptive QOS: Web = 1:15
adaptive QOS: Streaming = 1:14
adaptive QOS: Downloads = 1:16
adaptive QOS: Defaults = 1:17
adaptive QOS: ***********
adaptive QOS: Downrates -- 7680, 30720, 23040, 15360, 46080, 15360, 7680, 7680
adaptive QOS: Downceils -- 153600, 153600, 153600, 153600, 153600, 153600, 153600, 153600
adaptive QOS: Downbursts -- 9600b, 38400b, 19195b, 9600b, 6387b, 4796b, 3197b, 3197b
adaptive QOS: DownCbursts -- 192000b, 192000b, 192000b, 192000b, 192000b, 192000b, 192000b, 192000b
adaptive QOS: ***********
adaptive QOS: Uprates -- 1024, 4096, 3072, 6144, 2048, 2048, 1024, 1024
adaptive QOS: Upciels -- 20480, 20480, 20480, 20480, 20480, 20480, 20480, 20480
adaptive QOS: Upbursts -- , , , , , , ,
adaptive QOS: UpCbursts -- , , , , , , ,
 
I wonder if this debug output points to the cause or another symptom of the bigger problem. Upbursts and UpCbursts don't have values and I've been unable to get them to populate:
Code:
FreshJR QOS v8.8
Debug:

adaptive QOS: Undf Prio: 2
adaptive QOS: Undf FlowID: 1:13
adaptive QOS: Classes Present: 8
adaptive QOS: Down Band: 153600
adaptive QOS: Up Band  : 20480
adaptive QOS: ***********
adaptive QOS: Net = 1:10
adaptive QOS: VOIP = 1:11
adaptive QOS: Gaming = 1:12
adaptive QOS: Others = 1:13
adaptive QOS: Web = 1:15
adaptive QOS: Streaming = 1:14
adaptive QOS: Downloads = 1:16
adaptive QOS: Defaults = 1:17
adaptive QOS: ***********
adaptive QOS: Downrates -- 7680, 30720, 23040, 15360, 46080, 15360, 7680, 7680
adaptive QOS: Downceils -- 153600, 153600, 153600, 153600, 153600, 153600, 153600, 153600
adaptive QOS: Downbursts -- 9600b, 38400b, 19195b, 9600b, 6387b, 4796b, 3197b, 3197b
adaptive QOS: DownCbursts -- 192000b, 192000b, 192000b, 192000b, 192000b, 192000b, 192000b, 192000b
adaptive QOS: ***********
adaptive QOS: Uprates -- 1024, 4096, 3072, 6144, 2048, 2048, 1024, 1024
adaptive QOS: Upciels -- 20480, 20480, 20480, 20480, 20480, 20480, 20480, 20480
adaptive QOS: Upbursts -- , , , , , , ,
adaptive QOS: UpCbursts -- , , , , , , ,
Check the script permissions with win scp should be able to use it to navigate to jffs/scripts folder and see the fresijr QoS permissions it should in properties of that file 0755 I think, I'll double check it tomorrow.
 
Check the script permissions with win scp should be able to use it to navigate to jffs/scripts folder and see the fresijr QoS permissions it should in properties of that file 0755 I think, I'll double check it tomorrow.

It was already 0755, but I ran
Code:
chmod 0755 FreshJR_QOS
anyway. I then rebooted the router.

It didn't make any difference, unfortunately.
Thanks for the suggestion.
 
It was already 0755, but I ran
Code:
chmod 0755 FreshJR_QOS
anyway. I then rebooted the router.

It didn't make any difference, unfortunately.
Thanks for the suggestion.
Did you test reformatting the jffs partition before a script re Install?
 
Did you test reformatting the jffs partition before a script re Install?

Done better than test that, I have literally factory reset and formatted the jffs (each time) three times now (meaning I have configured this router from the ground up four times since Wednesday). More puzzling is Adaptive QOS does not seem to work at all, even before I download and install FreshJR_QOS. Although without FreshJR_QOS installed there are no unusual QOS-related errors in syslog, it does not limit bandwidth at all when testing (I did this prior to installing FreshJR_QOS the last two nuke and paves).

It is a credit to meditation practice and mindfulness that I have not pulled out what is left of my hair. :)
 
Status
Not open for further replies.

Similar threads

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