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