DEV Community

Dang Hoang Nhu Nguyen
Dang Hoang Nhu Nguyen

Posted on

[BTY] Day 3: Docker Container CPU Limits

Today I found an interesting fact (for myself only, you've probably already known) about Docker Container CPU Limits from this
article: https://www.thorsten-hans.com/docker-container-cpu-limits-explained/.

By default, Docker does not apply any CPU limitations. Containers can all of the hosts given CPU power (mentioned in the official doc).

However, a Docker container will not consume the entire CPU power of your physical host. If you are using Docker Desktop, the mentioned host, it is a virtualized host, responsible for running your Docker containers. On macOS, the host is a virtualized system leveraging Apple’s Hypervisor framework. We can use the Docker Desktop application to control the overall limit of CPU utilization in all Docker containers.

For example, by default, Docker Desktop is set to use half the number of processors available on the host machine (as mentioned here).

I will definitely check it out.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay