Home Assistant on Raspberry Pi 4 slow internet via Ethernet

Tags: #<Tag:0x00007fc418a39308>

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.