From 09e1fc154019a6d97c5f4dda6230ec83f26118f9 Mon Sep 17 00:00:00 2001 From: Darren Stahl Date: Tue, 1 Nov 2016 13:02:46 -0700 Subject: [PATCH] Windows: Add cpu count option Signed-off-by: Darren Stahl --- docs/reference/commandline/create.md | 3 +++ docs/reference/commandline/run.md | 9 ++++++++- man/docker-create.1.md | 14 ++++++++++++++ man/docker-run.1.md | 14 ++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 23c8797686..034b9dd9d6 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -31,6 +31,9 @@ Options: --cap-drop value Drop Linux capabilities (default []) --cgroup-parent string Optional parent cgroup for the container --cidfile string Write the container ID to the file + --cpu-count int The number of CPUs available for execution by the container. + Windows daemon only. On Windows Server containers, this is + approximated as a percentage of total CPU usage. --cpu-percent int CPU percent (Windows only) --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 6ce6d29773..fc4a9e5a3a 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -29,7 +29,14 @@ Options: --cap-drop value Drop Linux capabilities (default []) --cgroup-parent string Optional parent cgroup for the container --cidfile string Write the container ID to the file - --cpu-percent int CPU percent (Windows only) + --cpu-count int The number of CPUs available for execution by the container. + Windows daemon only. On Windows Server containers, this is + approximated as a percentage of total CPU usage. + --cpu-percent int Limit percentage of CPU available for execution + by the container. Windows daemon only. + The processor resource controls are mutually + exclusive, the order of precedence is CPUCount + first, then CPUShares, and CPUPercent last. --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota -c, --cpu-shares int CPU shares (relative weight) diff --git a/man/docker-create.1.md b/man/docker-create.1.md index ff378397ed..767a7fc307 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -15,6 +15,8 @@ docker-create - Create a new container [**--cap-drop**[=*[]*]] [**--cgroup-parent**[=*CGROUP-PATH*]] [**--cidfile**[=*CIDFILE*]] +[**--cpu-count**[=*0*]] +[**--cpu-percent**[=*0*]] [**--cpu-period**[=*0*]] [**--cpu-quota**[=*0*]] [**--cpu-rt-period**[=*0*]] @@ -124,6 +126,18 @@ The initial status of the container created with **docker create** is 'created'. **--cidfile**="" Write the container ID to the file +**--cpu-count**=*0* + Limit the number of CPUs available for execution by the container. + + On Windows Server containers, this is approximated as a percentage of total CPU usage. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + +**--cpu-percent**=*0* + Limit the percentage of CPU available for execution by a container running on a Windows daemon. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + **--cpu-period**=*0* Limit the CPU CFS (Completely Fair Scheduler) period diff --git a/man/docker-run.1.md b/man/docker-run.1.md index 5af64627be..ebede9a64f 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -15,6 +15,8 @@ docker-run - Run a command in a new container [**--cap-drop**[=*[]*]] [**--cgroup-parent**[=*CGROUP-PATH*]] [**--cidfile**[=*CIDFILE*]] +[**--cpu-count**[=*0*]] +[**--cpu-percent**[=*0*]] [**--cpu-period**[=*0*]] [**--cpu-quota**[=*0*]] [**--cpu-rt-period**[=*0*]] @@ -174,6 +176,18 @@ division of CPU shares: **--cidfile**="" Write the container ID to the file +**--cpu-count**=*0* + Limit the number of CPUs available for execution by the container. + + On Windows Server containers, this is approximated as a percentage of total CPU usage. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + +**--cpu-percent**=*0* + Limit the percentage of CPU available for execution by a container running on a Windows daemon. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + **--cpu-period**=*0* Limit the CPU CFS (Completely Fair Scheduler) period