What's new

[Fork] Asuswrt-Merlin 374.43 LTS releases (Archive)

  • 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!

Thinking about this, I just wrote a patch that will convert a rule written this way to a rule without specified limits automatically. Good question :)
Thanks for taking the time to respond in detail, it provided much needed clarity. I'll play around with QoS tonight or tomorrow. Happy to have contributed to the dialogue :D
 
Hi John, never realised I had a bufferbloat problem on my n66u but when i ran the dslreports test on v20e9 with qos on or off it was consistently at >8000ms (F) on the upload side no matter how slow a speed I entered in the qos b/w limits.

I then upgraded to 22b4, now what's happening is if I leave qos limits at the connection's full speed (15mbit up/down), the bufferbloat is the same. If I reduce it to 5up/10down, I start getting mostly consistent A ratings for bf with maybe an F in 1 out of 5 tests.

Now as I understand mips doesn't support codel which is the algo that is supposed to handle bb problems, is this just a fluke that I am seeing on the bb ratings? Is there something that I can do that can maybe prevent those 1 out of 5 bb fails as well? I had simply gotten used to other connections slowing down on the network when something else was using the internet on my home network. Running some more tests to see if I can actually see a difference on my devices.

Edit: Additionally, should i just have my isp reduce my connection speed to 10mbit since I am not using it anyways with qos set to 5up 10down? Or will in that case I will have to set qos even lower to achieve low bb?
 
Last edited:
Hi John, never realised I had a bufferbloat problem on my n66u but when i ran the dslreports test on v20e9 with qos on or off it was consistently at >8000ms (F) on the upload side no matter how slow a speed I entered in the qos b/w limits.

I then upgraded to 22b4, now what's happening is if I leave qos limits at the connection's full speed (15mbit up/down), the bufferbloat is the same. If I reduce it to 5up/10down, I start getting mostly consistent A ratings for bf with maybe an F in 1 out of 5 tests.

Now as I understand mips doesn't support codel which is the algo that is supposed to handle bb problems, is this just a fluke that I am seeing on the bb ratings? Is there something that I can do that can maybe prevent those 1 out of 5 bb fails as well? I had simply gotten used to other connections slowing down on the network when something else was using the internet on my home network. Running some more tests to see if I can actually see a difference on my devices.

I am interested in this as well.
At my parents' house, no matter which provider or provided modem/router, running p2p (for example torrent) kills everything else.
Having changed many providers, hard to tell where is the culprit (I heard that often ISPs throttle it, especially in Italy).

In Germany is all a different matter, however with the N66U I could get a A bufferbloat only once, basically killing download with 5mbit :)
 
I then upgraded to 22b4, now what's happening is if I leave qos limits at the connection's full speed (15mbit up/down), the bufferbloat is the same. If I reduce it to 5up/10down, I start getting mostly consistent A ratings for bf with maybe an F in 1 out of 5 tests.

Now as I understand mips doesn't support codel which is the algo that is supposed to handle bb problems, is this just a fluke that I am seeing on the bb ratings?
No, not a fluke....codel/fq_codel is better at handling bb, but the SFQ algorithm supported my MIPS can definitely help out.
Is there something that I can do that can maybe prevent those 1 out of 5 bb fails as well?
Two possibilities here....
(1) I also sometimes get a dslreports measure that is way out of line. I've mostly written it off a soemething on dslr's end or a routing problem.
(2) One of the ways that SFQ isn't as good as codel/fq_codel in my tests is that it's a bit slower to react to workload changes. You may still be getting some initial spikes that are hurting the rating, but overall it's still an improvement.

One other thing to keep in mind overall. We have control over one-end of the equation (client/server). Depending on what the other end is doing affects how much improvement we can get.
 
overall it's still an improvement

It's a major improvement... haven't had to toggle wifi on my phone for a while and youtube works really well with a p2p download running on a desktop; it's speed is automatically throttled, but not so with a speed test on the phone though which is fine since browsing works without issues.

Additionally, should i just have my isp reduce my connection speed to 10mbit since I am not using it anyways with qos set to 5up 10down? Or will in that case I will have to set qos even lower to achieve low bb?

Still confused about this part though.
 
