iloveemma
Posts: 1
Joined: Wed Jul 15, 2020 2:22 pm

Slow internet speed on PI 4

Wed Jul 15, 2020 2:27 pm

Hi All,

I am new to linux and PI4 so please be patient with me.

I have very slow internet speed on the PI4 compared to my PC (1GB) when doing a speed test.

Code: Select all

pi@raspberrypi:~ $ speedtest --simple
Ping: 69.675 ms
Download: 27.36 Mbit/s
Upload: 15.45 Mbit/s
pi@raspberrypi:~ $
How can i resolve this? I am using ethernet connection on my PI4 and disconnected the wifi connection.

business_kid
Posts: 33
Joined: Fri Dec 21, 2012 9:33 am

Re: Slow internet speed on PI 4

Sun Jul 26, 2020 4:11 pm

Funny thing is, I have the 64 bit beta(?) here, and that's faster than the 32bit one. Around the same time
[*]32Bit Pi OS(armhf) 7-12 Mbps
[*]64bit Beta - 20 Mbps
x86_64 Laptop - 35 Mbps
Android phone - 45-50 Mbps

mpratt14
Posts: 30
Joined: Tue Feb 11, 2020 10:10 am

Re: Slow internet speed on PI 4

Mon Jul 27, 2020 1:17 pm

Do you have a lot of USB devices connected?

show results of

Code: Select all

dmesg | grep Link

cleverca22
Posts: 6834
Joined: Sat Aug 18, 2012 2:33 pm

Re: Slow internet speed on PI 4

Tue Jul 28, 2020 12:12 am

try running the test with iperf or iperf3 also, i have seen reports that anything using TLS will have cpu bottlenecks

User avatar
HawaiianPi
Posts: 7539
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Slow internet speed on PI 4

Tue Jul 28, 2020 1:25 am

iloveemma wrote:
Wed Jul 15, 2020 2:27 pm
Hi All,

I am new to linux and PI4 so please be patient with me.

I have very slow internet speed on the PI4 compared to my PC (1GB) when doing a speed test.
...
How can i resolve this? I am using ethernet connection on my PI4 and disconnected the wifi connection.
Hard to say with no point of reference.
  • How fast is your service?
  • How fast did you expect it to be?
  • What do other computers on your network achieve?
  • What speed test are you running?
This information could also be helpful.
  • What OS?
  • Which Pi4 (GB)?
  • What are you using for a power supply?
  • What do the following commands return?

Code: Select all

cat /sys/firmware/devicetree/base/model;echo;vcgencmd get_throttled

Here's what I get on 5GHz WiFi with 100/100 service and the router at the end of the hall (couple of rooms away).

Code: Select all

RaspberryPi4:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Ziply Fiber (50.39.123.45)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by LS Networks (Portland, OR) [17.12 km]: 5.364 ms
Testing download speed......................................
Download: 88.54 Mbit/s
Testing upload speed........................................
Upload: 78.53 Mbit/s

RaspberryPi4:~$ speedtest-cli --version
speedtest-cli 2.1.2
Python 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
My Win10 laptop on the same desk gets a 4ms ping with 94.5Mbps down and 92Mbps up.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

pidd
Posts: 4186
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Slow internet speed on PI 4

Tue Jul 28, 2020 2:03 am

Using speedtest my download was 88% of reality but the upload speed was 15% of reality.

I tried forcing it to use another server and got identical results which makes me suspicious.

So I tried the nearest server and the furthest server (7km and 1500km) the upload speed barely changed so either the algorithm is excellent or there is something amiss.

As it only lists the nearest 1000 servers can someone give me server numbers from other continents. Liverpool, UK is 15553 and Ledziny, Poland is 11351

Code: Select all

sudo apt install speedtest-cli

speedtest --list|more

speedtest --server 15553

User avatar
HawaiianPi
Posts: 7539
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Slow internet speed on PI 4

Tue Jul 28, 2020 2:33 am

pidd wrote:
Tue Jul 28, 2020 2:03 am
... but the upload speed was 15% of reality.
The apt version of speedtest-cli has a bug that produces low upload results. Try the pip3 version (which I used for my results above).

Code: Select all

