mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
nomad: default number of schedulers to number of cores
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user