Networking – Debugging Low Performance of Home Internet

networkingperformancerouterwireless-router

Movie streaming performance on my bedtime tablet went bad recently. Last night, I even gave up on the next episode of my favorite series and tried to figure out what's wrong. Is it my home router's fault or is it my ISP's fault, was the question I had in mind.

I'm debugging using the following. Two wifi-connected laptops run iperf between each other and each of them runs the Ookla speed test.

  1. Ookla speed test results vary a lot, from 11/55 Mbps (upstream/downstream) to 6/12 Mbps in just a couple of seconds.
  2. Sometimes, my Ookla speed tests are better than what iperf measures. For instance, the speed test measures 11/24 Mbps while iperf measures 9/17 Mbps.
  3. ping time from one of my laptops to the other goes from 2 ms to 200 ms while ping time to google goes from 20 ms to 40 ms

My questions are as follows:

  • How come that the Ookla speed test ever measures better speeds than iperf between the two laptops on the local network?
  • Why my ping time to the laptop on the local network varies so much?
  • Is there something wrong with my home router (would I get better streaming performance on my bedtime tablet with some other home router)?

Best Answer

Ookla speed test results vary a lot, from 11/55 Mbps (upstream/downstream) to 6/12 Mbps in just a couple of seconds.

It's difficult to even guess, because there is a lot between your devices and the Ookla test servers. It could be sudden radio interference causing the device to switch to a lower Wi-Fi rate (or even to a different band), but it could also be the Ookla website offering you different servers to test against, or it could be your local Internet connection (i.e. the physical cable in "cable" or the phone line in DSL or whatever) having some kind of problem, or the ISP having issues with its "upstream" providers, or something entirely different.

You should minimize the amount of variables. If you think the local Wi-Fi is the problem, then iperf-test a Wi-Fi connected device against a local Ethernet-connected device, to rule out any fluctuations on the ISP side. And vice versa, if you think the Internet connection (i.e. link with the ISP) is the problem, you again should do an online Ookla speed test from an Ethernet-connected device, to rule out any environment changes that could affect Wi-Fi.

How come that the Ookla speed test ever measures better speeds than iperf between the two laptops on the local network?

In general, tests between two Wi-Fi devices on the same channel will often be worse than tests between a Wi-Fi device and an Ethernet-connected one. The problem is that there's no direct communication between devices even on the same network – all data has to be relayed through the access point (which is acting as a L2 bridge).

And as Wi-Fi is half-duplex, the two hops cannot both occur at once – if I understand things correctly, the access point cannot receive the second packet from device A if it's still sending the first one to device B. This means that in total, only half the expected amount of data can go from A to B in the same duration. (The same doesn't happen if one side is Ethernet, as then both links can be active simultaneously; nor if both sides are wired, as Ethernet is no longer a shared-medium system these days.)

ping time from one of my laptops to the other goes from 2 ms to 200 ms while ping time to google goes from 20 ms to 40 ms

Battery-powered devices often use a "power saving" mode in their Wi-Fi radios. As far as I understand, after the interface has been idle for some amount of time, it will spend most of the time powered off and will only wake up every X ms to check if the AP says it has new packets queued for that device.

This way, Wi-Fi "power saving" can indeed save a lot of power but also cause very noticeable (and irregular) latency for packets incoming to that device, as it won't notice your pings until the next poll. (Meanwhile if the device itself speaks first – e.g. if it sends a 'ping' request and waits for reply – then its radio is still active and able to immediately receive the inbound response as soon as it's there.)

Try to run a continuous ping from the laptop (on Windows that's the -t option) or make sure some other network activity is continuously happening – now when you ping that laptop from another device, the response should be immediate as its Wi-Fi radio no longer goes to sleep.

Related Question