pip3 install speedtest-cli
sudo ln ~/.local/bin/speedtest-cli /usr/local/bin

Now check your version.

Code: Select all

speedtest-cli --version
speedtest-cli 2.1.2
Python 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

pidd
Posts: 4186
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Slow internet speed on PI 4

Tue Jul 28, 2020 4:18 am

Yes, I was on version 2.0.2 vs 2.1.2

Download is still 15% down, upload is 5% down compared to reality - much better :D

business_kid
Posts: 33
Joined: Fri Dec 21, 2012 9:33 am

Re: Slow internet speed on PI 4

Tue Aug 04, 2020 5:12 pm

I made some progress on this, so I'll post my results.

I tried everything - firmware, modules, kernels, hardware research. Broadcom use the prefix BCM for their parts, and Cyrpess semiconductor uses CY. Interestingly, Cypress manufacture the BCM43455, but Broadcom makes the BCM 43454 & 43456. So I gather Broadcom have put the 43455 wifi chip inside the BCM2711, either as an IP core (VHDL) or similar. Tests here show the Pi lacks sensitivity in wifi.

I approached this with the same issue - slow wifi, downloads particularly. The one thing I had over other folks was that I go back to the Analog TV days where pinching a signal from distant transmitters was developed to an art form in Ireland, and I knew the ropes. My router's aerial was vertical, so the Pi's aerial had to be positioned vertical. I have a Flirc case, with Aluminium on 3 sides, so I had to get the rubber side out. In Europe, metal in all devices has to be earthed to get CE approval, without which they should not be sold. So the outside of the HDMI cable, the 0V line in the power supply are probably all earthed. Pi boards here all probably ground 0V through the power supply and make sure the metal cases are grounded. The idea is that if any metal goes live, the RCD (Residual Current Device) will trigger a fault. Ground is a wifi sink, and the proximity of ground is also. Metal cases are therefore bad for wifi, no matter what folks say.

Those who don't have a metal case probably have a big fan over the cpu shielding the wifi aerial. The results improve a bit, but the fan is a noise source instead of an earth source. No leads are floating. Metal things lying in vicinity of the aerial give it capacitance, which degrades reception.

In short, the Pi 4 is a nearly impossible thing to get perfect reception from.

So when I got my downloadsup from 7Mbps to nearly 30Mbps by clearing the path to my router, getting the non-metal side of the case pointing at the router, I decided I was doing well. It's not maxed out, but I'm happy with my compromise. And the Flirc case is silent, beating the standard case by a wide margin noise wise.

pidd
Posts: 4186
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Slow internet speed on PI 4

Tue Aug 04, 2020 5:53 pm

business_kid wrote:
Tue Aug 04, 2020 5:12 pm
In Europe, metal in all devices has to be earthed to get CE approval, without which they should not be sold. So the outside of the HDMI cable, the 0V line in the power supply are probably all earthed. Pi boards here all probably ground 0V through the power supply and make sure the metal cases are grounded.
I like the logic but reality is different and I note your uncertaintity..

There is no earth in a Pi power supply, it is classed as a double insulated supply which implicitly has adequate isolation from the mains. The earth pin on the plug is non-conductive plastic.

It is sold as separate parts, only the power supply needs electrical safety standards. The case especially is sold as a metal box with no electrical connection.

Whether the case is earthed or not is pretty irrelevant at high frequencies, its either a Faraday shield or its not.

User avatar
rpdom
Posts: 20894
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Slow internet speed on PI 4

Tue Aug 04, 2020 6:43 pm

business_kid wrote:
Tue Aug 04, 2020 5:12 pm
So I gather Broadcom have put the 43455 wifi chip inside the BCM2711, either as an IP core (VHDL) or similar.
Nope, the BCM43455 is a separate chip.
Unreadable squiggle

tomhanks
Posts: 4
Joined: Mon Sep 14, 2020 9:15 pm

Re: Slow internet speed on PI 4

Mon Sep 14, 2020 9:45 pm

Have attempted to figure this out in several ways. Based on my current configuration, PI 4 Wireless Network does not get the speed required. Simple speedtest-cli with version 2.1.2 and Python 3.7.3 results and Network information follow:
Spectrum Cable
350 MBs Download
20+ MBs Upload

