Live data from Hacker News

Run an Internet Speed Test from the Command Line

putorius.net

11–20 of 49 posts

Re: Run an Internet Speed Test from the Command Line

#11
post #8
post #6

Earlier quoted context omitted.

Might concern some users: 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,…

Indeed, my own raspberry pi was returning weird results with the python-based one; I switched to this one and it is more consistent. I had to add an "--output json" option to it to not have to redo all my tooling around tracking the speedtest results, but forgot to make a pull request to the repo, and I've just done that: same json format as the python-based version.

a raspberry pi 3/3b+ or whatever (not v4) should by no means be used for any sort of speed test, not only is the wifi weak/slow but the wired ethernet interface is also hanging off a usb2.0 bus.

Re: Run an Internet Speed Test from the Command Line

#12

maybe it's not as accurate, but on a lot of systems where wget is already installed one can do with a lot less hassle: 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

I've been using the wget method for a long time also.

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

Re: Run an Internet Speed Test from the Command Line

#13

maybe it's not as accurate, but on a lot of systems where wget is already installed one can do with a lot less hassle: 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

To get a list of all the other locations go to the DO page (strip the filename): http://speedtest-ams2.digitalocean.com/

It's not https, for performance? ... (My download|upload: 33Mb/s | 8Mb/s)

Re: Run an Internet Speed Test from the Command Line

#15
Note that some ISPs prioritise traffic to known speedtest targets, turning off traffic shaping rules that might otherwise slow bulk transfers. When this happens it means you are testing the likely maximum throughput of your connection not necessarily the throughput you will see more generally.

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.

Re: Run an Internet Speed Test from the Command Line

#16
post #12

maybe it's not as accurate, but on a lot of systems where wget is already installed one can do with a lot less hassle: 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

I've been using the wget method for a long time also. 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

Can't use wget for upload speeds...

Re: Run an Internet Speed Test from the Command Line

#17
post #8

Earlier quoted context omitted.

Indeed, my own raspberry pi was returning weird results with the python-based one; I switched to this one and it is more consistent. I had to add an "--output json" option to it to not have to redo all my tooling around tracking the speedtest results, but forgot to make a pull request to the repo, and I've just done that: same json format as the python-based version.

a raspberry pi 3/3b+ or whatever (not v4) should by no means be used for any sort of speed test, not only is the wifi weak/slow but the wired ethernet interface is also hanging off a usb2.0 bus.

> A raspberry pi 3/3b+ or whatever (not v4) should by no means be used for any sort of speed test

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.

Re: Run an Internet Speed Test from the Command Line

#19
post #8

Earlier quoted context omitted.

Indeed, my own raspberry pi was returning weird results with the python-based one; I switched to this one and it is more consistent. I had to add an "--output json" option to it to not have to redo all my tooling around tracking the speedtest results, but forgot to make a pull request to the repo, and I've just done that: same json format as the python-based version.

a raspberry pi 3/3b+ or whatever (not v4) should by no means be used for any sort of speed test, not only is the wifi weak/slow but the wired ethernet interface is also hanging off a usb2.0 bus.

My pi is connected directly to the router via ethernet, and the bandwidth available to my home connection isn't enough to saturate it "unfortunately" (~95/20) so this isn't massively a problem for me. YMMV.
Post reply on HN