I am interested in this as well.
At my parents' house, no matter which provider or provided modem/router, running p2p (for example torrent) kills everything else.
Having changed many providers, hard to tell where is the culprit (I heard that often ISPs throttle it, especially in Italy).

In Germany is all a different matter, however with the N66U I could get a A bufferbloat only once, basically killing download with 5mbit :)

Bufferbloat is a separate problem from lack of bandwidth. P2P will cause both problems.

A simple solution is to limit P2P to ~80% or less. It's best to limit at the P2P client itself, if possible.
 
Additionally, should i just have my isp reduce my connection speed to 10mbit since I am not using it anyways with qos set to 5up 10down? Or will in that case I will have to set qos even lower to achieve low bb?

For QoS to work, you must be able to control the device that is the bandwidth bottleneck.
 
Edit: Additionally, should i just have my isp reduce my connection speed to 10mbit since I am not using it anyways with qos set to 5up 10down? Or will in that case I will have to set qos even lower to achieve low bb?
You answered your own question correctly. By setting the limit lower in QoS you are making sure it is the limiting factor. If you lower your bandwidth, you'll have to lower your QoS limit below the bandwidth again.
 
but not so with a speed test on the phone though which is fine since browsing works without issues.
One thing to watch out for.....some speedtests use non http ports. For example, Xfinity Speedtest uses port 5050 (I have a separate rule for that port).
 
Hi John, never realised I had a bufferbloat problem on my n66u

That's because, quite frankly, for a lot of users bufferbloat is not an issue. It's only noticeable under very specific scenarios. The average user will never even notice it.
 
That's because, quite frankly, for a lot of users bufferbloat is not an issue. It's only noticeable under very specific scenarios. The average user will never even notice it.
I did keep hearing complaints my "wifi is slow" from my family members... I attributed it to the isp, increased the b/w to 50mbit up/down but the complaints never stopped so I downgraded again since it was no use if there was no real world performance increase with the additional bandwidth.

I don't know if i am just suffering from a placebo effect but browsing and youtube do feel snappier on my iphone, and I haven't had to toggle wifi off and on to make it work ever since I enabled qos to mitigate this issue.. Safari used to just stick there and websites/videos would load too slowly which had lead me to believe my phone's wifi was kicking the bucket. Sometimes I had to toggle twice just so that videos would start to load (once started speed wasn't a problem)...it was part of my daily morning routine.

Don't know when I can test it out with the family members since I'm alone again (naturally ;)) and they left for overseas 2 days back. I'm not saying it's absolutely certain but it will become clearer within the week.

But once you know it exists, you cannot ignore and forget it! :D

lol... I do think there might be more to the issue. Time will tell. :)
 
Don't usually reply to myself......but here's a template for openvpn-event. This will call openvpn related scripts located in /jffs/scripts based on the client/server and event, for example
vpnclient1-route-up
vpnserver2-route-down

(It supports up to 5 clients for the latest Merlin, this fork only supports 2)

If you install it without any of the 'downstream' scripts, it will make a 'not defined' syslog entry for each possible script.

Code:
#!/bin/sh

scr_name="$(basename $0)[$$]"

case "$1" in
    "tun11")
        vpn_name="client1"
        ;;
    "tun12")
        vpn_name="client2"
        ;;
    "tun13")
        vpn_name="client3"
        ;;
    "tun14")
        vpn_name="client4"
        ;;
    "tun15")
        vpn_name="client5"
        ;;
    "tun21")
        vpn_name="server1"
        ;;
    "tun22")
        vpn_name="server2"
        ;;
    *)
        vpn_name=""
        ;;
esac

# Call appropriate script based on script_type
vpn_script_name="vpn$vpn_name-$script_type"

# Check script state/use nvram to save last script run
vpn_script_state=$(nvram get vpn_script_state)
nvram set vpn_script_state="$vpn_script_name"
if [ "$vpn_script_name" = "$vpn_script_state" ]; then
    echo "VPN script" $vpn_script_name "already run" | logger -t "$scr_name"
    exit 0
fi

if [[ -f "/jffs/scripts/$vpn_script_name" ]] ; then
    sh /jffs/scripts/$vpn_script_name $*
