Rpi3 + hassio very high IO wait

Hey

Recently I’m facing some slow responding of my homeassistant and I looked into the system stats and found very high IO wait/utilization.

Linux 4.14.56-v7+ (raspberrypi) 	07/08/18 	_armv7l_	(4 CPU)
00:07:35        CPU     %user     %nice   %system   %iowait    %steal     %idle
00:07:37        all      7.38      0.00      2.29     89.95      0.00      0.38
00:07:39        all      7.09      0.00      6.08     86.84      0.00      0.00
00:07:41        all      6.03      0.00      2.51     91.46      0.00      0.00

It’s 64GB Samsung UHS-3 64GB Micro SDXC Memory Card

How is you io wait guys?
What storage are you using for rpi3?

I’ve tried to put dtoverlay=sdhost,overclock_50=100
but the system is not booting with it, so removed…

Hi @radinsky - have you found a way to resolve your issue with the high %iowait?

nope :frowning: just removed for now influxdb and pihole and it became more usable, but I will back to this later anyway…

do you found a solution on this? cause I have a lot of cpuiowait… maybe I have to upgrade to raspberry Pi 4?

I found the cause - rpi3’s sd bus speed is limited and with rpi4 probably will double it, but if you asking me, (after many years trying to simplify, optimize, offload stuff and etc) i’ve switched the nuc…

but i can also say, on one of my other rpi3s running kodi and also was suffering from low performance (due the sd card) i switched to ssd over usb and it really speed up the system and made much more reliable.

hmm ok :thinking:… it’s an hard choice because NUC have a different prize compared to Pi3/4… I read that the new Pi4 have better performance than the pi3 maybe I’ll give it a try… thank for the info :slight_smile:

I got second hand nuc i3 for about 100$ (including 128g ssd and 4g ram)
Yes, it’s like double of price of rpi4 but its performance I think is x20… I run tons of services, no need to limit or purge the db, having motioneye recording 4 cameras, vpn, adguard, image recognition and much much more and never saw the cpu total usage is going over 20%.

Agreed. I made the decision to do the same.

Figured if I’m going to entrust my entire house / life to be automated that going for the CHEAPEST solution likely wasn’t the best of all ideas - esp. when the SD card issue is a known one. Rather than dump another $40-$50 into SSD for the db route, just bought a i5-6260u NUC on eBay for $200.

In the grand scheme of things, not a bad price to pay and allows me to sleep a little better and not worry as much about (not if), WHEN my Pi3+ SD card was going to fry itself…

Certainly glad I started w/ the Pi3+ and don’t have bad things to say about it - but once you start going numerous integrations, > 20 or so ZWave devices, want RTSP, etc… it’s TOTALLY worth the upgrade.

what nuc do you suggest…and what operating system to install on the NUC?

I have the i3 with ubuntu 18.
Not sure regarding celeron nucs, the i3 does an excellent job and as i mentioned with tons of services and constant recording from 4 cameras it maximum goes to 20% cpu utilization…
All the better models (i5, i7…) can be a bit overkill for the home automation purpose (IMHO)

Personally I went with an i5-6260u w/ 4GB RAM and 256GB SSD. Arguably a bit overkill for this, but gives me flexibility going forward, and the extra couple bucks just means I hopefully don’t have to upgrade in the near future. This was about $210 w/shipping on eBay.

I followed this guide: https://www.juanmtech.com/set-up-hassio-in-docker-and-in-an-ubuntu-server/ to setup Ubuntu 18 and am running it headless.

There are quite a few different ways to run things, but not knowing Linux whatsoever before attempting this, I was simply going for quick / easy / painless. Took my about an hour to get things switched over.

2 Likes

@radinsky are you running 32 or 64?

I’m running on 64

Swap the sd and it’s way faster than before. However since I’m using influxdb I hope some day we will get USB support :+1:

I am using rpi3b+ with SD card as the HA server and touchscreen interface. I have quite a few things running through it, but I am not seeing high CPU usage until I open Chrome for the dashboard.

I must not be running as many services as you guys were, because when Chrome is closed I only see average of 10% CPU usage. With Chrome and Dashboard is open, and the DarkSky weather card is active it’s about 80%.

It’s running Raspbian, Mosquitto, HA, AppDaemon (HADashboard), and PiHole right now. With quite a few devices. The SD card is a very good one also, and I have a 120gb SSD ready for it.

This was basically me testing to see how it works out, but I am glad I found this thread. If the Pi starts to work too hard, I have another PC ready for me to migrate.