Merge pull request #7416 from artdgn/master

Clarifying some confusing explanations for limiting cpus resource.
This commit is contained in:
L-Hudson 2019-02-26 07:53:36 -05:00 committed by GitHub
commit 30807046cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -726,8 +726,8 @@ Each of these is a single value, analogous to its [docker service
create](/engine/reference/commandline/service_create.md) counterpart.
In this general example, the `redis` service is constrained to use no more than
50M of memory and `0.50` (50%) of available processing time (CPU), and has
`20M` of memory and `0.25` CPU time reserved (as always available to it).
50M of memory and `0.50` (50% of a single core) of available processing time (CPU),
and has `20M` of memory and `0.25` CPU time reserved (as always available to it).
```none
version: '3'

View File

@ -96,8 +96,9 @@ This `docker-compose.yml` file tells Docker to do the following:
- Pull [the image we uploaded in step 2](part2.md) from the registry.
- Run 5 instances of that image as a service
called `web`, limiting each one to use, at most, 10% of the CPU (across all
cores), and 50MB of RAM.
called `web`, limiting each one to use, at most, 10% of a single core of
CPU time (this could also be e.g. "1.5" to mean 1 and half core for each),
and 50MB of RAM.
- Immediately restart containers if one fails.