Testing the networking speed - aceisace/Raspberry-Pi-Setup GitHub Wiki

How to test the networking speed

Are you running into issues due to slow download and upload speeds, there is a way to find that out. For applications where speed is critical (e.g. a webserver), it's usually good practice to find out how well it can perform at best.

Checking the network signal strength

First, the Raspberry Pi must be in range of the WiFi signals of the router. If the Raspberry Pi is far, or in some cases not directed towards the router (especially true for the Raspberry Pi Zero W model), the 'ping' time will fluctuate a lot and take longer than usual. A good starting point for a ping is +-20ms.

You can find out the strength of the received signal with:

sudo iwlist wlan0 scan | egrep "Cell|ESSID|Signal|Rates"

Take a note at the strength, which shows something like: -80 or -50. The closer this number is to zero, the better.

The ping time can be found by pinging google (8.8.8.8) like so;

ping 8.8.8.8

To stop the pinging, press the Control and C keys of your keyboard simultaneously.

Performing a download and upload speed test

Once you have confirmed that the WiFi signal strength and ping time are OK, the upload and download speeds can be tested. To do so, first install speedtest-cli with:

sudo apt-get install speedtest-cli

and finally run it with:

speedtest-cli

Once executed, the package will display the download and upload speed.

Lastly, a special thanks to the maker of speedtest-cli (Matt Martz) for developing this software.