From 68e144c63791fc4982afedc0fe6fcbf924b5d59b Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 26 Jun 2018 10:49:59 -0400 Subject: [PATCH] Set shim max procs via env var This sets the shim's max procs to 2, like we already have hard coded in the shim, with the env var so that it is set at go runtime boot. Signed-off-by: Michael Crosby --- runtime/shim/client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/shim/client/client.go b/runtime/shim/client/client.go index f6361288e..e46d6df3a 100644 --- a/runtime/shim/client/client.go +++ b/runtime/shim/client/client.go @@ -136,6 +136,7 @@ func newCommand(binary, daemonAddress string, debug bool, config shim.Config, so // will be mounted by the shim cmd.SysProcAttr = getSysProcAttr() cmd.ExtraFiles = append(cmd.ExtraFiles, socket) + cmd.Env = append(os.Environ(), "GOMAXPROCS=2") if debug { cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr