diff --git a/app/victoria-logs/main.go b/app/victoria-logs/main.go index 1a3aea2a9..0a56dd91f 100644 --- a/app/victoria-logs/main.go +++ b/app/victoria-logs/main.go @@ -11,7 +11,6 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/app/vlselect" "github.com/VictoriaMetrics/VictoriaMetrics/app/vlstorage" "github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup" "github.com/VictoriaMetrics/VictoriaMetrics/lib/envflag" "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs" @@ -26,7 +25,6 @@ var ( useProxyProtocol = flag.Bool("httpListenAddr.useProxyProtocol", false, "Whether to use proxy protocol for connections accepted at -httpListenAddr . "+ "See https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt . "+ "With enabled proxy protocol http server cannot serve regular /metrics endpoint. Use -pushmetrics.url for metrics pushing") - gogc = flag.Int("gogc", 100, "GOGC to use. See https://tip.golang.org/doc/gc-guide") ) func main() { @@ -34,7 +32,6 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() - cgroup.SetGOGC(*gogc) buildinfo.Init() logger.Init() diff --git a/lib/cgroup/mem.go b/lib/cgroup/mem.go index 93c127f08..f35d3cbad 100644 --- a/lib/cgroup/mem.go +++ b/lib/cgroup/mem.go @@ -34,18 +34,6 @@ func initGOGC() { } } -// SetGOGC sets GOGC to the given percent -func SetGOGC(percent int) { - if percent <= 0 { - return - } - if percent > 100 { - percent = 100 - } - gogc = percent - debug.SetGCPercent(gogc) -} - var gogc int // GetMemoryLimit returns cgroup memory limit