Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-14755

BestEffort pod has reserved cpuset affinity in 4.13 PerformanceProfile enabled

XMLWordPrintable

    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      
      In 4.13, BestEffort pod cpu affinity is set to reserved cpuset only. In 4.12 and earlier, it uses reserved cpuset + free isolated cpuset.
      
      The following example uses AWS SNO m6i.4xlarge 16vCPU 64GB mem.
      
      $ oc label node --all sno-pp=enabled
      $ oc label mcp --all sno-pp=enabled
      $ oc create -f - <<EOF
      apiVersion: performance.openshift.io/v2
      kind: PerformanceProfile
      metadata:
        name: sno-pp
      spec:
        cpu:
          reserved: 0-3
          isolated: 4-15
        machineConfigPoolSelector:
          sno-pp: enabled
        nodeSelector:
          node-role.kubernetes.io/master: ""
      EOF
      $ oc create -f - <<EOF
      apiVersion: machineconfiguration.openshift.io/v1
      kind: KubeletConfig
      metadata:
        name: sno-pp
      spec:
        machineConfigPoolSelector:
          matchLabels:
            sno-pp: enabled
        kubeletConfig:
          cpuManagerPolicy: static 
          cpuManagerReconcilePeriod: 5s
          reservedSystemCPUs: 0-3
      EOF
      
      $ oc new-project test
      $ oc create deployment sleep-a --image=registry.access.redhat.com/ubi8/ubi -- /bin/bash -c "trap : TERM INT; sleep infinity & wait"
      $ oc set resources deployment sleep-a --requests=cpu=1,memory=32Mi --limits=cpu=1,memory=32Mi
      $ oc create deployment sleep-b --image=registry.access.redhat.com/ubi8/ubi -- /bin/bash -c "trap : TERM INT; sleep infinity & wait"
      
      $ oc rsh deploy/sleep-a cat /proc/1/status | grep Cpus_allowed_list
      4
      $ oc rsh deploy/sleep-a cat /sys/fs/cgroup/cpuset/cpuset.cpus
      4
      
      $ oc rsh deploy/sleep-b cat /proc/1/status | grep Cpus_allowed_list
      0-3
      $ oc rsh deploy/sleep-b cat /sys/fs/cgroup/cpuset/cpuset.cpus
      0-3,5-15
      
      $ oc rsh deploy/sleep-b yes >/dev/null &
      
      $ oc debug $NODE
      # ps -C "yes" -L -o pid,lwp,pcpu,cpuid,time # cpuid shows 0, 1, 2, 3. No 5-15 used.
      
      

      Version-Release number of selected component (if applicable):

      4.13.2
      

      How reproducible:

      Always
      

      Steps to Reproduce:

      1. Configure cluster with PerformaceProfile reverved/isolated cpuset, enable cpumanager
      2. Deploy BestEffort pod
      3. Look at process Cpus_allowed_list
      

      Actual results:

      Process cpu affinity is set to reserved cpuset
      

      Expected results:

      Process cpu affinity is set to reserved cpuset + free isolated cpuset, just same as cgroups cpuset.cpus
      

      Additional info:

      
      

              msivak@redhat.com Martin Sivak
              rhn-support-tkimura Takayoshi Kimura
              Mallapadi Niranjan Mallapadi Niranjan
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: