yangwwei opened a new pull request, #759:
URL: https://github.com/apache/yunikorn-core/pull/759
### What is this PR for?
I am testing GPU preemption scenarios, and in the following scenario, the
preemption isn't happening as expected.
queue structure is pretty simple:
```
root
- a
min=100
max=300
- b
min=0
max=300
```
the cluster has a total of 300 GPUs available, no autoscaling. Reproducing
steps:
1. Create 600 pods in `root.b queue`, each needs 1 GPU. This will consume
all 300 GPUs available in the cluster, and 300 pods pending
2. Create 100 pods in `root.a` queue, each needs 1 GPU. The expectation is
queue `a` will preempt 100 GPU from queue `b` reach the guarantee.
observation: a small number of pods preempted resources from queue `b` got
started on queue `a`, the result is not stable. it could not reach guaranteed
resources.
When I debug, I found in these lines:
https://github.com/apache/yunikorn-core/blob/620687afe10638d3e191edffbc81959985abbbb4/pkg/scheduler/objects/preemption.go#L576-L587.
When it marks an ask as triggered preemption, when the next time doing
`tryPreemption()`, it will be skipped. However, when the queue headroom is
enough, in my case, because all GPUs are utilized, the headroom for GPU is 0,
it skipped to create the reservation. Then even one pod gets evicted, the pod
initiated this preemption cannot get the spot.
Not sure why we need the check here, when I removed it and always return a
reservation, it works much better and much stable now.
### What type of PR is it?
* [x] - Bug Fix
* [ ] - Improvement
* [ ] - Feature
* [ ] - Documentation
* [ ] - Hot Fix
* [ ] - Refactoring
### Todos
N/A
### What is the Jira issue?
* https://issues.apache.org/jira/browse/YUNIKORN-2270
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]