From 7753a6cd5aba60578d1eba1f5b24c8aea2f2c903 Mon Sep 17 00:00:00 2001 From: arthur_x1 Date: Tue, 25 Sep 2018 10:55:18 +1000 Subject: [PATCH] Clarifying confusing explanations for limiting cpus resource in docker-compose file to prevent misunderstanding as "percent of total CPU available". --- compose/compose-file/index.md | 4 ++-- get-started/part3.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index f21990b09c..56c51ffbe6 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -687,8 +687,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' diff --git a/get-started/part3.md b/get-started/part3.md index 9a1436f571..4205a2c788 100644 --- a/get-started/part3.md +++ b/get-started/part3.md @@ -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.