Skip to content

Commit

Permalink
Merge pull request #2147 from influxdb/set-max-procs-better-location
Browse files Browse the repository at this point in the history
Set Go Max procs in a better location
  • Loading branch information
corylanou committed Apr 2, 2015
2 parents bdd469d + 013e95e commit 734e57a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.9.0-rc20 [unreleased]

### Bugfixes
- [#2147](https://github.com/influxdb/influxdb/pull/2147): Set Go Max procs in a better location
-
## v0.9.0-rc19 [2015-04-01]

### Features
Expand Down
8 changes: 4 additions & 4 deletions cmd/influxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ func main() {
commit = "unknown"
}

// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
log.Printf("GOMAXPROCS set to %d", runtime.GOMAXPROCS(0))

// Shift binary name off argument list.
args := os.Args[1:]

Expand Down Expand Up @@ -121,6 +117,10 @@ func execRun(args []string) {
fmt.Print(logo)
writePIDFile(*pidPath)

// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
log.Printf("GOMAXPROCS set to %d", runtime.GOMAXPROCS(0))

// Parse configuration file from disk.
config, err := parseConfig(*configPath, *hostname)
if err != nil {
Expand Down

0 comments on commit 734e57a

Please sign in to comment.