mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Correction of CPU Shares flag
Flag is -c instead of --c
This commit is contained in:
parent
4a332d911b
commit
a259e68ac7
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ You can limit CPU, either using a percentage of all CPUs, or by using specific c
|
|||
For example, you can tell the [`cpu-shares`](https://docs.docker.com/engine/reference/run/#/cpu-share-constraint) setting. The setting is a bit strange -- 1024 means 100% of the CPU, so if you want the container to take 50% of all CPU cores, you should specify 512. See https://goldmann.pl/blog/2014/09/11/resource-management-in-docker/#_cpu for more:
|
||||
|
||||
```
|
||||
docker run -ti --c 512 agileek/cpuset-test
|
||||
docker run -ti -c 512 agileek/cpuset-test
|
||||
```
|
||||
|
||||
You can also only use some CPU cores using [`cpuset-cpus`](https://docs.docker.com/engine/reference/run/#/cpuset-constraint). See https://agileek.github.io/docker/2014/08/06/docker-cpuset/ for details and some nice videos:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue