mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 14:21:55 +00:00
update preempt
This commit is contained in:
parent
5724d29d4b
commit
33041d3a45
@ -93,6 +93,7 @@ func (scheduler *SchedulerPriority) Start() {
|
|||||||
for _, task := range jobT.Tasks {
|
for _, task := range jobT.Tasks {
|
||||||
numberGPUt += task.NumberGPU
|
numberGPUt += task.NumberGPU
|
||||||
}
|
}
|
||||||
|
log.Info(time.Now().UnixNano())
|
||||||
needGPU := InstanceOfResourcePool().TotalGPU - InstanceOfResourcePool().UsingGPU
|
needGPU := InstanceOfResourcePool().TotalGPU - InstanceOfResourcePool().UsingGPU
|
||||||
score = float64(jobT.CreatedAt) * math.Abs(float64(numberGPU-numberGPUt+needGPU)) / float64(numberGPUt)
|
score = float64(jobT.CreatedAt) * math.Abs(float64(numberGPU-numberGPUt+needGPU)) / float64(numberGPUt)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user