Measure Internet Speed directly through the router

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

Post Reply
d3fz
Posts: 271
Joined: Sun Aug 28, 2016 7:34 pm

Measure Internet Speed directly through the router

Post by d3fz »

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.12.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

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

Re: Measure Internet Speed directly through the router

Post by Lantis »

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.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

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

Re: Measure Internet Speed directly through the router

Post by d3fz »

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.12.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

Post Reply