1

I'm trying to understand the relationship between docker containers and their host machines. My setup is as follows:

  • Hypervisor: Proxmox (4x 10 core Xeon, 80 threads total)
  • Docker Host: LXC on Proxmox, 40 cores allocated
  • Docker Host OS: Ubuntu 22.10

What I'm seeing:

I have ~16 containers running within docker. Most are utilizing a fraction of a percentage of a cpu as reported by docker stats. One in particular is hovering around 100% utilization, sometimes spiking well above 100%.

When I look at the cpu utilization on the host lxc container, it's around 96% idle. I'm confused as to why the docker container is running so 'hot' and not using more of the available hardware. I've found a lot of documentation around setting limits, but not the opposite - which should be the default behavior.

Seeing as though the CPU is allowed to burst past 100%, I'm not seeing any performance type issues - but seeing that 100% having on my monitoring charts is bothering me:)

Any ideas of an action I can do to remediate this, or do I just leave it as-is?

Tony
  • 391
  • 1
  • 4
  • 11
  • Did you ever figure this out? I have the same issue. I have a container that should cap the hosts processors. But it barely touches them, while docket stats shows the container at 99-100% CPU usage. – Douglas Gaskell Jun 19 '23 at 22:35

1 Answers1

-1

You can limit the CPU use of the docker container, Use the following flag with the docker command

--cpus="1.0"

Example docker run --cpus="1.0" --name my_container <docker image name>

Amjed saleel
  • 348
  • 1
  • 3
  • 15
  • This is the opposite of what I'm asking. I know you can limit the amount of CPU that a container can use, I'm more asking why I have a container at 100% if I'm NOT limiting it, and I have a ton of unused CPU capacity available. – Tony Jan 25 '23 at 13:53