Skip to content

Commit 6c313ff

Browse files
jsvisafjl
authored andcommitted
cmd/geth: don't set GOMAXPROCS by default (#17148)
This is no longer needed because Go uses all CPUs by default. The change allows setting GOMAXPROCS in environment if needed.
1 parent a352de6 commit 6c313ff

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

cmd/geth/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"fmt"
2222
"math"
2323
"os"
24-
"runtime"
2524
godebug "runtime/debug"
2625
"sort"
2726
"strconv"
@@ -209,8 +208,6 @@ func init() {
209208
app.Flags = append(app.Flags, metricsFlags...)
210209

211210
app.Before = func(ctx *cli.Context) error {
212-
runtime.GOMAXPROCS(runtime.NumCPU())
213-
214211
logdir := ""
215212
if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) {
216213
logdir = (&node.Config{DataDir: utils.MakeDataDir(ctx)}).ResolvePath("logs")

0 commit comments

Comments
 (0)