Wired directly to TP-Link GB switch attached to TP-Link AX6000 Router:
Ping: 35.315 ms
Download: 398.15 Mbit/s
Upload: 22.49 Mbit/s

Wireless 5G:
Ping: 38.457 ms
Download: 68.54 Mbit/s
Upload: 16.66 Mbit/s

This is a headless configuration, although I can hook to a monitor.
I have seen people having similar problems, but my thought is this should at least give similar speeds to wired.
Network router and switch are all in the same room as the Raspberry Pi and all connected using CAT7 cables.
Big difference between wired and wireless speeds. I don't have this issue on any of my other devices. Most devices, including phones and other computers, get faster speeds from wireless.

Anyone have suggestions or have similar issues?
Need wireless to work better for my projects.

EdjeElectronics
Posts: 15
Joined: Mon Mar 13, 2017 1:55 am

Re: Slow internet speed on PI 4

Thu Dec 10, 2020 4:56 am

mpratt14 wrote:
Mon Jul 27, 2020 1:17 pm
Do you have a lot of USB devices connected?

show results of

Code: Select all

dmesg | grep Link
Does having USB devices connected affect internet speed? I have my Pi 4 set up to boot from a USB3 SSD, and the internet is extra slow (both wired ethernet and WiFi).
Check out my Raspberry Pi projects at www.youtube.com/c/EdjeElectronics !

renice123
Posts: 376
Joined: Tue Oct 15, 2019 3:56 pm

Re: Slow internet speed on PI 4

Thu Dec 10, 2020 7:44 am

I suspect that the problem must be looked for in the hardware. In other words, there is no external antenna in Pi, as I understand it, there are pads for these connectors. Most likely the problem will be solved if you solder the connectors and find a place for an external antenna. The board shows that this will not be a difficult task for those with a soldering station and a microscope. So solved this problem for Rpi3. I'm pretty sure the same solution will work for Rpi4
https://antennatestlab.com/antenna-exam ... in-pattern
Image

Cook Berry
Posts: 7
Joined: Tue Dec 22, 2020 1:36 am

Re: Slow internet speed on PI 4

Thu Dec 24, 2020 1:33 pm

Same issue, download 10~20 Mbps.

Flukester
Posts: 1
Joined: Fri Jan 01, 2021 6:39 pm

Re: Slow internet speed on PI 4

Fri Jan 01, 2021 7:25 pm

On my Windows PC 16GB & Internal SSD.
-LAN - transfer - 40-50MB/s
-INTERNET - transfer - 30-35MB/s

On my Pi 4 (8GB) @ CPU 1.75Ghz GPU @620Mhz(max) & External SSD.
- LAN - transfer - 30MB/s
- INTERNET - transfer - 3-7MB/s (makes no sense)

Not a wired issue as it would affect Windows as well. I am using the same Ethernet cable that hosted my old PC. The Pi is replacing.

rma153
Posts: 73
Joined: Sat Nov 12, 2016 6:17 am

Re: Slow internet speed on PI 4

Thu Jan 07, 2021 12:11 am

Same issue, using same set up, RPi 4 B, speedtest shows 7Mbps on average Internet speed regardless of what I try
while Windows PC speedtest shows 31Mbps on average Internet speed regardless

blixten
Posts: 3
Joined: Wed Nov 07, 2018 9:10 am

Re: Slow internet speed on PI 4

Wed Jan 27, 2021 12:07 pm

I also have very slow speeds on speedtest-cli with Raspberry.
And if i remember correctly (it was a darn long time ago) i got poor speeds on other more proper linux machines back in the days.
Speedtest + linux + command line interface is not a good combo. And it truly bothers me that they haven't got around to fix that yet.

pip3 install speedtest-cli
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: speedtest-cli in /usr/lib/python3/dist-packages (2.0.2)

Raspberry Pi 4 Model B Rev 1.1
throttled=0x0

dmesg | grep Link
[ 9.334846] bcmgenet fd580000.ethernet eth0: Link is Down
[ 14.553441] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

