mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 16:16:44 +00:00
update fair
This commit is contained in:
@@ -282,12 +282,9 @@ func (scheduler *SchedulerFair) ReleaseResource(job Job, agent NodeStatus) {
|
|||||||
scheduler.resourceAllocations[job.Group] = &ResourceCount{}
|
scheduler.resourceAllocations[job.Group] = &ResourceCount{}
|
||||||
}
|
}
|
||||||
cnt, _ := scheduler.resourceAllocations[job.Group]
|
cnt, _ := scheduler.resourceAllocations[job.Group]
|
||||||
cnt.CPU -= res.MemTotal
|
cnt.CPU -= res.NumCPU
|
||||||
cnt.Memory -= res.NumCPU
|
cnt.Memory -= res.MemTotal
|
||||||
for _, v := range res.Status {
|
cnt.NumberGPU -= len(res.Status)
|
||||||
cnt.NumberGPU --
|
|
||||||
cnt.MemoryGPU -= v.MemoryTotal
|
|
||||||
}
|
|
||||||
scheduler.resourceAllocationsMu.Unlock()
|
scheduler.resourceAllocationsMu.Unlock()
|
||||||
}(agent)
|
}(agent)
|
||||||
go func() {
|
go func() {
|
||||||
@@ -391,7 +388,6 @@ func (scheduler *SchedulerFair) UpdateQuota() {
|
|||||||
availableCPU -= (requests[queue].CPU * per * weight) / requests[queue].NumberGPU
|
availableCPU -= (requests[queue].CPU * per * weight) / requests[queue].NumberGPU
|
||||||
quota.Memory += (requests[queue].Memory * per * weight) / requests[queue].NumberGPU / 1000
|
quota.Memory += (requests[queue].Memory * per * weight) / requests[queue].NumberGPU / 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]
|
||||||
|
|||||||
Reference in New Issue
Block a user