High CPU usage on Docker VM when lazydocker is running
danielcompton opened this issue · comments
Describe the bug
When I start lazydocker against an idle macOS Docker Desktop install, CPU usage goes from ~2% to over 100%.
To Reproduce
This is reproducible whether "Use the new Virtualisation framework " is enabled or disabled in the Docker settings.
- Start Docker Desktop for Mac
- Ensure no containers are running
- Open Activity Monitor
- Observe CPU usage of
qemu-system-aarch64
(new Virtualisation framework disabled) orVirtual Machine Service
(new Virtualisation framework enabled) goes to 100-200% - Close lazydocker
- Wait ~10s
- Observe CPU usage goes back to near zero
Expected behaviour
Low to no CPU impact from turning on lazydocker
Screenshots
Desktop (please complete the following information):
- OS: macOS
$ lazydocker --version
Version: 0.12
Date:
BuildSource: homebrew
Commit:
OS: darwin
Arch: arm64
Additional context
Setting dockerRefreshInterval didn't seem to affect the CPU usage, it was still at ~170%.
$ cat ~/.config/lazydocker/config.yml
update:
dockerRefreshInterval: 2000ms
@danielcompton can you check to see if this issue persists on the latest release?
This is hugely improved, thanks very much!
- With the new Virtualisation framework I am at ~1% CPU at idle, and ~10% with lazydocker running.
- With the old QEMU based virtualisation it is 1-2% CPU at idle, and 50% with lazydocker running.
Side note: It seems like (as of 10 months ago, according to Reddit) the new Virtualization framework still has a lot of work to go with disk performance: https://www.reddit.com/r/docker/comments/nha68s/macos_what_impact_does_use_new_virtualization/
Awesome. I'll close this issue off then. There's still more gains to be made in CPU usage but I'll capture that in a separate issue