Skip to content

Latest commit

 

History

History
107 lines (89 loc) · 3.2 KB

config.md

File metadata and controls

107 lines (89 loc) · 3.2 KB

The cmk configuration directory

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.

CMK configmap configuration format

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.

Creating a new configuration

CMK can set up its own initial state. See cmk init doc for more information.

Configuration changes over time

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's tasks list is updated to include the cmk isolate process ID.
  • After a task launched via cmk isolate dies, the associated CPU list's tasks list is updated to remove the cmk 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 the tasks list. cmk reconcile should be configured to execute periodically on each host).