1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 06:11:56 +00:00

update fair

This commit is contained in:
Newnius 2020-05-28 21:46:52 +08:00
parent 08dcc14be2
commit 94ef6cf8aa

View File

@ -155,6 +155,10 @@ func (scheduler *SchedulerFair) Start() {
}
/* start borrow */
for queue, quota := range scheduler.queuesQuota {
/* do not self borrow */
if queue == bestQueue {
continue
}
quota.NumberGPU -= least
if _, ok := scheduler.IOUs[bestQueue]; !ok {
scheduler.IOUs[bestQueue] = map[string]*ResourceCount{}
@ -189,6 +193,13 @@ func (scheduler *SchedulerFair) Start() {
}
log.Info("schedulingJobs are ", scheduler.schedulingJobs)
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)
}
pool := InstanceOfResourcePool()
/* Make sure resource it enough */
if len(scheduler.schedulingJobs) == 0 || (numberGPUtmp*10+(scheduler.allocatingGPU)*13 <= (pool.TotalGPU-pool.UsingGPU)*10) {