link is 250mbit both ways and i get like 40mbit down 6.7mbit up.
wget -O /dev/null ftp://ftp.sunet.se/debian-cd/10.7.0-liv ... nnamon.iso
debian-live-10.7. 15%[======> ] 390.25M 28.4MB/s eta 76s

I have even set up this https://pimylifeup.com/raspberry-pi-int ... ctografana in order to monitor this over the day, i have set the timer to every 6hrs.
And its the same shit speed every time. The Raspberry Pi is directly connected to internet aswell.

pidd
Posts: 4186
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Slow internet speed on PI 4

Wed Jan 27, 2021 2:02 pm

blixten wrote:
Wed Jan 27, 2021 12:07 pm
Requirement already satisfied: speedtest-cli in /usr/lib/python3/dist-packages (2.0.2)
You need 2.1.2 or above.

technohippy29
Posts: 7
Joined: Wed Jan 27, 2021 9:07 am

Re: Slow internet speed on PI 4

Wed Jan 27, 2021 3:21 pm

Ok - the Speedtest utilities that you can download via apt-get and pip install are both not working at full speed. If you download the Speedtest utility from Ookla at https://speedtest.net/apps/cli (go to Linux / Arm), I get close to my ISP full speed of 350Mb/s down and 36Mb/s upload. If I use the Pip version, I get 59Mb/s download. If I use the apt version, I get 62Mb/s download.

I note that only the Ookla downloaded version offers Virgin Media servers - the apt and pip versions dont offer these in "speedtest --list". In order to make sure all tests are equal, I forced them all to use server 30690, which is Community Fibre Limited - London. I get 10ms latency and maximum 383Mb/s from this site.

The Speedtest utility from Pip and apt-get uses the command line parameter speedtest --server 30690
The Speedtest utility from Ookla uses the command line parameter speedtest -s 30690

Versions:

Code: Select all

root@raspberrypi:/home/pi/Downloads# /usr/local/bin/speedtest --version
speedtest-cli 2.1.2
Python 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0]

root@raspberrypi:/home/pi/Downloads# /usr/bin/speedtest --version
2.0.2

root@raspberrypi:/home/pi/Downloads# ./speedtest -V
Speedtest by Ookla 1.0.0.2 (5ae238b) Linux/arm-linux-musleabi 5.10.10-v7l+ arm/armv7l

The official command line client for testing the speed and performance
of your internet connection.
root@raspberrypi:/home/pi/Downloads#
Download Results (upload results are all at full 36Mb/s):
  • Windows 10 laptop 1GB/s LAN connected directly to Virgin Media Superhub 2:
    - Google Chrome web page at speedtest.net: 286Mb/s
    - speedtest.exe from speedtest.net: 383Mb/s
    - apt-get version of speedtest from WSL: 160Mb/s
    Raspberry Pi 4B 2GB, 1GB/s LAN connected directly to Virgin Media Superhub 2, Raspian Buster with latest updates and rpi-update firmware as of 26/01/2021:
    - pip installed version of Speedtest at /home/pi/.local/bin/speedtest: 59Mb/s
    - apt-get installed version of Speedtest at /usr/bin/speedtest: 62Mb/s
    - Speedtest Linux Arm version downloaded from Speedtest.net: 320Mb/s
    - Chromium browser web page at speedtest.net: 73Mb/s
Speedtest results on Pi:

Code: Select all

# Ookla version 1.0.0.2
root@raspberrypi:/home/pi/Downloads# ./speedtest -s 30690

   Speedtest by Ookla

     Server: Community Fibre Limited - London (id = 30690)
        ISP: Virgin Media
    Latency:     9.36 ms   (2.31 ms jitter)
   Download:   381.44 Mbps (data used: 463.6 MB)
     Upload:    36.08 Mbps (data used: 18.1 MB)
Packet Loss: Not available.
 Result URL: https://www.speedtest.net/result/c/a99c9c16-a6d0-45d6-b360-07801ae5d513

#apt version 2.0.2
root@raspberrypi:/home/pi/Downloads# /usr/bin/speedtest --server 30690
Retrieving speedtest.net configuration...
Testing from Virgin Media (81.109.12.39)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Community Fibre Limited (London) [35.74 km]: 17.971 ms
Testing download speed................................................................................
Download: 70.65 Mbit/s
Testing upload speed......................................................................................................
Upload: 26.11 Mbit/s

