Skip to content

Commit 223a3fb

Browse files
Remove hardcoded GOMAXPROCS; print cpu info in startup-banner
1 parent 974923a commit 223a3fb

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

dgraph/main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import (
1717
)
1818

1919
func main() {
20-
// Setting a higher number here allows more disk I/O calls to be scheduled, hence considerably
21-
// improving throughput. The extra CPU overhead is almost negligible in comparison. The
22-
// benchmark notes are located in badger-bench/randread.
23-
runtime.GOMAXPROCS(128)
2420

2521
absDiff := func(a, b uint64) uint64 {
2622
if a > b {

x/init.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Commit timestamp : %v
5050
Branch : %v
5151
Go version : %v
5252
jemalloc enabled : %v
53+
GOMAXPROCS : %v
54+
Num CPUs : %v
5355
5456
For Dgraph official documentation, visit https://dgraph.io/docs.
5557
For discussions about Dgraph , visit https://discuss.dgraph.io.
@@ -59,7 +61,7 @@ For discussions about Dgraph , visit https://discuss.dgraph.io.
5961
6062
`,
6163
dgraphVersion, dgraphCodename, ExecutableChecksum(), lastCommitSHA, lastCommitTime, gitBranch,
62-
runtime.Version(), jem, licenseInfo)
64+
runtime.Version(), jem, runtime.GOMAXPROCS(0), runtime.NumCPU(), licenseInfo)
6365
}
6466

6567
// PrintVersion prints version and other helpful information if --version.

0 commit comments

Comments
 (0)