mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 22:31:55 +00:00
update fair
This commit is contained in:
parent
b0f30bf25e
commit
88fce67e4c
@ -331,14 +331,6 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
if availableGPU <= 0 {
|
if availableGPU <= 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Info("Can allocate ", availableGPU)
|
|
||||||
log.Info("Before ")
|
|
||||||
for queue, quota := range scheduler.queuesQuota {
|
|
||||||
log.Info("Queue<->", queue)
|
|
||||||
log.Info("GPU:", quota.NumberGPU)
|
|
||||||
log.Info("CPU:", quota.CPU)
|
|
||||||
log.Info("Memory:", quota.Memory)
|
|
||||||
}
|
|
||||||
availableGPU *= 1000
|
availableGPU *= 1000
|
||||||
availableCPU *= 1000
|
availableCPU *= 1000
|
||||||
|
|
||||||
@ -375,6 +367,14 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
if len(candidates) == 0 {
|
if len(candidates) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
log.Info("Can allocate ", availableGPU)
|
||||||
|
log.Info("Before ")
|
||||||
|
for queue, quota := range scheduler.queuesQuota {
|
||||||
|
log.Info("Queue<->", queue)
|
||||||
|
log.Info("GPU:", quota.NumberGPU)
|
||||||
|
log.Info("CPU:", quota.CPU)
|
||||||
|
log.Info("Memory:", quota.Memory)
|
||||||
|
}
|
||||||
|
|
||||||
per := availableGPU / weights
|
per := availableGPU / weights
|
||||||
for _, queue := range candidates {
|
for _, queue := range candidates {
|
||||||
@ -390,6 +390,7 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
availableCPU -= (requests[queue].CPU / requests[queue].NumberGPU) * per * weight
|
availableCPU -= (requests[queue].CPU / requests[queue].NumberGPU) * per * weight
|
||||||
quota.Memory += (requests[queue].Memory / requests[queue].NumberGPU) * per * weight / 1000
|
quota.Memory += (requests[queue].Memory / requests[queue].NumberGPU) * per * weight / 1000
|
||||||
}
|
}
|
||||||
|
log.Info(availableGPU)
|
||||||
if availableGPU > 0 {
|
if availableGPU > 0 {
|
||||||
for _, queue := range candidates {
|
for _, queue := range candidates {
|
||||||
quota := scheduler.queuesQuota[queue]
|
quota := scheduler.queuesQuota[queue]
|
||||||
|
Loading…
Reference in New Issue
Block a user