mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 14:21:55 +00:00
update fair
This commit is contained in:
parent
ad723641bc
commit
fcd0ac52f0
@ -394,7 +394,7 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
|
|
||||||
quota.CPU += (requests[queue].CPU * base) / requests[queue].NumberGPU
|
quota.CPU += (requests[queue].CPU * base) / requests[queue].NumberGPU
|
||||||
availableCPU -= (requests[queue].CPU * base) / requests[queue].NumberGPU
|
availableCPU -= (requests[queue].CPU * base) / requests[queue].NumberGPU
|
||||||
quota.Memory += (requests[queue].Memory * base) / requests[queue].NumberGPU / 1000
|
quota.Memory += ((requests[queue].Memory * base) / requests[queue].NumberGPU) / 1000
|
||||||
}
|
}
|
||||||
if availableGPU > 0 {
|
if availableGPU > 0 {
|
||||||
for _, queue := range candidates {
|
for _, queue := range candidates {
|
||||||
@ -403,6 +403,8 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
}
|
}
|
||||||
quota := scheduler.queuesQuota[queue]
|
quota := scheduler.queuesQuota[queue]
|
||||||
quota.NumberGPU += availableGPU
|
quota.NumberGPU += availableGPU
|
||||||
|
quota.CPU += (requests[queue].CPU * availableGPU) / requests[queue].NumberGPU
|
||||||
|
quota.Memory += ((requests[queue].Memory * availableGPU) / requests[queue].NumberGPU) / 1000
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user