#pip version 2.1.2
root@raspberrypi:/home/pi/Downloads# /usr/local/bin/speedtest --server 30690
Retrieving speedtest.net configuration...
Testing from Virgin Media (81.109.12.39)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Community Fibre Limited (London) [35.74 km]: 17.197 ms
Testing download speed................................................................................
Download: 129.99 Mbit/s
Testing upload speed................................................................................................
Upload: 40.15 Mbit/s
BTW, I tried iperf3 between my Windows laptop and the Raspberry Pi. Setup as follows:
- On Windows, download and extract iperf3 x64 - https://iperf.fr/download/windows/iperf-3.1.3-win64.zip
- On the Pi,

Code: Select all

sudo apt-get install iperf3
- On the Pi, run iperf3 in server mode:

Code: Select all

iperf3 -s
- On the PC, run iperf3 in client PULL mode:

Code: Select all

iperf3.exe -c 192.168.0.89
(change the IP address for the one associated with the LAN IP of your Pi). This will PULL data from the Pi.
- On the PC, run iperf3 in client PUSH mode:

Code: Select all

iperf3.exe -c 192.168.0.89 -R
(change the IP address for the one associated with the LAN IP of your Pi). This will PUSH data from the Pi.

Results as follows:
- Pull from Pi to PC average of 844Mb/s
- Push to Pi from PC: average 910Mb/s

I also tried with 10 parallel streams by adding the -P switch on the client end:

Code: Select all

iperf3 -c 192.168.0.89 -P 10
:
- Pull was average of 940Mb/s
- Push was average of 945Mb/s

UDP is a completely different story, and this appears VERY BROKEN on the Pi. Under any circumstances, I can NOT get any more than 10Mb/s (that is megabits not megabytes)! I found some information on the net about issues with dropped UDP datagrams and CPU throttling, so I pinned CPU0 and disabled CPU throttling - no better! I have tried an external 100mb/s USB adaptor and also the USB OTG LAN connection back to my PC. ALL are appalling, so I think this is a kernel issue!

I plan to use my RPi4B to make home router using OpenWRT or just Raspian. Given the very slow performance of UDP on the internal nic, and the slow performance of higher-level apps such as CHrome, Python, etc (which would seem to indicate they are not using hardware acceleration) then I dont think I can, until these are fixed.

I have a USB3 1Gb/s nic arriving soon from Amazon - I will give it a go with that and update.

blixten
Posts: 3
Joined: Wed Nov 07, 2018 9:10 am

Re: Slow internet speed on PI 4

Wed Jan 27, 2021 6:55 pm

pidd wrote:
Wed Jan 27, 2021 2:02 pm
blixten wrote:
Wed Jan 27, 2021 12:07 pm
Requirement already satisfied: speedtest-cli in /usr/lib/python3/dist-packages (2.0.2)
You need 2.1.2 or above.
installed the latest and still get crap speed.

this is via the eth0 iface

Testing download speed................................................................................
Download: 44.30 Mbit/s
Testing upload speed................................................................................................
Upload: 6.71 Mbit/s


wlan0

Testing download speed................................................................................
Download: 75.34 Mbit/s
Testing upload speed................................................................................................
Upload: 79.27 Mbit/s

pidd
Posts: 4186
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Slow internet speed on PI 4

Thu Jan 28, 2021 2:49 am

On an 80/20 connection on eth0 I get

/usr/local/bin/speedtest-cli
Retrieving speedtest.net configuration...
Testing from TalkTalk (92.13.223.181)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Exascale Limited (Manchester) [35.62 km]: 12.555 ms
Testing download speed................................................................................
Download: 70.30 Mbit/s
Testing upload speed......................................................................................................
Upload: 18.80 Mbit/s

Muskateer10
Posts: 17
Joined: Tue Apr 10, 2018 6:06 pm

Re: Slow internet speed on PI 4

Mon Mar 29, 2021 12:24 am

I had virtually no wifi over 5Ghz on the Pi 4 8gig memory. I switched to 2.4 Ghz WiFi connection and it woks much better.
I don't know why 5Ghz isn't working.

Return to “Troubleshooting”