CMK checkpoints state in a Kubernetes ConfigMap. The checkpoint describes all configured "pools" and their options, the "CPU lists" for those pools, and the "tasks" currently assigned to each CPU list. The directory format is described below.
Example:
data:
config: |
exclusive:
0:
4,12: []
5,13: []
6,14: []
7,15: []
1: {}
infra:
0:
0-2,8-10:
- '48624'
1: {}
shared:
0:
3,11: []
1: {}
Example with extra exclusive-non-isolcpus pool configured:
data:
config: |
exclusive:
0:
4,12: []
5,13: []
1: {}
infra:
0:
0-2,8-10:
- '48624'
1: {}
shared:
0:
3,11: []
1: {}
exclusive-non-isolcpus:
0:
6,14: []
7,15: []
Where:
Path | Meaning |
---|---|
data -> config -> <pool> |
The name of the pool acting as a key, one per pool. |
data -> config -> <pool> -> <cpulist> |
The name of the CPU list in the pool conforming to the Linux cpuset CPU list format. |
data -> config -> <pool> -> <cpulist> -> <tasks> |
A comma-separated list of the root Linux process IDs of containers to which the CPUset has been allocated. |
CMK can set up its own initial state. See cmk init
doc for more
information.
cmk
updates the configuration as follows:
- The operator creates the initial configuration on each host, either manually
or by using the
cmk init
helper program. - When tasks are launched via
cmk isolate
, an available CPU list for the requested pool is chosen. That CPU list'stasks
list is updated to include thecmk isolate
process ID. - After a task launched via
cmk isolate
dies, the associated CPU list'stasks
list is updated to remove thecmk isolate
process ID. cmk reconcile
asks the operating system about all process IDs in all pools. Process IDs that are no longer valid are removed from thetasks
list.cmk reconcile
should be configured to execute periodically on each host).