Hi, I have a Guest Ubuntu Server 24.10 running on my MacMini with M4.
Memory 4 GB, with 1 CPU Core. On the Ubuntu machine I have Docker running with 3 Containers (ioBroker, mariaDB for ioBroker and AdGuard).
This leads to a pretty good power consumption
Sometimes one CPU is not enough or I would like to have more power ready if I do diagrams etc. But if I assign 2 CPUs the power consumption nearly doubles.
If I go for 4 CPU cores it almost quadruples and so on.
For my understanding MacOS is pretty good at scaling it´s resources. But the moment I give a CPU to Ubuntu its fully active and drawing power. Any ideas how I could scale this so, that Ubuntu can grab more if needed but won´t if not needed?
Thanks
Martin
Power Consumption on a MacMini M4
-
emmataylor
- Posts: 2
- Joined: 2. Aug 2025, 10:55
- Primary OS: SLAX
- VBox Version: OSE Debian
- Guest OSses: 4
- Location: https://speedstarsgame.io/
Re: Power Consumption on a MacMini M4
I’ve noticed similar behavior on my M2 MacMini. Seems like macOS allocates power quite efficiently, but once the VM grabs a core, it's 'game on.' Have you looked into using Virtio-based dynamic scaling or CPU governor tuning inside Ubuntu?
-
Martin Schlender
- Posts: 8
- Joined: 15. Apr 2025, 11:30
Re: Power Consumption on a MacMini M4
Hi and thanks for your answer.emmataylor wrote: ↑2. Aug 2025, 10:58 I’ve noticed similar behavior on my M2 MacMini. Seems like macOS allocates power quite efficiently, but once the VM grabs a core, it's 'game on.' Have you looked into using Virtio-based dynamic scaling or CPU governor tuning inside Ubuntu?
Nope I didn´t go further with this, because if I look into CPU with htop - it´s usually between 6%-10%. It seems that this is not reflected on the Mac itself.
-
emmataylor
- Posts: 2
- Joined: 2. Aug 2025, 10:55
- Primary OS: SLAX
- VBox Version: OSE Debian
- Guest OSses: 4
- Location: https://speedstarsgame.io/
Re: Power Consumption on a MacMini M4
Thanks for the reply, Martin!
That 6%-10% CPU usage you see in htop—is that when the VM is idle, or under some load?
I’m wondering if the governor is staying in a lower performance state despite that background usage. Have you tried switching from ondemand to performance or using cpufrequtils inside Ubuntu to monitor behavior?
That 6%-10% CPU usage you see in htop—is that when the VM is idle, or under some load?
I’m wondering if the governor is staying in a lower performance state despite that background usage. Have you tried switching from ondemand to performance or using cpufrequtils inside Ubuntu to monitor behavior?
-
Martin Schlender
- Posts: 8
- Joined: 15. Apr 2025, 11:30
Re: Power Consumption on a MacMini M4
Morning,emmataylor wrote: ↑4. Aug 2025, 04:22 That 6%-10% CPU usage you see in htop—is that when the VM is idle, or under some load?
I’m wondering if the governor is staying in a lower performance state despite that background usage. Have you tried switching from ondemand to performance or using cpufrequtils inside Ubuntu to monitor behavior?
Because I run docker with adguard and ioBroker (my SmartHome instance) and a mariaDB on the system it´s always under some load
To be honest my Linux knowledge is not that deep that I knew about cpufrequtils or the ondemand vs. performance states
And tuning it up would use more power and not less - wouldn't it?
Thanks
Martin
-
Oralie
- Posts: 1
- Joined: 25. Aug 2025, 07:32
- Primary OS: OpenSolaris 11
- VBox Version: OSE Fedora
- Guest OSses: 12
- Location: https://bitlife2.org/
- Contact:
Re: Power Consumption on a MacMini M4
Hi!
What’s happening is basically this: macOS is like a careful driver who saves fuel when the car is idle, but when you give Ubuntu its own engine inside the car, that engine keeps running even at a red light. That’s why power draw goes up.
The easiest way to fix this is:
Let Ubuntu share CPU time instead of reserving a full core.
Or, even better, run Docker containers directly on macOS to let Apple’s system handle power scaling naturally.
What’s happening is basically this: macOS is like a careful driver who saves fuel when the car is idle, but when you give Ubuntu its own engine inside the car, that engine keeps running even at a red light. That’s why power draw goes up.
The easiest way to fix this is:
Let Ubuntu share CPU time instead of reserving a full core.
Or, even better, run Docker containers directly on macOS to let Apple’s system handle power scaling naturally.
Re: Power Consumption on a MacMini M4
All the musing about peformance above were made obsolete by one of our devs: he spotted incorrect timer virtualization, making the CPU waste cycles. Try latest "development snapshot" test build. It should improve the situation noticeably. Might not be perfect, but much better than before.
-
Martin Schlender
- Posts: 8
- Joined: 15. Apr 2025, 11:30
Re: Power Consumption on a MacMini M4
Hey Klaus,klaus wrote: ↑25. Aug 2025, 21:19 All the musing about peformance above were made obsolete by one of our devs: he spotted incorrect timer virtualization, making the CPU waste cycles. Try latest "development snapshot" test build. It should improve the situation noticeably. Might not be perfect, but much better than before.
thanks for sharing. Which build fixed the issue? I missed your answer somehow (no e-mail notification) and would like to know if this fix is already included in the current stable...
Thanks
Martin
Re: Power Consumption on a MacMini M4
The fix is in 7.2.2.