Skip to content
Open
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Automatically set `GOMAXPROCS` to match Linux container CPU quota.

While this package predates Go 1.25 [container-aware-gomaxprocs], we continue to use it in production. This is because, unlike the stdlib, this package rounds any fractional cores down. This is to reduce latency spikes at a cost of potentially wasted capacity. We use fractional cores (example 8.1) to constrain the Go runtime to 8 cores, while 0.1 is left for anything else running in the container.

## Installation

`go get -u go.uber.org/automaxprocs`
Expand Down Expand Up @@ -67,5 +69,6 @@ Released under the [MIT License](LICENSE).
[ci]: https://github.com/uber-go/automaxprocs/actions/workflows/go.yml
[cov-img]: https://codecov.io/gh/uber-go/automaxprocs/branch/master/graph/badge.svg
[cov]: https://codecov.io/gh/uber-go/automaxprocs
[container-aware-gomaxprocs]: https://go.dev/doc/go1.25#container-aware-gomaxprocs


Loading