Docker using 500% of my CPU

Hello,

I have installed Docker on my Ubuntu and it is using 500% of its CPU constantly, it often leads to screen freezes.

Screenshot from 2025-01-10 12-40-43

I am using Docker (Desktop) for running my supabase container, nothing special.

OS: Ubuntu 24.04.1 LTS x86_64
CPU: AMD Ryzen 9 5900X (24) 3.7GHz

You installed Docker Desktop. Docker CE is inside the VM. All we see is that the qemu process (the VM) uses 5 CPUs. Which probably means processes inside the VM use lots of CPU resources. Most likely your containers or more specifically processes inside the containers. So first should find out which process, then you can find out why.

docker stats should show more info.

Yep, I thought so, however I didnt see anything conerning inside of my containers.
I am using exact containers on my laptop (ubuntu 22.04.5 LTS, Ryzen 3 5300U (8) 3.9GHz) and never experienced such issues on it.

So while the sum of the CPU usage of containers are normal, you still see 500% CPU usage of qemu, right?

Do you have some Docker Desktop extensions or Kubernetes enabled? Those could use the CPU, but those are the containes not shown by default unless you enable showing system containers (to see extensions) and Kubernetes containers

Yes, this is exactly what I am saying. I have no extensions nor Kubernetes.

Hmm… I had Kubernetes and the qemu process still used only 40% of a CPU. Do you have bind mounted folders for your containers where processes have lots of IO operations? Since Docker Desktop has to mount folders to its virtual machine, maybe there is something wrong with that.

You can also try disabling features in Docker Desktop. Everything that could use any resources, like auto update, sending usage statistics, SBOM indexing (but I think that would be a separate process), any experimental feature and even the “Access to experimental features” (in case it communicates with anything occasionally, even if only when starting Docker Desktop.

Have you ever trued qemu directly to run virtual machines? It would be great if you could compare the qemu process of Docker DEsktop with another Qemu process.