all: Use Linux container CPU quota (fixes #9357, fixes #9435) (#9436)

Go is not cgroup aware and by default will set GOMAXPROCS to the number
of available threads, regardless of whether it is within the allocated
quota. This behaviour causes high amount of CPU throttling and degraded
application performance.
This commit is contained in:
Thomas
2024-02-26 12:23:14 +00:00
committed by GitHub
parent 2d968d46b7
commit aa559bf496
21 changed files with 34 additions and 12 deletions

View File

@@ -34,6 +34,7 @@ import (
"time"
buildpkg "github.com/syncthing/syncthing/lib/build"
_ "go.uber.org/automaxprocs"
)
var (