Home Assistant on Raspberry Pi 4 slow internet via Ethernet

Dear all,

iam new to home assistant. I migrated from io broker to home assistant, and it works really good.

But what really strikes me now is the internet speed on the Raspberry Pi 4 with Home Assistant, compared to the actual speed on the network.

I have now compared this with the last few days and its the same. Home Assistant is quite slower than all of my other devices connect directly to the router via ethernet or wifi.

Do anybody know why? Is it limited by the sd card? Or is the raspberry limited by the power of the processor, cause the ethernet should be a gigabit ethernet?

Specs:
Home Assistant OS 6.1
Core-2021.7.2
Supervisor-2021.06.8

SD Card: Sandisk Extreme Pro
Ethernet cable: 0,5 meter Cat8 40 Gbit cable. (Input on routers lan 2,5 Gbit)

USB: Conbee 2

Thank you very much.

That looks suspiciously like a 100Mb/s link. The Pi4 is capable of Gb Ethernet. And unlike the Pi3B+ it is actually capable of this. Something is limiting you to 100Mb/s. Check the router has negotiated the connection correctly as Gb Ethernet.

To verify that the RPi has negotiated a 1Gb/s connection, you can connect to it with ssh and run ip link to identify your interface’s name (e.g. eth0 or enp0s25). Then run ethtool eth0 | grep Speed.

The speedtest.net integration uses speedtest-cli. See speedtest-cli inconsistency.
Maybe try what speedtest-cli reports on your Mac. (However, I don’t think it would be this far off.)
For speed testing on your LAN, you can use iperf.

information from Speedtest-cli on Mac gives me the full download rate of over 500 bits like with the normal Speedtest app.

Everything looks fine on the lan output on the router.

@tom_l there is a connection of 1 Gbit to the raspberry, instead of philips hue only uses 100 mbit.

But iam using hassio directly on the raspberry pi 4, how can I activated there ethtool and Iperf to check also for the raspberry?

If you don’t have ethtool, take a look at dmesg. My contains a message like this: enp0s25: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx (not a RPi though).
Sorry, I have no experience with the Home Assistant operating system, so I can’t help you install iperf.
But there is no reason not to trust your router about the negotiated speed.

@ondras12345 thanks for you help.
dmesg output: bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

So should be 1 Gbit.

Yes the hassio os is quite not the best for any linux commands.
Using io broker I got the full speed.

Maybe its because of hassio system.

@ondras12345
its quite easy with iperf3. Add it to the configuration yaml.

Got the correct information from my raspberry to the Mac. The connection is quite over 800 mbits via LAN.

Speedtest cli on Mac shows between 380 mbit and 560 mbit download rate.
Speedtest integration on Home Assistant only 20 mbit - 160 mbit download rate.

Don’t know where the problem can be. :smiley:

LAN Transfer rate:
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 106 MBytes 886 Mbits/sec
[ 5] 1.00-2.00 sec 106 MBytes 891 Mbits/sec
[ 5] 2.00-3.00 sec 107 MBytes 896 Mbits/sec
[ 5] 3.00-4.00 sec 107 MBytes 901 Mbits/sec
[ 5] 4.00-5.00 sec 108 MBytes 905 Mbits/sec
[ 5] 5.00-6.00 sec 108 MBytes 904 Mbits/sec
[ 5] 6.00-7.00 sec 108 MBytes 904 Mbits/sec
[ 5] 7.00-8.00 sec 108 MBytes 906 Mbits/sec
[ 5] 8.00-9.00 sec 108 MBytes 906 Mbits/sec
[ 5] 9.00-10.00 sec 107 MBytes 901 Mbits/sec
[ 5] 10.00-10.00 sec 320 KBytes 976 Mbits/sec

What happens when you try iperf with a remote host?
Maybe check ip route and make sure the RPi is using the same default gateway as the Mac.

How exactly did you execute this test? Were you testing the RPi’s upload or download speed?

I opened a iperf3 server on one of my devices on the network and set up the home assistant to ping there.

Iperf3 using remote server on hassio do not work. There is a list of remote servers for iperf3 (Die Liste der öffentlichen iperf3-Server) but none of them are working with home assistant hassio.

From the iperf3 output you posted, I can’t tell if this is the upload or download speed test. Make sure both are roughly the same speed. (When using the command line utilities, iperf3 -c server does an upload speed test and iperf3 -R -c server does a download speed test.) I want to make sure we aren’t comparing slow WAN download with fast LAN upload.

I randomly chose some servers from the list you linked and it did not work for me either. iPerf servers only seem to allow one connection at a time, so I guess they are all completely overloaded or shut down.

Hello,

Was there any resolution on this? I’m running a RP4 as well and my speedtest sensor is only returning 45-150mpbs when ethernet connected in. My mac when connected to the same connection is returning 8-900mpbs.

I’m having the same problem. Getting ~100-300 Mbits down on homeassistant on my Pi4, whereas I get >600 Mbits down when I test from my wired desktop. I wanted to use homeassistant to monitor my internet speeds over time, but I guess it will have to be relegated to relative speeds :confused:

Edit: running speedtest-cli on my wired desktop actually reveals a strong start with a steady drop down to the average being reported by my Pi. I can run the test in the browser immediately after and get 200-300 more. Maybe this is revealing that some fudging is going on (either by my ISP or speedtest)? Who knows.

Having a similar issue currently. I setup Jeff Geerling’s Internet Pi package for ISP monitoring with Grafana, Prometheus, and Speedtest because I was having issues with my ISP dropping this week. I am testing the connection from my router at 800-900Mb/s, but when the Pi runs its tests, my dashboard is showing only ~200Mb/s. I confirmed my speed and duplex are at 1000/Full on eth0. Not sure where to go from here.

my rpi4 seems to get close to my max throughput on a 500G connection.

I can get above 750Mbit/s both up and down, and a 4ms ping using the speedtest.net integration on rpi4 while watching IPTV.