Skip to content

Commit

Permalink
add overCommitFactor min limit(1.0)
Browse files Browse the repository at this point in the history
Signed-off-by: huone1 <huwanxing@huawei.com>
  • Loading branch information
huone1 committed Jan 26, 2021
1 parent 8a9b873 commit 7f0943d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/scheduler/actions/enqueue/enqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
var (
// defaultOverCommitFactor defines the default overCommit resource factor for enqueue action
defaultOverCommitFactor = 1.2
minOverCommitFactor = 1.0
targetJob = util.Reservation.TargetJob
)

Expand Down Expand Up @@ -170,5 +171,9 @@ func (enqueue *Action) getOverCommitFactor(ssn *framework.Session) float64 {
arg.GetFloat64(&factor, overCommitFactor)
}

if factor < minOverCommitFactor {
factor = minOverCommitFactor
}

return factor
}

0 comments on commit 7f0943d

Please sign in to comment.