Disable default node limits (#472)
* Disable default node limits * removed unused vars
This commit is contained in:
+1
-19
@@ -3,7 +3,6 @@ package config
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mitchellh/go-homedir"
|
"github.com/mitchellh/go-homedir"
|
||||||
@@ -13,12 +12,6 @@ import (
|
|||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
defaultLimitNumTracksPerCPU int32 = 400
|
|
||||||
defaultLimitMaxNumTracks int32 = 8000
|
|
||||||
defaultLimitBytesPerSec float32 = 1_000_000_000 // just under 10 Gbps
|
|
||||||
)
|
|
||||||
|
|
||||||
var DefaultStunServers = []string{
|
var DefaultStunServers = []string{
|
||||||
"stun.l.google.com:19302",
|
"stun.l.google.com:19302",
|
||||||
"stun1.l.google.com:19302",
|
"stun1.l.google.com:19302",
|
||||||
@@ -225,7 +218,7 @@ func NewConfig(confString string, c *cli.Context) (*Config, error) {
|
|||||||
},
|
},
|
||||||
NodeSelector: NodeSelectorConfig{
|
NodeSelector: NodeSelectorConfig{
|
||||||
Kind: "random",
|
Kind: "random",
|
||||||
SysloadLimit: 0.7,
|
SysloadLimit: 0.9,
|
||||||
},
|
},
|
||||||
Keys: map[string]string{},
|
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 != "" {
|
if conf.LogLevel != "" {
|
||||||
conf.Logging.Level = conf.LogLevel
|
conf.Logging.Level = conf.LogLevel
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user