From e53bdeb5d0c4890e07f9665b623ec8895d121b98 Mon Sep 17 00:00:00 2001 From: "Eric Mountain @ Amadeus" Date: Wed, 21 Jun 2017 01:01:16 +0200 Subject: [PATCH] Be more specific about cpu-shares passed to Docker (#4016) Docker documentation (https://docs.docker.com/engine/reference/run/) reads: "To modify the proportion from the default of 1024, use the -c or --cpu-shares flag to set the weighting to 2 or higher. If 0 is set, the system will ignore the value and use the default of 1024." So the Kubernetes documentation gives the impression that if requests.cpu is zero, Docker would end up applying a value of 1024, which isn't the case. This change makes the explanation more precise, hopefully without making it much more difficult to read. --- .../configuration/manage-compute-resources-container.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/configuration/manage-compute-resources-container.md b/docs/concepts/configuration/manage-compute-resources-container.md index fce02cd743..c5615b634c 100644 --- a/docs/concepts/configuration/manage-compute-resources-container.md +++ b/docs/concepts/configuration/manage-compute-resources-container.md @@ -133,8 +133,8 @@ to the container runtime. When using Docker: - The `spec.containers[].resources.requests.cpu` is converted to its core value, - which is potentially fractional, and multiplied by 1024. This number is used - as the value of the + which is potentially fractional, and multiplied by 1024. The greater of this number + or 2 is used as the value of the [`--cpu-shares`](https://docs.docker.com/engine/reference/run/#/cpu-share-constraint) flag in the `docker run` command.