Speedtest-cli is not good

[root@ipfire ~]# pakfire status | head -2
Core-Version: 2.27-x86_64
Core-Update-Level: 176
[root@ipfire ~]# pakfire info speedtest-cli
Name: speedtest-cli
Summary: Command line interface for testing internet bandwidth
Version: 2.1.3-5
Size: 30.00 KB
Dependencies: 
Pakfile: speedtest-cli-2.1.3-5.ipfire
Service InitScripts: 
Installed: yes
Status: up-to-date

Speedtest utility is not good, it doesn’t report correct values, maybe it connect to the “wrong” test servers, I see it connects to servers in different country, not the nearest servers.

This is not limited to IPfire. Ubuntu has speedtest-cli in repositories too and I measure similar values, not good, in many cases too low… I am not sure what is origin of the speedtest-cli package, maybe it is an old version of test from Ookla, maybe just some tool based on reverse engineering work.


Example

[root@ipfire ~]# speedtest --version
speedtest-cli 2.1.3
Python 3.10.8 (main, Dec 27 2022, 13:22:33) [GCC 11.3.0]

I am not in Poland…

[root@ipfire ~]# speedtest --list
Retrieving speedtest.net configuration...
 8055) ObslugaPC (Gliwice, Poland) [301.25 km]
11307) Miconet sp. z o.o. (Mikolow, Poland) [317.52 km]
25259) AJC S.C. (Bielsko-Biała, Poland) [331.03 km]
39341) SferaNET S.A. (Bielsko-Biała, Poland) [331.03 km]
17569) Multi-NET Infrastruktura Sp. z o.o. (Bielsko-Biała, Poland) [331.03 km]
 5998) E-SBL.NET (Bierun, Poland) [331.79 km]
26007) Cyber Grota (Bedzin, Poland) [334.53 km]
33322) dg-net.pl (Katowice, Poland) [338.93 km]
 4857) InterSat (Myszkow, Poland) [351.27 km]
56230) Myszkowska Telewizja Kablowa sp. z.o.o. (Myszkow, Poland) [351.27 km]

Speed Test

[root@ipfire ~]# speedtest
Retrieving speedtest.net configuration...
Testing from T-Mobile xxxxxxx...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Miconet sp. z o.o. (Mikolow) [317.52 km]: 32.103 ms
Testing download speed................................................................................
Download: 16.75 Mbit/s
Testing upload speed......................................................................................................
Upload: 10.92 Mbit/s

Similar test from Ubuntu server, in this case download speed is measured correctly but upload is only 30% of real speed:

ubuntu@elite:~$ speedtest --version
2.0.0
ubuntu@elite:~$ speedtest
Retrieving speedtest.net configuration...
Testing from T-Mobile xxxxxxx...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Miconet sp. z o.o. (Mikolow) [317.52 km]: 29.967 ms
Testing download speed................................................................................
Download: 54.36 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.04 Mbit/s

Ookla has CLI tool, it measures “correct” values. I measure similar values in web browser and those match my VDSL line.

ubuntu@budgie:~$ speedtest -V
Speedtest by Ookla 1.2.0.84 (ea6b6773cf) Linux/x86_64-linux-musl 5.4.0-150-generic x86_64

The official command line client for testing the speed and performance
of your internet connection.
ubuntu@budgie:~$ speedtest

   Speedtest by Ookla

      Server: xxxxxxx
         ISP: T-Mobile xxxxxxx
Idle Latency:     6.67 ms   (jitter: 0.53ms, low: 6.20ms, high: 7.30ms)
    Download:    55.67 Mbps (data used: 26.4 MB)                                                   
                 17.76 ms   (jitter: 0.97ms, low: 13.02ms, high: 20.98ms)
      Upload:     9.95 Mbps (data used: 4.5 MB)                                                   
                205.88 ms   (jitter: 62.56ms, low: 37.12ms, high: 347.09ms)
 Packet Loss:     0.0%
  Result URL: https://www.speedtest.net/result/c/xxxxxxx

