Skip to content

Can the balloons policy allocate logical CPUs in an order without holes in the numbering? #210

@askervin

Description

@askervin

Description

  1. Deploy balloons policy with config that allocates "cpu0" from both packages of a two-socket system to the reserved balloon, and creates four balloons (13-14 CPUs each) on every NUMA node. NUMA nodes have 56 CPUs (28 hyperthreaded CPU cores).
config:
  reservedResources:
    cpu: "cpuset:0,112,56,168"
  idleCPUClass: normal
  allocatorTopologyBalancing: true
  balloonTypes:
  - name: test
    namespaces:
      - default
    minCPUs: 13
    maxCPUs: 14
    minBalloons: 16
    maxBalloons: 16
    preferSpreadOnPhysicalCores: true
    preferNewBalloons: true
  reservedPoolNamespaces:
    - kube-system
  log:
    source: true
    klog:
      skip_headers: true
  instrumentation:
    reportPeriod: 60s
    samplingRatePerMillion: 0
    httpEndpoint: :8891
    prometheusExport: true
  1. The first balloon (test[0]) gets contiguously numbered CPUs, but the second (test[1]) does not:
curl http://localhost:8891/metrics
balloons{balloon="test[0]",...,,cpus="140-152",...
balloons{balloon="test[1]",...,cpus="84,100-111",...
lscpu
...
  NUMA node0 CPU(s):     0-27,112-139
  NUMA node1 CPU(s):     28-55,140-167
  NUMA node2 CPU(s):     56-83,168-195
  NUMA node3 CPU(s):     84-111,196-223

Why this happens? Is it possible to change the CPU assignment so that test[1] would be contiguous, too?

Rationale

Contiguous numberings are easier for validation of CPUs in balloons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions