1
0
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:
Newnius 2020-05-28 15:28:04 +08:00
parent f0c856f5e1
commit 01b8f0673e

View File

@ -134,6 +134,8 @@ func (scheduler *SchedulerFair) Start() {
} }
cnt, _ := scheduler.resourceAllocations[bestQueue] cnt, _ := scheduler.resourceAllocations[bestQueue]
cnt.NumberGPU += numberGPUtmp cnt.NumberGPU += numberGPUtmp
cnt.CPU += numberCPUtmp
cnt.Memory += Memorytmp
scheduler.resourceAllocationsMu.Unlock() scheduler.resourceAllocationsMu.Unlock()
scheduler.allocatingGPUMu.Lock() scheduler.allocatingGPUMu.Lock()
@ -328,7 +330,7 @@ func (scheduler *SchedulerFair) UpdateQuota() {
availableCPU := pool.TotalCPU*1000 - usingCPU*1000 - allocatedCPU availableCPU := pool.TotalCPU*1000 - usingCPU*1000 - allocatedCPU
//availableMemory := pool.TotalMemory - usingMemory - allocatedMemory //availableMemory := pool.TotalMemory - usingMemory - allocatedMemory
/* <0 means some nodes exited */ /* <0 means some nodes exited */
log.Info(availableGPU) //log.Info(availableGPU)
if availableGPU <= 0 { if availableGPU <= 0 {
return return
} }