this is the github page, in case you want to report an issue upstream.

If I do speedtest-cli --list I see all server located in my general area.

EDIT: I forgot to mention that also in my hands the tool is under-reporting compared to fast.com, the netflix tool.

There is other report that speedtest-cli is not good

Speedtest++ is recommended.

I tried that, it connects to Poland servers (why?) but measured values are not bed, the speed is higher than measured by Ookla speedtest… Speedtest++ measurement takes time, it is noticeably longer than speedtest-cli or Ookla speedtest :frowning:

ubuntu@budgie:~/SpeedTest$ ./SpeedTest 
SpeedTest++ version 1.14
Speedtest.net command line interface
Info: https://github.com/taganaka/SpeedTest
Author: Francesco Laurita <francesco.laurita@gmail.com>

IP: xx.xx.xx.xx ( T-Mobile xxxxxx ) Location: [xx.xxxxx xx.xxxx]
Finding fastest server... 10 Servers online
........*.
Server: Warsaw war-o1.speedtest.orange.pl:8080 by Orange Polska S.A. (510.463 km from you): 26 ms
Ping: 26 ms.
Jitter: 0 ms.
Determine line type (2) ........................
Broadband line type detected: profile selected broadband

Testing download speed (32) ........................................................................................................
Download: 61.39 Mbit/s
Testing upload speed (8) .........................
Upload: 10.54 Mbit/s

I cannot, they disabled “issues”, no feedback possible… :frowning:

This is consistent with my own experience. I think it is still a useful package as a relative measure of network throughput. You take your values as a baseline reference and you investigate any change in case you are optimizing/changing provider etc.

As an absolute measurement tool, it is probably not reliable. In this case, I tend to trust Netflix (fast.com) own method to measure my speed.

1 Like

They have not had an “official” release since 2016.

Though they have updated some of the ++ components about 2 years ago.

If you locate a speed test that is accurate and something current, please post. I’ve looked a few times and have not found anything.

1 Like

I reported that when I ask speedtest-cli for list of servers, I receive servers in Poland. I received such results yesterday and today. When I run the same command now, I receive correct local servers, just few kilometers from my location. It looks like this issue was fixed or maybe it just returns random values…:wink:

speedtest-cli get list of server from speedtest.net or XML. It returns XML with test servers, few hours ago I received servers in Poland but I receive local servers now.

It looks like Ookla CLI client fetches test servers from this JSON file.

The lists are not the same, but several test servers are in both lists, maybe the list just pickup 10 random servers from the country.
This is the way to see test servers:

$ curl -s https://www.speedtest.net/speedtest-servers-static.php | xmlstarlet sel -t -v /settings/servers/server/@host -n
$ curl -s https://c.speedtest.net/speedtest-servers.php | xmlstarlet sel -t -v /settings/servers/server/@host -n
$ curl -s https://cli.speedtest.net/api/cli/config | jq -r '.servers[].host'

I just wrote a few minutes ago that the issue was fixed that I do not receive servers from Poland, and magic happened I see servers from Poland again, but only in the “XML” list:

$ curl -s https://www.speedtest.net/speedtest-servers-static.php | xmlstarlet sel -t -v /settings/servers/server/@host -n
kat-o1.speedtest.orange.pl:8080
speedtest-kat-01.oxylion.net.pl:8080
speedtest2.smsnet.pl:8080
speedtest2.cybergrota.com.pl:8080
speedtest2.tvtom.pl:8080
speedtest.e-sbl.net:8080
speedtest.midiko.pl:8080
speedtest.protonet.pl:8080
speedtest.obslugapc.pl:8080
speedtest.sownet.pl:8080

GAME OVER:

[root@ipfire ~]# speedtest --list
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: HTTP Error 403: Forbidden
1 Like

Petr,

for speedtest-cli there is not anything we can do. We can delete it from the list of pakfire add-ons and that is the only control we have.

It is supported by:

There is an email address (and a website) near his picture. I’d suggest writing to the author and let him know of the odd things experienced.

1 Like