containers / containers/nri-plugins

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

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
114
Forks
44
Avg merge
1d 8h
Merged PRs (30d)
20

Description

### 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
```

2. 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.

Contributor guide

Open the contributing guide

Research direction

Start by deploying the supplied balloons policy configuration and querying the metrics endpoint at :8891 to reproduce the non-contiguous CPU assignment. Trace the allocation behavior responsible for the balloon CPU sets, then verify that the affected balloons receive contiguous numbering without holes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.