Speedtest: new package to measure network performance


#61

I am using MWAN3 and I wonder if there is a way to run this speedtest script for each wan interface.
I found there is -L option in netperf to specify local IP.
However looking at the results I can see that it's not really using the specified local interface. It uses primary wan link irrespective of what I provide in -L option.
Is a higher layer rule (metric, default route etc) over-riding this option?
Any direction appreciated.


#62

The script doesn't define the route packets take to get to the netperf servers; that's something you need to define as part of your system configuration. It's no different than running wget and expecting it to control routing; it's not meant to.

You haven't really explained what you're trying to accomplish or how you've configured things. IIRC, MWAN3 (or another policy routing application like vpn-policy-routing) should let you configure routing based on destination. So, for example, forcing all traffic destined for netperf-east.bufferbloat.net to go through wan0 rather wan1 should be possible.

Since you're using MWAN3, why not configure an appropriate rule there? Or even simpler, how about shutting down one wan interface to force the other to be used?


#63

That leads to network disruption for a minute while mwan3 failover happens, which I want to avoid.
My config is simple, 2 WANs, using mwan3 as fail-over. One active, other idle/standby.
Thanks for the pointers, I will check if mwan3 has interface selection option based on destination.
Also, I was hoping the netperf -L option would work, which didn't, probably mwan3 interfered here.
Wasn't expecting the speedtest script to do much on this.

==========
update:

I was able to set user rule in mwan3 and do "mwan3 restart" to take effect.
This way I could select wan links and run speedtest for that link.

config rule 'speedtest'
list comment 'to speedtest server'
option src_ip '0.0.0.0/0'
option dest_ip 'xx.xx.xx.xx/32'
option use_policy 'wan_only'

==============
update:
Even better, added a new rule for speedtest server using "ip rule add ..."
Doesn't require mwan restart.. so no network disruption at all.


#64

Hi all, some news about the package:

I've folded in some final changes I've been trialing:

  • Updated the package name to clarify the back-end, highlight the ability to use any netperf server, and distinguish from other speedtest variants. Users should use the new speedtest-netperf_1.0.0-1_all.ipk package after uninstalling the old one. The new package will remind you of any conflict with the old one during installation.
  • Improved consistency and clarity of results and units.
  • Check for presence of netperf if running the unpackaged script on a Linux server.

Finally, the package has been merged into the openwrt/packages repo. It can now be installed on any snapshot build using opkg directly, or downloaded from the OpenWRT download site (note that the package is architecture independent).

I'll update the top post accordingly. Thanks to everyone for feedback and testing, and please continue using this topic for discussion!


#65

People should keep in mind the impacts that QoS can have on CWND sizing. It takes some really big windows (in the thousands) to flood a gigabit pipe using a handful of streams.
If running QoS in the router, it tends to force the TCP stacks to back off on their CWND sizing (in the double digits or low triple digits) to achieve low-latencies. So one needs to use a LOT of concurrent streams.
Testing from browsers on clients, it could take 32 streams (or more) to get enough data on the line.


#66

FYI this package works for 18.0.6.2 stable as well.


#67

Hmm I'm on OpenWrt 18.06.2 r7676-cddd7b4c77 but don't see the option to install speedtest in the software tab.


#68

The package has not been officially backported to the stable 18.06 branch, so it only exists in the master development branch.

You can install it manually from the .ipk file (or just copy the script).