CMK checkpoints state in a directory structure on disk. 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:
etc
└── cmk
├── lock
└── pools
├── controlplane
│ ├── 3,11
│ │ └── tasks
│ └── exclusive
├── dataplane
│ ├── 4,12
│ │ └── tasks
│ ├── 5,13
│ │ └── tasks
│ ├── 6,14
│ │ └── tasks
│ ├── 7,15
│ │ └── tasks
│ └── exclusive
└── infra
├── 0-2,8-10
│ └── tasks
└── exclusive
Where:
Path | Meaning |
---|---|
/etc/cmk/lock |
A lock file to protect against conflicting concurrent modification. |
/etc/cmk/pools/<pool> |
Directories, one per pool. |
/etc/cmk/pools/<pool>/exclusive |
Determines whether each CPU list in the pool can be shared (value 0) or not (value 1). Shared CPU lists can accomodate multiple tasks simultaneously, while exclusive CPU lists may only be allocated to one task at a time. |
/etc/cmk/pools/<pool>/<cpulist> |
Directories whose names conform to the Linux cpuset CPU list format. |
/etc/cmk/pools/<pool>/<cpulist>/tasks |
A file containing 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
file is updated to include thecmk isolate
process ID. - After a task launched via
cmk isolate
dies, the associated CPU list'stasks
file 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
file.cmk reconcile
should be configured to execute periodically on each host).