19

My customer complains about low internet speeds. When measured with Speedtest.net speeds are acceptable. Periodic measured downloads are 10% to 30% of the nominal speed. I cannot explain that.

Some background. The problematic connection is on one of those sunny Caribbean islands where fast internet is not the greatest asset. Lately internet speeds became decent, up to 200 Mbps. But ping round trip to (say) Amsterdam is about 180 ms.

The customer has a 100 Mbps fiber connection. When carrying out a speedtest on a Windows machine (speedtest.net) to the ISP CO we obtain 95 Mbps. When using the same speed test to Amsterdam we reach 60-70 Mbs. Fully acceptable.

Some time ago I installed a RasPi which periodically wgets a file from one of my servers in Amsterdam. In a datacenter, which is directly connected to AMS-IX. Using this command:

wget -O /dev/null --report-speed=bits http://aserv.example.net/~myuser/links/M77232917.txt

The .txt file is 23MByte of numbers. (Actually it is the one but largest Mersenne Prime, 23e6 digits)

When I download that file on the problematic network, wget reports this:

dev/null 100%[====================================================================>]  22.81M  11.6Mb/s   in 17s    

2019-02-08 14:27:55 (11.2 Mb/s) - ‘/dev/null’ saved [23923322/23923322]

That is at the same time speedtest.net reports 60-70 Mbps.

I know that the Raspi has its limitations. But this speed varies wildly. One time the RasPi report this 11 Mbps, the next time 22 Mbps. But sometimes as low as 1.5 Mbps.

enter image description here

When I do this test with a really powerful laptop, top speeds are somewhat higher (up to 30 Mbps), but also show the same lows. So it indicates a RasPi limitation on the high side, but not the 10 Mbps on the low side.

I issued exactly the same command from a server in München, Germany in a datacenter. Speed 96 Mbps.

Then from a consumer 100 Mbps fiber connection in the Netherlands: 65 Mbps.

Then, at my home which has nominal 10 Mbps ADSL. Speedtest shows 10Mbps. Wget gives 8.5 Mbps. Which is equal in my book.

This precludes any limitation on the server which acts as host for the file download.

I do not expect that anyone can point out the cause of the slowness of the connection at the customer premises. But can anyone explain the discrepancy between the speedtest.net and the wget?

Is there something the speedtest ignores, or does it measure only the peaks? Or is wget seriously influenced by long ping times?

I feel that the wget test gives the real, effective speed, while speedtest is mainly to show the advertised speed.

Johannes Linkels
  • 307
  • 1
  • 2
  • 7
  • Another way to check speed is to do `ssh personal-server cat /dev/zero | pv > /dev/null`, on a personal server that you know is not rate limited to be slower than the speed you're expecting. – JoL Feb 08 '19 at 20:23
  • I skimmed your question. And it sounds like you have a large bandwidth and maybe significant round trip delay scenario also known as a "long fat network". I've experienced this sort of thing personally and solved it by opening up many connections (I used rsync). Can you try opening many wget instances (try 5, 10, 20)? Wikipedia page is: bandwidth delay product. – Trevor Boyd Smith Feb 09 '19 at 13:05
  • Wget reports in bytes by default: [james@lamia root]$ wget -O /dev/null http://10.32.48.1/t1 /dev/null 100%[=====================>] 100.00M 112MB/s in 0.9s [james@lamia root]$ wget --report-speed=bits -O /dev/null http://10.32.48.1/t1 /dev/null 100%[=====================>] 100.00M 932Mb/s in 0.9s – james Feb 09 '19 at 14:46
  • Consider running an *iperf* server for tcp and a second for udp on your DC-hosted machine. Then as part of the cron job call a test from your client and see how the speeds compare with the http get. – Criggie Feb 10 '19 at 01:03
  • What kind of file is it anyway? Is it compressible and the server supports http compression? While you cannot fix bandwidth issues you might be able to make the file smaller. – Salman A Feb 10 '19 at 12:11
  • @Trevor Boyd Smith: The answer as posted by Andrew Henle also poiint into that direction of a high latency-bandwitdh product. It makes sense. With 180 ms and 100 Mbps the delay is unuasually long. – Johannes Linkels Feb 10 '19 at 18:45
  • @SalmanA: the contents of the file is very precisely specified in the OP – Johannes Linkels Feb 10 '19 at 18:46

6 Answers6

21

ISPs often prioritize traffic to speedtest.net so that they can brag how fast their connections are, while in reality, they don't provide that much bandwidth. They're perfectly aware that most users will only check that site for confirmation.

