5.9. 클러스터의 노드에 특정 CPU 할당

정적 CPU 관리자 정책을 사용하는 경우 클러스터의 특정 노드에서 사용할 특정 CPU를 예약할 수 있습니다. 예를 들어 CPU가 24개인 시스템에서 컨트롤 플레인에 0~3번 CPU를 예약하여 컴퓨팅 노드에서 4~23번 CPU를 사용하도록 할 수 있습니다.

5.9.1. 노드의 CPU 예약

특정 노드에 예약된 CPU 목록을 명시적으로 정의하려면 KubeletConfig CR(사용자 정의 리소스)을 생성하여 reservedSystemCPUs 매개변수를 정의합니다. 이 목록은 systemReservedkubeReserved 매개변수를 사용하여 예약할 수 있는 CPU를 대체합니다.

프로세스

  1. 구성하려는 노드 유형의 MCP(머신 구성 풀)와 연결된 라벨을 가져옵니다.

    $ oc describe machineconfigpool <name>

    예를 들면 다음과 같습니다.

    $ oc describe machineconfigpool worker

    출력 예

    Name:         worker
    Namespace:
    Labels:       machineconfiguration.openshift.io/mco-built-in=
                  pools.operator.machineconfiguration.openshift.io/worker= 1
    Annotations:  <none>
    API Version:  machineconfiguration.openshift.io/v1
    Kind:         MachineConfigPool
    ...

    1
    MCP 라벨을 가져옵니다.
  2. KubeletConfig CR의 YAML 파일을 생성합니다.

    apiVersion: machineconfiguration.openshift.io/v1
    kind: KubeletConfig
    metadata:
      name: set-reserved-cpus 1
    spec:
      kubeletConfig:
        reservedSystemCPUs: "0,1,2,3" 2
      machineConfigPoolSelector:
        matchLabels:
          pools.operator.machineconfiguration.openshift.io/worker: "" 3
    1
    CR 이름을 지정합니다.
    2
    MCP와 연결된 노드에 예약할 CPU의 코어 ID를 지정합니다.
    3
    MCP에서 라벨을 지정합니다.
  3. CR 오브젝트를 생성합니다.

    $ oc create -f <file_name>.yaml

추가 리소스