topolvm / topolvm

Capacity-aware CSI plugin for Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow setting deployment environment variables/GOMAXPROCS in helm charts

juliantaylor opened this issue · comments

What should the feature do:
It would be nice if the kubernetes helm charts would allow setting environment variables for the golang components via the values.

What is use case behind this feature:
Typically in golang programs you want to define the variable GOMAXPROCS to be in the range of the cpu limit of the deployment, otherwise golang uses the hosts logical cpu number as the limit which causes a lot of unnecessary overhead and throttling on larger machines.

(Alternatively you could use a go module like https://github.com/uber-go/automaxprocs to let it tune itself automatically)

For example in our clusters consisting of hardware with 40-128 physical cpus the topolvm-controllermanager uses more than half of a cpu purely for goproc overhead and frequently is throttled when some computation starts up 256 threads for a couple ms, setting GOMAXPROCS to 2 (cpu limit of 1) completely removes the overhead.

Hi @juliantaylor,

Thank you for your feature request. We've addressed the issue in #727. This patch will be available after next helm chart release planned in this month.

oh that was fast, thanks