I had an issue on my 250/250Mbps-line using speedtest-cli in that it showed the correct download speed, but only 4Mbps upload.
Googling suggests it could be an issue with slow CPU/low RAM.
My (now old) server was by no means a beast as it had a throttled i3-3220T with 8GB RAM, but it should be plenty fast for that task.
The solution I came across on reddit/stack was to use this [0] instead, which solved the discrepancy for me:
I used to use speedtest-cli to monitor my Internet speed regularly, in fact every 5 minutes, while also logging DOCSIS signal levels, when debugging connection issues.
It didn't give accurate results, and that caused problems for me.
I wanted to switch to the C++ version, but needed the JSON output to be able to log the data and analyze it.
You make a valid point though you could test the speed of the Raspberry Pi in question. As long as you take the caveats you mentioned into account, that's an OK context. Which is the problem with GP's post to begin with.
Testing download speed...
Download: 917.52 Mbit/s
Testing upload speed...
Upload: 4.16 Mbit/s
Yeah, there's something wrong with that. There doesn't seem to be high CPU use.Version 0.3.4, which is the default from Apt on a test server, seems to be OK:
Download: 2239.51 Mbit/s
Upload: 882.54 Mbit/s
(Maximum would be 20Gbit/s both ways, but I suspect achieving that to a single server would require some network parameter tweaking.)
apt install speedtest-cli
Description: Command line interface for testing internet bandwidth using speedtest.net Speedtest.net is a webservice that allows you to test your broadband connection by downloading a file from one of many Speedtest.net servers from around the world. . This utility allows you to use the Speedtest.net service from the command line. . Note: This tool accesses speedtest.net over http, while the web-based client uses websockets. This tool has shown to become increasingly inacurate with high-speed connections. For more information, see the readme on: https://github.com/sivel/speedtest-cli