Reputation: 545
I'm using docker to create my local dev environment for developing Magento modules. Magento is very slow during most of the operations, and what I've noticed is that the CPU usage is not going higher then 20% for each core (my machine has 8 cores).
Are there any settings I can change to give docker containers more resources in terms of CPU usage?
Upvotes: 3
Views: 10221
Reputation: 1899
You can pass custom parameters about resources when use docker run
.
Like:
--cpu-shares CPU shares (relative weight)
--cpu-period Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota Limit CPU CFS (Completely Fair Scheduler) quota
--cpuset-cpus CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems MEMs in which to allow execution (0-3, 0,1)
I'm using the version 1.11.1
of Docker, I do not remember, but maybe some of these parameters can only be used in newer versions.
See docker run reference -> https://docs.docker.com/engine/reference/run/
Upvotes: 3
Reputation: 1240
Do you have any other containers running? The documentation states:
By default, all containers get the same proportion of CPU cycles. This proportion can be modified by changing the container’s CPU share weighting relative to the weighting of all other running containers.
You are able to modify resource allocation for your containers in your compose file (link)
Upvotes: 2