diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0dcb38358f68..568aec4b8b7a 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -39,14 +39,12 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" + "go.uber.org/automaxprocs/maxprocs" // Force-load the tracer engines to trigger registration _ "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" ) @@ -245,6 +243,7 @@ func init() { ) app.Before = func(ctx *cli.Context) error { + maxprocs.Set() // Automatically set GOMAXPROCS to match Linux container CPU quota. flags.MigrateGlobalFlags(ctx) return debug.Setup(ctx) }