I was messing with this - and have speedtest-cli and speedtest++ installed. (Unfortunately, my GUI PCs are behind a homeplug connection, but trust me when I say the rest). Its probably down to the protocol that's being used.
Here is the result from the version in the repository from Ubuntu 16.04
geek@heckate_router:/etc$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Singtel Fiber (XXX.XXX.XXX.XXX)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Singtel (Singapore) [3.91 km]: 230.77 ms
Testing download speed................................................................................
Download: 648.47 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.15 Mbit/s
Interestingly the version in git has better results for uploads, though still not consistent with the speedtest++ and ookla's speed test cli results
geek@heckate_router:~/speedtestgittest$ ./speedtest_cli_git.py
Retrieving speedtest.net configuration...
Testing from Singtel Fiber (xxx.xxx.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by MyRepublic (Singapore) [3.91 km]: 233.882 ms
Testing download speed................................................................................
Download: 607.12 Mbit/s
Testing upload speed................................................................................................
Upload: 59.29 Mbit/s
As per the speedtest-CLI github page
There is the potential for this tool to report results inconsistent with Speedtest.net. There are several concepts to be aware of that factor into the potential inconsistency:
Speedtest.net has migrated to using pure socket tests instead of HTTP based tests
Ookla seem aware of that too
Performance - all of the open source versions use an ancient version of our test engine that predates our Flash test. Yeah it's that old. This is not ideal for fast connections. We've also seen popular versions that are impacted by DNS timings and all sorts of other methodology issues. In addition, most are written in high level languages, which typically have issues hitting high bandwidth levels.
Though I suspect some excessively deep performance profiling is needed to determine whether its the protocol or the language.
I've been using speedtest++ until about 5 minutes after I first wrote this answer, and the results are loads better.
geek@heckate_router:~$ 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: XXX.XXX.XXX.XXX ( Singtel Fiber ) Location: [<redacted>, <redacted>]
Finding fastest server... 9575 Servers online
............
Server: Singapore speedtest.singnet.com.sg:8080 by Singtel (3.91278 km from you): 1 ms
Ping: 1 ms.
Jitter: 0 ms.
Determine line type (2) ........................
Fiber / Lan line type detected: profile selected fiber
Testing download speed (32) ................................................................................................................................................................................................................................................................................................
Download: 989.61 Mbit/s
Testing upload speed (12) .................................................................................................................................................................................................................................................................................................................................................................................................................................................
Upload: 998.73 Mbit/s
Contrast this with the official client (and their blog suggests someone has written an app to monitor historical speed for you), and does CSV and TSV output
geek@heckate_router:~$ speedtest
Speedtest by Ookla
Server: Singtel - Singapore (id = 13623)
ISP: Singtel Fiber
Latency: 1.91 ms (0.05 ms jitter)
Download: 932.83 Mbps (data used: 479.6 MB)
Upload: 941.23 Mbps (data used: 424.7 MB)
Packet Loss: 0.0%
Result URL: <redacted>
As you can tell... the speed is substancially different.
I recall the gui test being comparable to the cli test when I messed with it.
Speedtest ++ and the official clients use a raw sockets/custom protocol that works better than the older protocol at finding line speed.