volcano.sh/volcano@v1.9.0/docs/design/cpu-careful-regulation.md (about)

     1  # Volcano cpu careful regulation
     2  
     3  @ProgramerGu; September 15, 2020
     4  
     5  # Motivation
     6  On the basis of kubernetes scheduling, the CPU fine core binding scheduling function of multi specification pod without manual intervention is realized to meet the needs of users for high-performance instances and CPU core binding, and 500 virtual machines on-line for 1 minute are guaranteed/ On this basis, the cluster resources should be balanced as much as possible to improve the utilization rate of CPU & MEM resources. Output CPU fine binding core scheduling function to the community.
     7  # Function Detail
     8  ## data structure
     9  node
    10  ```
    11  apiVersion: v1
    12  kind: Node
    13  metadata:
    14    name:
    15    annotations:
    16      "cpu-map":'{"socket1": ["1", "2"],"socket2": ["11", "12"]}'
    17    labels:
    18  status:
    19    allocatable:
    20      cpu: "40"
    21      memory: 171301360Ki
    22    capacity:
    23      cpu: "48"
    24      memory: 196569584Ki
    25      ...
    26  ```
    27  pod
    28  ```
    29  apiVersion: v1
    30  kind: Pod
    31  metadata:
    32    annotations:
    33      cpu-set: one-socket
    34  	"cpu-map":'{"socket1": ["1"],"socket2": ["11"]}'
    35  	//"cpu-map":'{"socket1": ["1","2"]}'
    36    labels:
    37    name:
    38    namespace:
    39  spec:
    40      resources:
    41        limits:
    42        requests:
    43          cpu: "2"
    44  ```
    45  ##  scheduler-extender
    46  - Declare to implement the scheduleextender interface
    47  	- build node cache:build cpu map
    48  	- managedResources: is pod annotation Declare cpu-set?
    49  - implement the filter interface Filter
    50  	- circular serial call: pass the filter results to the next extender,
    51  	- remote filtering interface: return results
    52  - priority interface(It can be left out of consideration at the initial stage)
    53  	- parallel priority statistics
    54  	- merge priority result
    55  	- priority interface call: return results
    56  - binding phase:
    57  	- update pod to write the selected CPU device result to the pod's annotation ("CPU map": '{"Socket1": ["1", "2"]) 
    58  	- call the bind function and write suggesthost
    59  ##  cpuset
    60  - Plugin-pod binds the core according to the CPU device map specified in pod annotation
    61  - Kubevirt binds the core according to the CPU device map specified in pod annotation