How can I limit the CPU frequency for HA OS?

I have a thin client with no battery connection. I could probably shape a 2-3 Watts off the power consumtion if i switch the psu from the brick style to a highly efficient mean well psu but that would require non-german-conform wire bullshit I want to avoid.

@phsdv

Thanks for the suggestion - where would I do this? I don’t think the GUI Shell lets you install new packages. It also needs to be update and reboot safe.

Install advanced ssh and terminal addon. You can install packages on every start.

I was exploring with this and I set up the advanced ssh and terminal addon. But this only logs me in remotelly to the home assistant. Do you know the correct syntax to install packages? I am following the topic here but they only say it’s possible, now how. Probably missing something obvious?

Thanks!

PS: Using ubuntu the PC idles at arround 9-11W with the display on, so the CPU is not throttling down on HASSIO.

Look at the configuration tab for the addon.

Still not following there. Does the terminal unlock any functionality I don’t already have on the console of the home assistant machine? Or is it just a convenient way to remotelly log in?

I was looking into some system folders based on this topic.

When loging in from the terminal, on the homeassistant screen (Login command prompt) there are some CPU related features available at sys/devices/system/cpu/cpu0/cpufreq/ but I can’t edit these viles using vi, they are read only. I also can’t see them on the samba share or on the hard drive, on another computer. Trying to mount them as in the topiuc above also doesn’t work ( # mount -t sysfs none sys -n -o r). Any ideas?

I was also looking into the CPU speed graph on the homeassistant dash. It seems to throttle, but spends 90% of it’s time at 2GHz. Under Ubuntu it goes down to 1.2 whenever idle. So something is very conservative here.

That could include getting rid of a more than 10 year old cpu build on 22nm and opt in for a cheap, powerful and most important efficient solution. That could include something like odroid m1s which should idle at 1W and max at around 3W (without any tweaking).

So the savings for you in only one year when switching to a device with 3W power consumption is actually more then such a odroid m1s costs.

And just one day ago haos got official support for that device

1 Like

This tens to be a bit more complicated. Technically under Ubunto, by compuyter uses about 8Wall idling. Thats with a spinning hard drive and a 15" LCD in about half brightness. The problem is the power management drivers which are not optimized. I actually managed to change the governor from 3GHz to 1.3Ghz, but somehow, the power consumption didn’t change too much. So I’m pretty sure there is something else adding to the high power, maybe PCI, who knows.

You answer your own question here - I strongly suspect that drive accounts for AT LEAST 5 of that. Unless power management is actively spinning it down when idle (and with HA being a database load I seriously doubt it’s ever truly idle from a disk perspective) Spinning 3.5" consumer grade SATA is typically between 6-12w and often peak up to about 18w (2.5" is marginally better) under heavy load with a lot of random seek. So 8s pretty good.

I agree the odroid is a good option if power is your chief concern.

The Advanced SSH & Web Terminal addon enables not just ssh, but the ability to add packages such as cpufrequtils as suggested by @phsdv. However I have since realised that this won’t work for you, as the home assistant container does not have access to the operating system. Sorry for the distraction.

To get access to the OS you need to activate port 22222 ssh login.

1 Like

I think you misunderstood.
8 watt is a very good consumption and what I am trying to achieve, but I can only do it under Ubuntu.
The spinning drive uses 1.5W idle (spinning) and about 4W reading /writing. So the PC uses about 6W its noticeable cooler too.

So that tells me my computer is capable of very good stats - And in principle doesnt warrant the need to go to a low power PC. It should be idling the majority of the time and hence drawing little power.

Under HASS (Home assistant) I am always pulling 20-22W at idle (Average CPU load is 5%). So clearly something on the power management of the OS is not right. I also used some commands to throttle down the CPU and on the CPU monitor it shows it going down to 1.2GHz, but power consumption doesnt change. Its an intel i5, so nothing too out of the ordinary.

1 Like

Thank you for this suggestion! I was unaware of those devices!

A 4gb ram / 64gb Emmc costs around 90 USD here.
I did not find any versions with larger or detachable mass storage though.

My current HA installation consumes 130GB (30 days retention). And it’s likely to grow since I’ve just gotten started :stuck_out_tongue_winking_eye:

How will the cortex CPU compare to my current CPU? I am beginning to see some minimal delays in larger dashboards like the energy panel but nothing serious.

Also backup to smb takes about 1.2 hours atm.

Since HA is constantly writing to the ssd I do see a noticeable increase in ssd wear level - is there any info on the odroid devices in regards of emmc lifespan?
A turnaround of approx 240gb each month would result in at least 14-19 TBW within 5 years.
I had a very old ssd i have used at first fail already but had no issues simply restoring from backup to a new SSD which was awesome!

Last but not least: I utilize Linux bin bash shell commands with echo output to serial over USB devices /dev/ttyACM0 through home assistant - will this be possible with odroid as well?

Short Addendum:
I’ve found a Benchmark Comparison between my Intel Celeron 1037U and the Rockchip RK3566
Intel Celeron 1037U vs Rockchip RK3566 (gadgetversus.com)