else
    echo "Script not defined for event: "$vpn_script_name | logger -t $scr_name
    exit 0
fi

exit 0

I'm trying to use this in openvpn-event but can't get to call /jffs/scripts/vpnclient1-route-up
Code:
Dec 19 14:35:59 custom script: Running /jffs/scripts/openvpn-event (args: tun11 1500 1561 10.128.xx.xxx )
Dec 19 14:35:59 openvpn-event[30438]: Script not defined for event: vpn-route-up

Code:
nvram show | grep script
vpn_script_state=vpn-route-up

Just for test in vpnclient1-route-up
Code:
#!/bin/sh
log(){
   logger -st "($(basename $0))" $$ $@
}
log "vpnclient1-rote-up" is executed

Someone can se whats missing?
Octopus
EDIT: fix typo in code
 
Last edited:
Code:
case "$P1" in
should be
Code:
case "$1" in
Thanks but still same:
Code:
Dec 19 15:11:58 custom script: Running /jffs/scripts/openvpn-event (args: tun11 1500 1561 10.129.xx.xx)
Dec 19 15:11:58 openvpn-event[31993]: Script not defined for event: vpn-route-up
I didn't mension I'm using modified vpnrouting.sh in /jffs
 
Thanks but still same:
Code:
Dec 19 15:11:58 custom script: Running /jffs/scripts/openvpn-event (args: tun11 1500 1561 10.129.xx.xx)
Dec 19 15:11:58 openvpn-event[31993]: Script not defined for event: vpn-route-up
I didn't mension I'm using modified vpnrouting.sh in /jffs

Eensure that your modified vpnrouting.sh script contains the following:

Code:
PARAM=$*
if [ "$PARAM" == "" ]
then
 # Add paramaters equivalent to those passed for up command
 PARAM="$dev $tun_mtu $link_mtu $ifconfig_local $ifconfig_remote"
fi

run_custom_script(){
 if [ -f /jffs/scripts/openvpn-event ]
 then
  logger -t "custom script" "Running /jffs/scripts/openvpn-event (args: $PARAM)"
  sh /jffs/scripts/openvpn-event $PARAM
 fi
}

so actually passes the $dev etc. args to openvpn-event as individual args rather than a single string!

 
Last edited:
Yes I have that actually it's your modified vpnrouting.sh script.
With this function: "wan_block tun1$VPNID"
 
Yes I have that actually it's your modified vpnrouting.sh script.
With this function: "wan_block tun1$VPNID"

OK well I'd add debug statements to openvpn-event:

Code:
set -x
logger -st "($(basename $0))" $$ "Openvpn event '"$script_type"' ("$dev") via" $ifconfig_local "args = ["$@"]"

so you can test openvpn-event from the command line and actually see what args are being passed and if the 'case' statement correctly creates the script variable name.
 
I get this from commandline.
Code:
octopus@OCTOPUS:/tmp/home/root# set -x
octopus@OCTOPUS:/tmp/home/root# logger -st "($(basename $0))" $$ "Openvpn event '"$script_type"' ("$dev") via" $ifconfig_local "args = ["$@"]"
+ basename -sh
+ logger -st (-sh) 26282 Openvpn event '' () via args = []
(-sh): 26282 Openvpn event '' () via args = []
 
I get this from commandline.
Code:
octopus@OCTOPUS:/tmp/home/root# set -x
octopus@OCTOPUS:/tmp/home/root# logger -st "($(basename $0))" $$ "Openvpn event '"$script_type"' ("$dev") via" $ifconfig_local "args = ["$@"]"
+ basename -sh
+ logger -st (-sh) 26282 Openvpn event '' () via args = []
(-sh): 26282 Openvpn event '' () via args = []


Doh! you are supposed to add the statements to openvpn-event :confused:... then you can test ./openvpn-event to see if it can correctly show if the 'case' statement resolves either 'ClientX' or 'ServerX'

If you change

Code:
case "$P1" in

to

Code:
case "$dev" in

then I suspect it will now work, as I have personally experienced the situation where the individual args received by openvpn-event cannot be resolved; so in your script the 'case' statement will never find a match.
 

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!

Staff online

Top