You also have to keep in mind that transfer speed relies both on the client and the server. In today's world most servers throttle in one way or another.

Finally, it's pointless to expect stable bandwidth for overseas connections. There's just no such thing. It has to go through an infinite number of switches, fibers, datacenters to reach the final location. And all it takes is just one moving part to slow down.

bviktor
  • 756
  • 5
  • 12
  • I understand your statements, except for throttling on the server side. It is my own server, and when the client is in a different data center (about 1200km away) the speed is consistently 95 Mbps. Even if the client is on a 100 Mb consumer connection it is 65 Mbps. – Johannes Linkels Feb 08 '19 at 14:59
  • 12
    Can you document you claim ? "ISPs often prioritize traffic to speedtest.net" – Soleil Feb 08 '19 at 15:03
  • 1
    @Soleil Didn't take too much Googling: https://www.myce.com/news/ookla-contacts-myce-regarding-inflated-isp-speed-test-results-article-78473/ – MonkeyZeus Feb 08 '19 at 18:39
  • I'm seconding the question about whether ISPs prioritize traffic to speed test sites. I just wanted to add that googling reveals a lot of unsubstantiated forum posts stating this occurs with no evidence or data. I wouldn't be surprised if ISPs engage in such behavior but, for example, with the heavy throttling of netflix there was plenty of data to demonstrate the problem. – BurnsBA Feb 08 '19 at 18:55
  • Okay, so even if ISPs *don't* prioritize traffic to speed testing sites, it's *plausible* that at least some might because it would give the impression of faster speeds. – Captain Man Feb 08 '19 at 19:59
  • 1
    @BurnsBA my mobile provider here in Austria ("3") even goes as far as not limiting the speed to what your plan allows. I have a 50Mbit/s max download on my phone but speedtest.net I can reach up to >250Mbit/s in the city. – Josef Feb 08 '19 at 20:33
  • @MonkeyZeus It's not about if it is true or not, but self documented (with references) answer increases its quality. – Soleil Feb 08 '19 at 21:35
  • @Josef Did you try some other site? Your ISP may not be throttling *any* connection, so whether speedtest shows 250Mbps is irrelevant. – Bakuriu Feb 08 '19 at 22:10
  • 8
    An ISP prioritizing speedtest traffic is as likely as a major car maker faking emissions tests. – Barmar Feb 09 '19 at 06:50
  • 3
    Anecdotally, I was once able to 'fix' a stuttering Super Bowl stream by sending traffic to speedtest.net repeatedly from a Raspberry Pi. Seemed like they prioritized my whole connection as long as there was speedtest traffic present - night and day difference. It's not much evidence that ISPs do shady stuff, but it's something. – Undo Feb 09 '19 at 21:58
  • @Bakuriu Yes. Only the speedtest.net servers are not throttled! That's a fact and the provider even communicates that openly! – Josef Feb 10 '19 at 15:27
  • sounds like speedtest.net should offer a VPN service through their test server IPs! – user371366 Mar 24 '20 at 07:35
17

In addition to the other reasons posted, TCP connections don't work well with large files when the bandwidth-delay product becomes large.

Like on an otherwise fast connection to an island.

See Wikipedia's entry on TCP tuning.

So Speedtest can dump a small file through the connection at 95 mb/sec, but wget can only get 10 mb/sec on a 20 MB file.

Andrew Henle
  • 1,232
  • 9
  • 11
  • 3
    This is new knowledge for me. Very good. Indeed, the bandwidth-delay product is high (2.25 MB if I calculated correctly). A quick look showed a default buffer of 87kB and a maximum of 3.5 MB. (I assume Byte not bits). I have to dive more deeply into this to better assess it. If, in combination speedtest downloads a lot of small files and records the max speed on that, it explains a lot. – Johannes Linkels Feb 08 '19 at 15:38
7

wget give good practical measure of the speed. The tests of Speedtest probably include kind of parallelism which can explain higher numbers.

For good average speed test I think the time for download should be at least 90-120 seconds (to get good average)

