Skip to content

Commit ee614f0

Browse files
klihubaskervin
andcommitted
e2e: test for leaving CPUs in busy shared pools.
Add a test case from Antti Kervinen <antti.kervinen@intel.com> for testing that busy shared CPU pools are not sliced empty. Co-authored-by: Antti Kervinen <antti.kervinen@intel.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
1 parent 95fe19a commit ee614f0

File tree

1 file changed

+34
-0
lines changed
  • test/e2e/policies.test-suite/topology-aware/n4c16/test15-busy-shared-pools

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
vm-command "kubectl delete pods --all --now"
2+
helm-terminate
3+
4+
helm_config=$(COLOCATE_PODS=false instantiate helm-config.yaml) helm-launch topology-aware
5+
6+
# Create 4 BestEffort containers, which should be spread across NUMA nodes,
7+
# putting one container in each. Then create a Guaranteed container with a
8+
# CPU request equal to the number of CPUs in a NUMA node. This container
9+
# cannot be put into any NUMA node, since then it would exhaus the shared
10+
# pool, which we can't do in any NUMA node as they are all busy with a
11+
# BestEffort container. So the Guaranteed container should be placed in a
12+
# socket, slicing off CPUs from both of its NUMA nodes.
13+
14+
CONTCOUNT=4 create besteffort
15+
CPU=4 MEM=100M CONTCOUNT=1 create guaranteed
16+
verify 'disjoint_sets(cpus["pod0c0"],cpus["pod0c1"],cpus["pod0c2"],cpus["pod0c3"],cpus["pod1c0"])'
17+
18+
vm-command "kubectl delete pods --all --now"
19+
20+
# Repeat the same test using Burstable containers that look like BestEffort
21+
# based on their CPU request alone.
22+
CONTCOUNT=4 CPUREQ=1m CPULIM=750m create burstable
23+
CPU=4 MEM=100M CONTCOUNT=1 create guaranteed
24+
verify 'disjoint_sets(cpus["pod2c0"],cpus["pod2c1"],cpus["pod2c2"],cpus["pod2c3"],cpus["pod3c0"])'
25+
26+
vm-command "kubectl delete pods --all --now"
27+
28+
# Repeat the same test using non-zero CPU request Burstable containers.
29+
CONTCOUNT=4 CPUREQ=250m CPULIM=750m create burstable
30+
CPU=4 MEM=100M CONTCOUNT=1 create guaranteed
31+
verify 'disjoint_sets(cpus["pod4c0"],cpus["pod4c1"],cpus["pod4c2"],cpus["pod4c3"],cpus["pod5c0"])'
32+
33+
vm-command "kubectl delete pods --all --now"
34+
helm-terminate

0 commit comments

Comments
 (0)