Browse code

man page description for -c/--cpu-shares flag for docker run command

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Shishir Mahajan authored on 2015/02/19 04:01:55
Showing 1 changed files
... ...
@@ -88,6 +88,19 @@ the same proportion of CPU cycles, but you can tell the kernel to give more
88 88
 shares of CPU time to one or more containers when you start them via **docker
89 89
 run**.
90 90
 
91
+The flag `-c` or `--cpu-shares` with value 0 indicates that the running
92
+container has access to all 1024 (default) CPU shares. However, this value
93
+can be modified to run a container with a different priority or different
94
+proportion of CPU cycles.
95
+
96
+E.g., If we start three {C0, C1, C2} containers with default values
97
+(`-c` OR `--cpu-shares` = 0) and one {C3} with (`-c` or `--cpu-shares`=512)
98
+then C0, C1, and C2 would have access to 100% CPU shares (1024) and C3 would
99
+only have access to 50% CPU shares (512). In the context of a time-sliced OS
100
+with time quantum set as 100 milliseconds, containers C0, C1, and C2 will run
101
+for full-time quantum, and container C3 will run for half-time quantum i.e 50
102
+milliseconds.
103
+
91 104
 **--cap-add**=[]
92 105
    Add Linux capabilities
93 106