jesseduffield / lazydocker

The lazier way to manage everything docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

  1. Start Docker Desktop for Mac
  2. Ensure no containers are running
  3. Open Activity Monitor
  4. Observe CPU usage of qemu-system-aarch64 (new Virtualisation framework disabled) or Virtual Machine Service (new Virtualisation framework enabled) goes to 100-200%
  5. Close lazydocker
  6. Wait ~10s
  7. Observe CPU usage goes back to near zero

Expected behaviour

Low to no CPU impact from turning on lazydocker


Desktop (please complete the following information):

  • OS: macOS
$ lazydocker --version
Version: 0.12
BuildSource: homebrew
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 
  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:

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

ezoic increase your site revenue