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

update preempt

This commit is contained in:
Newnius 2020-06-04 15:00:36 +08:00
parent 1925aa0eaa
commit a55b08d330

View File

@ -98,7 +98,7 @@ func (scheduler *SchedulerPriority) Start() {
} }
needGPU := numberGPU - (InstanceOfResourcePool().TotalGPU - InstanceOfResourcePool().UsingGPU) needGPU := numberGPU - (InstanceOfResourcePool().TotalGPU - InstanceOfResourcePool().UsingGPU)
score = float64(time.Now().UnixNano()/100000-int64(jobT.CreatedAt)) * math.Abs(float64(numberGPU-needGPU)) / float64(numberGPUt) score = float64(time.Now().UnixNano()/100000-int64(jobT.CreatedAt)) * math.Abs(0.01+float64(numberGPU-needGPU)) / float64(numberGPUt)
if score < minScore { if score < minScore {
minScore = score minScore = score