Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.2.0 (unreleased)

- Fixed quota clamping to always round down rather than up; Rather than
guaranteeing constant throttling at saturation, instead assume that the
fractional CPU was added as a hedge for factors outside of Go's scheduler.

## v1.1.0 (2017-11-10)

- Log the new value of `GOMAXPROCS` rather than the current value.
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/cpu_quota_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func CPUQuotaToGOMAXPROCS(minValue int) (int, CPUQuotaStatus, error) {
return -1, CPUQuotaUndefined, err
}

maxProcs := int(math.Ceil(quota))
maxProcs := int(math.Floor(quota))
if minValue > 0 && maxProcs < minValue {
return minValue, CPUQuotaMinUsed, nil
}
Expand Down