From b632173b814b50c73e34cfc1b7ca300d179b94b7 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 23 Aug 2015 13:59:26 -0700 Subject: [PATCH] nomad: default number of schedulers to number of cores --- nomad/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nomad/config.go b/nomad/config.go index d001224a5..3d3b541a1 100644 --- a/nomad/config.go +++ b/nomad/config.go @@ -5,6 +5,7 @@ import ( "io" "net" "os" + "runtime" "time" "github.com/hashicorp/memberlist" @@ -187,6 +188,9 @@ func DefaultConfig() *Config { } c.EnabledSchedulers = append(c.EnabledSchedulers, structs.JobTypeCore) + // Default the number of schedulers to match the coores + c.NumSchedulers = runtime.NumCPU() + // Increase our reap interval to 3 days instead of 24h. c.SerfConfig.ReconnectTimeout = 3 * 24 * time.Hour