mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-06 22:01:55 +00:00
update fair
This commit is contained in:
parent
49350b7b6d
commit
5890d07306
@ -382,8 +382,9 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
||||
weight := InstanceOfGroupManager().groups[queue].Weight
|
||||
quota := scheduler.queuesQuota[queue]
|
||||
|
||||
/* if allocate is more than request, reduce weight */
|
||||
if quota.NumberGPU+per*weight > requests[queue].NumberGPU {
|
||||
weight = requests[queue].NumberGPU / (quota.NumberGPU + per)
|
||||
weight = (requests[queue].NumberGPU - quota.NumberGPU + per - 1) / per
|
||||
}
|
||||
|
||||
quota.NumberGPU += per * weight
|
||||
|
Loading…
Reference in New Issue
Block a user