From 433a5cd8d17650ce7519e76d2f9c6ca3c2500d8d Mon Sep 17 00:00:00 2001 From: David Zhao Date: Sun, 27 Feb 2022 16:54:39 -0800 Subject: [PATCH] Disable default node limits (#472) * Disable default node limits * removed unused vars --- pkg/config/config.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 7861c85ca..f9d8beac3 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -3,7 +3,6 @@ package config import ( "fmt" "os" - "runtime" "time" "github.com/mitchellh/go-homedir" @@ -13,12 +12,6 @@ import ( "gopkg.in/yaml.v3" ) -const ( - defaultLimitNumTracksPerCPU int32 = 400 - defaultLimitMaxNumTracks int32 = 8000 - defaultLimitBytesPerSec float32 = 1_000_000_000 // just under 10 Gbps -) - var DefaultStunServers = []string{ "stun.l.google.com:19302", "stun1.l.google.com:19302", @@ -225,7 +218,7 @@ func NewConfig(confString string, c *cli.Context) (*Config, error) { }, NodeSelector: NodeSelectorConfig{ Kind: "random", - SysloadLimit: 0.7, + SysloadLimit: 0.9, }, Keys: map[string]string{}, } @@ -266,17 +259,6 @@ func NewConfig(confString string, c *cli.Context) (*Config, error) { } } - if conf.Limit.NumTracks == 0 { - conf.Limit.NumTracks = defaultLimitNumTracksPerCPU * int32(runtime.NumCPU()) - if conf.Limit.NumTracks > defaultLimitMaxNumTracks { - conf.Limit.NumTracks = defaultLimitMaxNumTracks - } - } - - if conf.Limit.BytesPerSec == 0 { - conf.Limit.BytesPerSec = defaultLimitBytesPerSec - } - if conf.LogLevel != "" { conf.Logging.Level = conf.LogLevel }