Speedtest slow via SSH

2

2

I've got a small server at home (running Arch Linux) and I'm testing my internet speed. Using speedtest-cli directly from a terminal at the server I get DL speeds in the order of 30 Mbit/s and UL of 15 Mbit/s.

However, when I SSH into my server from my laptop and run the same speedtest I get speeds of 1.04 Mbit/s and 0.40 Mbit/s (DL and UL). Also, the ping has increased to 500 ms.

Why does speedtest report a lower speed via SSH? A similar question was asked but does not have a sufficient answer.

MichaelDeSanta

Posted 2016-05-08T21:09:01.943

Reputation: 41

Answers

2

I would contest the conclusion that SSH has anything to do with it. You'd need to run a ridiculous number of tests to show conclusively that it's not simply a fluke. Have you tried running speedtest-cli multiple times, interleaving running locally and via SSH?

There's a simpler possibility: speedtest-cli selects a server automatically at runtime (Selecting best server based on latency...). I did four tests here, and it selected two different servers for these tests. Depending on how thorough the latency test is (I'm guessing not very since it needs to finish in a reasonable amount of time), you could end up talking over a very different line to a very different server between runs. Have you tried running speedtest-cli against a specific server?

Another possibility is that your server is so low on resources that an SSH connection makes an appreciable difference (that is, teetering just at the edge of what the machine can handle).

A very real possibility with commodity hardware and a home setup is suboptimal configuration or faulty hardware. While the connection is slow, have you tried for example using Wireshark (and/or tcpdump) to see if there are many outgoing connection issues?

l0b0

Posted 2016-05-08T21:09:01.943

Reputation: 6 306

I did some more tests (4x on server and 4x via SSH). I connected to two different servers with latency either very low (16ms) or very high (500ms). Each of the runs have DL of around 0.8 Mbit/s and UL of 0.5 Mbit/s. So this is a lot lower than I expected and there's no difference between SSH and directly running it. Normally my DL speeds are around 30 Mbit/s. Any thoughts on why this is suddenly so low? Does it have to do with the speedtest.net servers? – MichaelDeSanta – 2016-05-08T21:46:59.427

Impossible to tell without heaps of data. At this point you'd best run Wireshark. – l0b0 – 2016-05-08T22:02:22.510

1

I don't think it has anything to do with my server resources. I just started downloading Ubuntu 16.04 via torrent and it is reaching speeds of 10 MB/s (so 80 Mbit/s?). I believe it is a problem with the speedtest-cli tool; the github page has a section about "Inconsistency" (https://github.com/sivel/speedtest-cli) Maybe it has something to do with that

– MichaelDeSanta – 2016-05-08T22:09:31.700