Browse code

Windows: TP4 fix cpu weight

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2015/11/13 03:58:20
Showing 2 changed files
... ...
@@ -18,7 +18,7 @@ const (
18 18
 	defaultVirtualSwitch = "Virtual Switch"
19 19
 	platformSupported    = true
20 20
 	windowsMinCPUShares  = 1
21
-	windowsMaxCPUShares  = 9
21
+	windowsMaxCPUShares  = 10000
22 22
 )
23 23
 
24 24
 func parseSecurityOpt(container *Container, config *runconfig.HostConfig) error {
... ...
@@ -74,7 +74,7 @@ type containerInit struct {
74 74
 	IgnoreFlushesDuringBoot bool        // Optimisation hint for container startup in Windows
75 75
 	LayerFolderPath         string      // Where the layer folders are located
76 76
 	Layers                  []layer     // List of storage layers
77
-	ProcessorWeight         int64       // CPU Shares 1..9 on Windows; or 0 is platform default.
77
+	ProcessorWeight         int64       `json:",omitempty"` // CPU Shares 0..10000 on Windows; where 0 will be ommited and HCS will default.
78 78
 	HostName                string      // Hostname
79 79
 	MappedDirectories       []mappedDir // List of mapped directories (volumes/mounts)
80 80
 	SandboxPath             string      // Location of unmounted sandbox (used for Hyper-V containers, not Windows Server containers)