Seems that the Odroid M1S System performs only at half the speed of the old celeron in multicore and only ~ a third in single core benchmarks.
Is home assistant somehow specially optimized for the architecture to compensate for the performance discrepancies or is there a similiar, more powerful system available? :smiley:

I’ve ordered an HP T530, based on an AMD GX-215JJ with a TDP of 10W, it should, see the power figures drop considerably. I will only be able to set it up next month, to get some results.

I’m also looking at the disk wear situation. I want to use my system as a NAS, so an SSD using an M2 slot or a USB 3.0 interface would probably be good for performance.

How do you do your backups - Is that a feature of HA or do you create a disk image using linux?

Quick update here.
I have set up the T530 with a 1TB WD Red SSD and 8GB RAM.
It idles at 5.5W, raising to 8W when a VGA monitor is attached.

Under load I’ve seen it peak at 16Watt with the monitor attached. The results are consistent between Windows 10, Ubuntu and HAOS.

So overall, I’m quite happy - consumption went down quite significantly and it’s fairly easy to upgrade this unit given the choice of internal slots and USB Ports.

While I was imaging the hard drive I got in excess of 100MB/s over the USB 3.0 ports, so backups are a breeze Running the OS through a USB attached drive is feasible for those so inclined.

1 Like

Thank you for sharing! Did you notice any drawbacks in terms of performance?

CPU wise they both idle at a few percent, no changes there.
Boot up is much faster on the T530 with the SSD vs the laptop with mechanical HDD.

Excellent! How about esp home compiling? I have serious wait times every time I modify a configuration with my box. Compiling takes up to 8 minutes

Still the odroid is more than the double efficiency compared to your linked intel cpu.

(Multi-core / watt performance)
Performance / watt ratio
Intel: 187 pts / W
Rockchip 399 pts / W

So intel should be much better keeping a coffee hot as it produces more heat (which often results in more fan noise too).

What is it that compiles 8 hours minutes on your HA server - ESPHome? I just compile on my 8-core (non intel) workstation and that takes hardly more then 2 minutes.

I just want best of both worlds :wink: Peak Performance AND efficiency :smiley:

I was playing around with ESPHome Pylontech Integration (Pylontech Battery — ESPHome) yesterday and it was a pain in the butt…

I am currently looking into Intel N100 Chips which, according to online reviews, reach 95% of their speed at a 10W P2/P1 power limit (they can go up to 15W) and have a TDP of 6W. So low idle consumtion but performance that is more or less on par with a i3-8100.

What really scares me off with the odroid m1s or similar systems is that the mass storage is not interchangebale. My current HA Installation already takes up 110GB and it’s not getting smaller, the more I add. So this seems like a one way street for me.
Odroid M1S with 4GB Ram and 64GB mass storage costs 95 EUR / 103 USD in Germany while I can get a N100 equipped mainboard (Asus Prime N100I-D D4-CSM) for a few bucks less.

Sure, I would have to add a PSU, SSD and RAM but I have those lying around anyway so no change in cost. I do not need/want Wifi, so that’s not an issue, too.

Also this rig might be able ot play Doom Eternal @640x480. So… :wink:

What do you think?

To my knowledge the odroid takes m2 SSD’s in a dedicated slot. You might mistaken it for a HA green which only has onboard eMMC an only allows extending storage via USBs?

IMHO it makes no sense to have a powerful ha server with high idle consumption just to speed up compiling while still maxing out the usage. As told you can easily compile esphome nodes on any other client too

Pollin sells the 4/64GB kit with case and PSU for 80 EUR

Thank you very much for pointing that out. I missed that. As soon as I read “64GB emmc” i’ve stopped reading :wink:

Thanks for the tip!

Can you please elaborate on the compiling part? I am really really new to all of this.

I am having performance issues with backups, updates and some statistics already.
An update of HA with a backup takes about 30-45 minutes atm.
While the system updates, my automations for solar power obviously do not work since HA is not available. This pushes updates to night time. Which disrupts the power feed from battery systems controlled by HA to my grid.
Which pushes updates to points in time where both the sun ins down and the batteries are empty :wink:

I do realize that my initial request was a more power efficient system and I recognize your recommendation as a really solid platform.
When I was starting with HA about 12 months ago I had a limited number of devices, automatisations and most of all statistic data. I was more than happy with the performance of the old Celeron 1037U back then. I was amazed how smooth it all runs.

Utilizing more and more of HA, embedding live CAN-BUS communication with solar chargers which do generate TONS of data etc. is slowly but steadily slowing down the HA Installation.

This is why I am looking for a more powerful aka future-proof option. I will be extending the data input to HA very soon (new CAN-BUs solar data, ~30 more sensors/relays. 6 AC Systems etc.)

Is there a more powerful version of the ODROID-M1S that retains the performance per watt ratio?

Comparing the power per watt ratio it’s very hard to compare the ROKCHIP vs the newer intel chips since they can draw much more than the TDP might suggest.

Looking at the same source with the Geekbench 5 Multi-Core Benchmarks:
ROKCHIP: 56.2 pts / Watt (5W TDP)
Intel N100: 147.46 pts / Watt (15W p2 turbo limit usage)
Intel N100 @90%: 199.08 pts / Watt (With 10W max limit)

1 Like