Romeo Ninov
  • 3,195
  • 2
  • 13
  • 16
  • I am working on installing a more powerful logging computer and to increase the file size. – Johannes Linkels Feb 08 '19 at 15:00
  • Can you develop "kind of parallelism" ? I don't see any way/reason since there is a priori 1 connection. – Soleil Feb 08 '19 at 15:04
  • 1
    @Soleil, IMHO they download few files, not only one. You can test it by run few `wget` and sum the speed – Romeo Ninov Feb 08 '19 at 15:05
  • 1
    I could parallelize my measurement, but what is the benefit? I already demonstrated that other clients reach full speed. The difference is that the problematic connection has a 180 ms latency. The fast connections < 10 ms. Would parallel diminish latency effects? Just asking. – Johannes Linkels Feb 08 '19 at 15:08
  • 1
    @RomeoNinov I checked, there is no such parallelism (speedtest.net). One file per upload and one per download ([1-2]MB each). – Soleil Feb 08 '19 at 15:11
  • @Soleil on speedtest.net you can switch between single and multi connection mode which behave differently. – Josef Feb 08 '19 at 20:47
  • @HansLinkels "what is the benefit of parallel" open the Wikipedia page on bandwidth delay product and it tells about latency limiting your overall throughout. See here for more: https://serverfault.com/questions/952978/why-the-discrepancy-between-speedtest-and-wget#comment1239359_952978 or Andrew Henley answer. – Trevor Boyd Smith Feb 09 '19 at 13:01
  • @Trevor Boyd Smith: My question was ambiguous. I guess the benefit of parallellizing the measurement is to confirm that it is a bandwidth-latency problem, correct? That the discrepancy is likely to be caused by latency I have acknowledged here: https://serverfault.com/a/952983/353468 . And I admit it was new for me. – Johannes Linkels Feb 11 '19 at 14:54
4

One reason could be that often the maximum speed cannot be reached by just a single TCP connection.

Speedtest.net recently introduced a single connection mode. Try this and see if it makes a difference.

Then, for the download use for example aria2 with parameters to use multiple conections and compare. e.g. aria2c -d /dev -o null --allow-overwrite=true --file-allocation=none --max-connection-per-server=8 --min-split-size=1M http://aserv.example.net/~myuser/links/M77232917.txt

Josef
  • 381
  • 3
  • 9
2

Use Fast.com Internet Speed Test, this is a Netflix based speed test meaning it cannot be differentiated by ISPs from Netflix itself.

This is a more accurate test than any other test generally. People won't be worried about how fast a web page loads, but rather how quickly the videos buffer due to the increased bandwidth necessary to display a video.

ISPs often boost speeds based on the domain someone is connecting to if it's a speed test or using port 8080. Whereas Netflix uses port 80, a slower port when it is being prioritized.

Anthony Geoghegan
  • 2,800
  • 1
  • 23
  • 34
Jonathan
  • 21
  • 1
  • 1
    "meaning it cannot be differentiated by ISP's from Netflix itself" - That is untrue, the ISP can definitely see both the DNS request and the SNI on the HTTPS connection. – Kevin Feb 09 '19 at 09:29
  • @Kevin fast.com contacts netflix servers to download from, meaning it emulates videos from netflix itself. Although I will grant you ISPs may catch onto the fact that connecting to that specific site which subsequently contacts Netflix based servers requires prioritization similar to speedtest.net – Jonathan Feb 09 '19 at 20:11
  • It's not exactly rocket science. All they have to do is unthrottle Netflix for a few minutes or hours after they see a fast.com connection. The upside, of course, is that you can go to fast.com to get yourself unthrottled, then close the tab and watch Netflix for real. – Kevin Feb 09 '19 at 21:34
  • Personally I suspect it is computer science or at least related to it rather than rocket science. It seems some of the bigger ISPs (e.g. Bell) haven't caught onto fast.com over the past few years. Either way running a script on your computer that connects to fast.com in order to up your download speed every little while if the throttling is bad enough would be viable. – Jonathan Feb 10 '19 at 01:32
0

Is it just me or did no one notice he said Mbps and the wget command list "MB/s".

60mbp/s and actually getting 11.2Mb's is normal.

Mbps and MB/s are two different speeds.

"a Megabit is 1/8 as big as a Megabyte, meaning that to download a 1 MB file in 1 second you would need a connection of 8 Mbps. " So 11mbx8=88mbps...11.2Mb is actually good for a connection reporting 60-70mbps.

Are people having memory lose awnering this. You'll never get 70mb/s with a speedtest speed of 70Mbps

  • The output of `wget` is *Mb/s* which translates to *Megabits/s*. *MB/s* would translate to *MegaBytes/s*. Just run your own `wget` command and verify the result. – Thomas Feb 09 '19 at 11:33
  • 1
    @james: Yes by default, but in OP the `wget` command includes `--report-speed=bits` which results in `Mb/s` which is `Mbit/s`. Running without `--report-speed=bits` gives `MB/s` which translates to `MByte/s`. Note the `b` and `B`. – Thomas Feb 09 '19 at 16:30