|
1 | | -# Windows-specific Container Configuration |
| 1 | +[[config-windows]] |
| 2 | +Windows-specific Container Configuration |
| 3 | +---------------------------------------- |
2 | 4 |
|
3 | | -This document describes the schema for the [Windows-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md). |
4 | 5 | The Windows container specification uses APIs provided by the Windows Host Compute Service (HCS) to fulfill the spec. |
5 | 6 |
|
6 | | -## Resources |
| 7 | +Resources |
| 8 | +~~~~~~~~~ |
7 | 9 |
|
8 | 10 | You can configure a container's resource limits via the OPTIONAL `resources` field of the Windows configuration. |
9 | 11 |
|
10 | | -### Memory |
| 12 | +Memory |
| 13 | +^^^^^^ |
11 | 14 |
|
12 | 15 | `memory` is an OPTIONAL configuration for the container's memory usage. |
13 | 16 |
|
14 | 17 | The following parameters can be specified: |
15 | 18 |
|
16 | | -* **`limit`** *(uint64, OPTIONAL)* - sets limit of memory usage in bytes. |
17 | | -
|
18 | | -* **`reservation`** *(uint64, OPTIONAL)* - sets the guaranteed minimum amount of memory for a container in bytes. |
19 | | -
|
20 | | -#### Example |
21 | | - |
22 | | -```json |
23 | | - "windows": { |
24 | | - "resources": { |
25 | | - "memory": { |
26 | | - "limit": 2097152, |
27 | | - "reservation": 524288 |
28 | | - } |
29 | | - } |
| 19 | +`limit`:: |
| 20 | + (uint64, OPTIONAL) - sets limit of memory usage in bytes. |
| 21 | + |
| 22 | +`reservation`:: |
| 23 | + (uint64, OPTIONAL) - sets the guaranteed minimum amount of memory for a container in bytes. |
| 24 | + |
| 25 | +[[windows-resources-memory-example]] |
| 26 | +.Example |
| 27 | +[source,json] |
| 28 | +{ |
| 29 | + "windows": { |
| 30 | + "resources": { |
| 31 | + "memory": { |
| 32 | + "limit": 2097152, |
| 33 | + "reservation": 524288 |
| 34 | + } |
30 | 35 | } |
31 | | -``` |
| 36 | + }, |
| 37 | + … |
| 38 | +} |
32 | 39 |
|
33 | | -### CPU |
| 40 | +CPU |
| 41 | +^^^ |
34 | 42 |
|
35 | 43 | `cpu` is an OPTIONAL configuration for the container's CPU usage. |
36 | 44 |
|
37 | 45 | The following parameters can be specified: |
38 | 46 |
|
39 | | -* **`count`** *(uint64, OPTIONAL)* - specifies the number of CPUs available to the container. |
40 | | -
|
41 | | -* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares. The range is from 1 to 10000. |
| 47 | +`count`:: |
| 48 | + (uint64, OPTIONAL) - specifies the number of CPUs available to the container. |
42 | 49 |
|
43 | | -* **`percent`** *(uint, OPTIONAL)* - specifies the percentage of available CPUs usable by the container. |
| 50 | +`shares`:: |
| 51 | + (uint16, OPTIONAL) - specifies the relative weight to other containers with CPU shares. The range is from 1 to 10000. |
44 | 52 |
|
45 | | -#### Example |
| 53 | +`percent`:: |
| 54 | + (uint, OPTIONAL) - specifies the percentage of available CPUs usable by the container. |
46 | 55 |
|
47 | | -```json |
48 | | - "windows": { |
49 | | - "resources": { |
50 | | - "cpu": { |
51 | | - "percent": 50 |
52 | | - } |
53 | | - } |
| 56 | +[[windows-resources-cpu-example]] |
| 57 | +.Example |
| 58 | +[source,json] |
| 59 | +{ |
| 60 | + "windows": { |
| 61 | + "resources": { |
| 62 | + "cpu": { |
| 63 | + "percent": 50 |
| 64 | + } |
54 | 65 | } |
55 | | -``` |
| 66 | + }, |
| 67 | + … |
| 68 | +} |
56 | 69 |
|
57 | | -### Storage |
| 70 | +Storage |
| 71 | +^^^^^^^ |
58 | 72 |
|
59 | 73 | `storage` is an OPTIONAL configuration for the container's storage usage. |
60 | 74 |
|
61 | 75 | The following parameters can be specified: |
62 | 76 |
|
63 | | -* **`iops`** *(uint64, OPTIONAL)* - specifies the maximum IO operations per second for the system drive of the container. |
| 77 | +`iops`:: |
| 78 | + (uint64, OPTIONAL) - specifies the maximum IO operations per second for the system drive of the container. |
64 | 79 |
|
65 | | -* **`bps`** *(uint64, OPTIONAL)* - specifies the maximum bytes per second for the system drive of the container. |
| 80 | +`bps`:: |
| 81 | + (uint64, OPTIONAL) - specifies the maximum bytes per second for the system drive of the container. |
66 | 82 |
|
67 | | -* **`sandboxSize`** *(uint64, OPTIONAL)* - specifies the minimum size of the system drive in bytes. |
| 83 | +`sandboxSize`:: |
| 84 | + (uint64, OPTIONAL) - specifies the minimum size of the system drive in bytes. |
68 | 85 |
|
69 | | -#### Example |
70 | | - |
71 | | -```json |
72 | | - "windows": { |
73 | | - "resources": { |
74 | | - "storage": { |
75 | | - "iops": 50 |
76 | | - } |
77 | | - } |
| 86 | +[[windows-resources-storage-example]] |
| 87 | +.Example |
| 88 | +[source,json] |
| 89 | +{ |
| 90 | + "windows": { |
| 91 | + "resources": { |
| 92 | + "storage": { |
| 93 | + "iops": 50 |
| 94 | + } |
78 | 95 | } |
79 | | -``` |
| 96 | + }, |
| 97 | + … |
| 98 | +} |
80 | 99 |
|
81 | | -### Network |
| 100 | +Network |
| 101 | +^^^^^^^ |
82 | 102 |
|
83 | 103 | `network` is an OPTIONAL configuration for the container's network usage. |
84 | 104 |
|
85 | 105 | The following parameters can be specified: |
86 | 106 |
|
87 | | -* **`egressBandwidth`** *(uint64, OPTIONAL)* - specified the maximum egress bandwidth in bytes per second for the container. |
88 | | -
|
89 | | -#### Example |
90 | | - |
91 | | -```json |
92 | | - "windows": { |
93 | | - "resources": { |
94 | | - "network": { |
95 | | - "egressBandwidth": 1048577 |
96 | | - } |
97 | | - } |
98 | | - } |
99 | | -``` |
| 107 | +`egressBandwidth`:: |
| 108 | + (uint64, OPTIONAL) - specified the maximum egress bandwidth in bytes per second for the container. |
| 109 | + |
| 110 | +[[windows-resources-network-example]] |
| 111 | +.Example |
| 112 | +[source,json] |
| 113 | +{ |
| 114 | + "windows": { |
| 115 | + "resources": { |
| 116 | + "network": { |
| 117 | + "egressBandwidth": 1048577 |
| 118 | + } |
| 119 | + } |
| 120 | + }, |
| 121 | + … |
| 122 | +} |
0 commit comments