Skip to content

Commit

Permalink
Merge pull request #2446 from bdarnell/maxprocs
Browse files Browse the repository at this point in the history
Remove manual setting of GOMAXPROCS in main.go.
  • Loading branch information
bdarnell committed Sep 10, 2015
2 parents 8ec92c5 + 97cebaa commit 4e055b0
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,14 @@ import (
"fmt"
"math/rand"
"os"
"runtime"

"github.com/cockroachdb/cockroach/cli"
"github.com/cockroachdb/cockroach/util/log"
"github.com/cockroachdb/cockroach/util/randutil"
)

func main() {
// Instruct Go to use all CPU cores.
// TODO(spencer): this may be excessive and result in worse
// performance. We should keep an eye on this as we move to
// production workloads.
numCPU := runtime.NumCPU()
runtime.GOMAXPROCS(numCPU)
// Seed the math/rand RNG from crypto/rand.
rand.Seed(randutil.NewPseudoSeed())
if log.V(1) {
log.Infof("running using %d processor cores", numCPU)
}

if len(os.Args) == 1 {
os.Args = append(os.Args, "help")
Expand Down

0 comments on commit 4e055b0

Please sign in to comment.