fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

all: Use automaxprocs

automaxprocs tunes GOMAXPROCS to match Linux container CPU quota. This is useful
in containerized environments were your NumCPU can be much larger than your
effective CPU amount. We have observed in those environments performance
degredation in the go runtime. Tuning this should help.

Change-Id: Iccdaebb9345f8bb41084f4a82804e60b68a16e02

+18
+3
cmd/zoekt-archive-index/main.go
··· 22 22 "github.com/google/zoekt/build" 23 23 "github.com/google/zoekt/cmd" 24 24 "github.com/google/zoekt/gitindex" 25 + 26 + // Tune GOMAXPROCS to match Linux container CPU quota. 27 + _ "go.uber.org/automaxprocs" 25 28 ) 26 29 27 30 // stripComponents removes the specified number of leading path
+3
cmd/zoekt-git-index/main.go
··· 23 23 24 24 "github.com/google/zoekt/cmd" 25 25 "github.com/google/zoekt/gitindex" 26 + 27 + // Tune GOMAXPROCS to match Linux container CPU quota. 28 + _ "go.uber.org/automaxprocs" 26 29 ) 27 30 28 31 func main() {
+3
cmd/zoekt-index/main.go
··· 27 27 "github.com/google/zoekt" 28 28 "github.com/google/zoekt/build" 29 29 "github.com/google/zoekt/cmd" 30 + 31 + // Tune GOMAXPROCS to match Linux container CPU quota. 32 + _ "go.uber.org/automaxprocs" 30 33 ) 31 34 32 35 type fileInfo struct {
+3
cmd/zoekt-repo-index/main.go
··· 48 48 49 49 git "gopkg.in/src-d/go-git.v4" 50 50 "gopkg.in/src-d/go-git.v4/plumbing" 51 + 52 + // Tune GOMAXPROCS to match Linux container CPU quota. 53 + _ "go.uber.org/automaxprocs" 51 54 ) 52 55 53 56 var _ = log.Println
+3
cmd/zoekt-webserver/main.go
··· 35 35 "github.com/google/zoekt/build" 36 36 "github.com/google/zoekt/shards" 37 37 "github.com/google/zoekt/web" 38 + 39 + // Tune GOMAXPROCS to match Linux container CPU quota. 40 + _ "go.uber.org/automaxprocs" 38 41 ) 39 42 40 43 const logFormat = "2006-01-02T15-04-05.999999999Z07"
+1
go.mod
··· 10 10 github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 11 11 github.com/mitchellh/mapstructure v1.1.2 // indirect 12 12 github.com/xanzy/go-gitlab v0.13.0 13 + go.uber.org/automaxprocs v1.2.0 13 14 golang.org/x/net v0.0.0-20181114220301-adae6a3d119a 14 15 golang.org/x/oauth2 v0.0.0-20181120190819-8f65e3013eba 15 16 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
+2
go.sum
··· 60 60 github.com/xanzy/go-gitlab v0.13.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= 61 61 github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro= 62 62 github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8= 63 + go.uber.org/automaxprocs v1.2.0 h1:+RUihKM+nmYUoB9w0D0Ov5TJ2PpFO2FgenTxMJiZBZA= 64 + go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= 63 65 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= 64 66 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 65 67 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=