Docker Desktop using high CPU or memory on Mac? How to fix it

Updated · 2 min read · by

Quick answer

Docker Desktop runs a Linux virtual machine on your Mac, and your containers run inside it. High CPU usually means a container is busy, file sharing is working hard, or the VM has more resources than it needs. Check docker stats, stop containers you don't need, and set CPU and memory limits in Docker Desktop's Settings › Resources.

Why Docker uses CPU and memory on a Mac

Containers need a Linux kernel, so Docker Desktop starts a lightweight Linux virtual machine. In Activity Monitor you see that VM (and Docker's helper processes), not your individual containers. Its usage is the total of:

How to bring it down

  1. Find the busy container. Run docker stats in Terminal to see CPU and memory per container, then stop or fix the heavy one.
  2. Stop what you aren't using. docker compose down in a project folder, or stop containers from Docker Desktop's dashboard.
  3. Set resource limits. In Docker Desktop, open Settings › Resources and lower the CPU and memory limits to what your projects really need.
  4. Use the faster file sharing option. Recent Docker Desktop versions offer VirtioFS for file sharing on Mac in Settings › General. It's usually much faster for bind mounts.
  5. Use native images. On Apple silicon, prefer arm64 images. If you must run amd64 images, Docker Desktop's option to use Rosetta for x86/amd64 emulation is usually faster than the default emulation.
  6. Let Docker rest when idle. Recent versions have a Resource Saver mode that pauses the VM when no containers are running. Or quit Docker Desktop when you're done.

Docker uses memory even with no containers

The VM keeps some memory while Docker Desktop is running, even if nothing is running inside it. That's expected. Lowering the memory limit, using Resource Saver, or quitting Docker Desktop gives it back.

Questions people ask

Why does Docker use so much memory on Mac?

Docker Desktop runs a Linux VM, and memory given to it is held while it runs. Lower the limit in Settings › Resources, or quit Docker Desktop when you're not using it.

How do I see which container is using CPU?

Run docker stats in Terminal. It lists CPU and memory for each running container, live.

Why is Docker slow with mounted folders on Mac?

Files on your Mac have to be shared into the VM. VirtioFS (in Settings › General on recent versions) is much faster, and keeping large folders like node_modules inside the container helps too.

Can I run Docker without Docker Desktop on a Mac?

Other tools also run containers in a VM on macOS, but they share the same basic overhead. The settings above make the biggest difference either way.