forked from cerc-io/plugeth
cmd/geth: use automaxprocs to apply cpu quota correctly (#27506)
It is usually best to set GOMAXPROCS to the number of available CPU cores. However, setting it like that does not work well when the process is quota-limited to a certain number of CPUs. The automaxprocs library configures GOMAXPROCS, taking such limits into account.
This commit is contained in:
@@ -44,6 +44,9 @@ import (
|
||||
_ "github.com/ethereum/go-ethereum/eth/tracers/js"
|
||||
_ "github.com/ethereum/go-ethereum/eth/tracers/native"
|
||||
|
||||
// Automatically set GOMAXPROCS to match Linux container CPU quota.
|
||||
_ "go.uber.org/automaxprocs"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user