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