Run an Internet Speed Test from the Command Line
putorius.net
putorius.net
This is why Netflix started fast.com - because it draws data from the same distribution points as their video streaming apps it means you can't prioritise the speedtest without also doing so for the video traffic or (more likely) you can't de-prioritise the video traffic without also getting bad scores in that particular speedtest. From Netflix's point of view it is an answer to people contacting support with "my speedtest results are fine, the problem must be your servers" when they are experiencing video lag/drops and other such problems and the issue is due to ISP traffic shaping or the ISP simply not having enough backhaul bandwidth.
A more reliable test might be taking part in a busy public torrent: that way you are testing against arbitrary locations so your ISP can't be setting different shaping rules for them. Just remember to throttle upstream when testing downstream and vice-versa or saturation in the other direction will slow control packets that will in turn give you lower results for the one you are testing. This may fall into another trap though: unless you limit the number of active streams it may be an unrealistic test as more generally most processes use a small number of streams (or just a single one), and if you limit the number of streams too much you might get a lower result because each swarm member you connect to may be fairly saturated and sharing its bandwidth amongst many connections.
Or if you have external servers for other uses, and/or have friends who do, you could use those instead of needing to spin up anything new.
I'm not saying it's their servers or network, but I haven't found a reason for it based on my fast.com results.
freudian slip much?
I assume this is why the tester does not run an upstream test by default: otherwise the lack of a block of upstream traffic would be a good signal that video playing is going on rather than throughput testing.
This might be deliberate but not malicious: through Netflix's Open Connect program ISPs can host a local cache of Netflix content to reduce their peering costs while still offering full service to many concurrent users. If the main throttling effect you are experiencing is applied topologically close to their peering lines such that it would apply to the Open Connect equipment too, rather that the Open Connect kit setting between the throttle point and the peering lines, then to make it useful in the case of new or otherwise not recently accessed data the traffic shaping rules would need to let Netflix traffic (including your speedtests) through relatively unhindered. The path between the Open Connect equipment and your line is unlikely to need throttling because that will be an internal matter with very different cost dynamics than external peering.
Also not just me: https://github.com/sivel/speedtest-cli/issues/649
https://github.com/sivel/speedtest-cli/issues/648
https://github.com/sivel/speedtest-cli/issues/641
https://github.com/sivel/speedtest-cli/issues/616
https://github.com/sivel/speedtest-cli/issues/601
Because of this issue, I spent an obscene amount of time trying to diagnose a network problem that didn't exist when I upgraded to 1Gb. Hopefully others can avoid the same mistake.
It lets you roll your own speed testing infrastructure basically: Run it as a server on one end you want to test, then run it as client against that server IP/hostname on the other end.
It is very handy for measuring throughput between two boxes in a network (or anywhere for that matter).
Several big ISPs have endpoints for testing it as well for a speedtest like experience [1].
[1] - https://iperf.fr/iperf-doc.php
[2] - https://manpages.ubuntu.com/manpages/bionic/man1/iperf.1.htm...
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
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.)wget -O /dev/null http://speedtest-ams2.digitalocean.com/100mb.test
Nota bene:
- change the datacenter to a closer one when appropriate.
- Unit is MB/s, rather than Mb/s, which is more common for this kind of test
It's not https, for performance? ... (My download|upload: 33Mb/s | 8Mb/s)
I think the only downside is that you need to know what you're fetching and from where.
Edit: And for latency, there is /bin/ping
1. look into what /usr/local/{,s}bin/ and ${HOME}/.local/bin/ are for (and how to add them to your ${PATH}, if necessary)
2. look into why you shouldn't recommend things like "sudo wget ..." (at the least, use "wget" followed by a "sudo mv").
npx speed-test
npx fast-cli
The second one uses fast.com dig +short myip.opendns.com
curl icanhazip.com $ yes | pv | ssh your_server "cat > /dev/null" pv /dev/zero | ssh your_server "cat > /dev/null"
Both yours and this one check upload speed.To check download speed:
ssh your_server 'cat /dev/zero' | pv > /dev/null
or based on your suggestion: ssh your_server yes | pv > /dev/null
And if you don't have a server to login to, you can find a big file on the web and use that to check download speed: curl -s http://some-place.com/big-file | pv > /dev/null
Though curl also reports speed, so I guess you may as well just: curl http://some-place.com/big-file > /dev/null