I can't use the total of CPU efficently

Hi everyone,

I’m noob in the docker’s world so I apologize if the question is trivial.

I’m working with Docker version 2.1 with HYPER-V, because it’s the enable in the computer. This computer is lend for a few tests, so I can’t change so much of his system. I use Docker mostly like a virtual machine, I know than it isnt’ all the use than someone can give it.

I took the official image of Ubuntu, downloaded an scientific program of metheorology, compiled the librery and installed the software. This container I saved as an Images than later copy in more Containers.

This software usually use a lot of CPU, even It’s possible use parallel process (MPI). The Processor of the computer is an AMD with 32 cores, I put all of them in the properties of Docker, with 24 GB of RAM and 3072 mb of Swamp.

**The main problem is when I tried to use a lot of the Processor, like 12 containers whith 2 logical processors each one. The speed of the software of every container it’s reduced when I put a new container, even when Windows show than is ocuppied only the 50 % of the Total CPU. **

So, in conclusion, I want to use every container with his maximum capacity and the software reach the higher speed, when there are free CPU in the system.

Thanks for your help in advance.


Are you sure that it is Docker 2.1? Based on what you shared, I guess you are using Docker Desktop for Windows with the Hyper-V backend instead of WSL. But the current Docker Desktop version is 4.17 and the current Docker CE version is 23.0.1.

Since you are aware of Hyper-V, I guess you know that Docker runs in a virtual machine of Docker Desktop, which means the memory and cpu limits are not the same as on the host.

Thanks rimelek. You are right, I’m using an old version of Docker Desktop for Windows, before the change of the WSL, so I’m using the Hyper-V. I supposed than I have to upgrade this version, but I’m not the owner of the computer, so I’m not free to change this, For the other hand, I supposed than the WSL isn’t a solution for me.

And yes, I know than Hyper-V didn’t mean the total use of cpu and memory from the host, but I configured the Docker Desktop with the maximum quantity of cpu and memory (58 logical cores and 24 Gb of RAM)

Do you mean the maximum that was available from the Docker Desktop UI or the maximum that your Windows host has? Since I don’t remember if I ever used an old version like you do, I don’t know what it allows you to do and what it doesn’t. On the other hand, the existence of CPUs are not guarantee that every container will be executed on different CPUs, although it would be logical. I don’t know everything about CPUs and scheduling, but if you want to make sure that each container has different CPU, you should specifiy it. I have some CPU liimt examples here: https://learn-docker.it-sziget.hu/en/latest/pages/projects/p09.html

In case the first link changes in the future: GitHub commit

And here is the documentation of the cpu-related parameters:

But I strongly recommend updating Docker Desktop first and use the latest available Docker version to make sure all the documented parameters works