deploy: add -automaxprocs to reduce CPU and memory resources

With the new `-automaxprocs` commandline parameter, Ceph-CSI will adjust
the GOMAXPROCS environment variable for the Golang runtime. The values
are based on the CPU quota that is given to the process. This can reduce
the number of threads that the Golang runtime spawns, which affects the
require amount of memory as well.

Updates: #5228
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2025-03-21 10:06:45 +01:00
committed by mergify[bot]
parent 0cb6771115
commit 4db8b6222c
18 changed files with 1074 additions and 0 deletions

1
go.mod
View File

@ -29,6 +29,7 @@ require (
github.com/pkg/xattr v0.4.10
github.com/prometheus/client_golang v1.22.0
github.com/stretchr/testify v1.10.0
go.uber.org/automaxprocs v1.6.0
golang.org/x/crypto v0.38.0
golang.org/x/net v0.40.0
golang.org/x/sys v0.33.0