Measure Internet Speed directly through the router

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

d3fz
Posts: 260
Joined: Sun Aug 28, 2016 7:34 pm

Measure Internet Speed directly through the router

Postby d3fz » Wed May 09, 2018 8:26 pm

I've been searching on the subject in the past couple of days, and thought it could be useful as a plugin or to anybody interested.

speedtest-cli would be great for this, but since it relies on Python to work, it won't fit on the router. On the other hand, it's a great tool to measure internet speed on terminals, etc.

Although, I've found this script that runs using "netperf" package, and it worked great on my Archer C7.

So all I did was:

Code: Select all

# Install netperf package
opkg update
opkg install netperf

# Copy the script "betterspeedtest.sh" to /usr/lib/gargoyle
Set script file permission to rwxrwxr-x (0775)

# Issue the following from PuTTY
sh /usr/lib/gargoyle/betterspeedtest.sh

The only drawback is that it doesn't scan for nearest servers (which can be passed by parameter), so it can give different results from speedtest.net.

I wonder if this could be useful in Gargoyle itself? Maybe Remote monitoring, QoS DL/UL total bandwidth estimation, etc.

Any more ideas?
TP-Link Archer C7 v2 - Gargoyle 1.10.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

Tired of Chrome? Try Vivaldi - an advanced browser built for power users

Lantis
Moderator
Posts: 4308
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Measure Internet Speed directly through the router

Postby Lantis » Thu May 10, 2018 1:35 am

Running the speed test on the router itself skews the result due to load on the CPU.
It’s not ideal, but it could provide an estimate.

If your line speed is close to the limit of your CPU you will not get good results.
WRT1900AC V1 on 1.10.X
WNDR3800/WRT3200ACM in a constant state of flux
www.lantisproject.com for custom builds and other projects
www.lantisproject.com/gargoyle_ispyisail/ for the latest releases

d3fz
Posts: 260
Joined: Sun Aug 28, 2016 7:34 pm

Re: Measure Internet Speed directly through the router

Postby d3fz » Thu May 10, 2018 2:08 pm

I see. Then it's a probably not a good idea to run this on slow routers with a good connection (>50MB maybe?).

As reference, I've tested this on an Archer C7 (720Mhz) + 50MB/6MB link while monitoring CPU usage with "top", and it didn't seem to take that much CPU processing.

Still need to test it with "Bandwidth Monitor" disabled (only for running the script), to see if there's any difference.

Now just out of curiosity, is there a big difference in CPU usage when running speedtest through a client and directly through the router? Assuming both tests reach max line speeds.
TP-Link Archer C7 v2 - Gargoyle 1.10.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

Tired of Chrome? Try Vivaldi - an advanced browser built for power users


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests