We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 372cdfa + 5764bf1 commit ca39f76Copy full SHA for ca39f76
cmd/containerd-shim/main_unix.go
@@ -60,6 +60,13 @@ func main() {
60
if debugFlag {
61
logrus.SetLevel(logrus.DebugLevel)
62
}
63
+
64
+ if os.Getenv("GOMAXPROCS") == "" {
65
+ // If GOMAXPROCS hasn't been set, we default to a value of 2 to reduce
66
+ // the number of Go stacks present in the shim.
67
+ runtime.GOMAXPROCS(2)
68
+ }
69
70
if err := executeShim(); err != nil {
71
fmt.Fprintf(os.Stderr, "containerd-shim: %s\n", err)
72
os.Exit(1)
0 commit comments