mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
Disable default node limits (#472)
* Disable default node limits * removed unused vars
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user