Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartctl_exporter should be cgroup aware #201

Closed
uhthomas opened this issue Feb 26, 2024 · 2 comments
Closed

smartctl_exporter should be cgroup aware #201

uhthomas opened this issue Feb 26, 2024 · 2 comments

Comments

@uhthomas
Copy link

Go is not cgroup aware. This means the VictoriaMetrics operator will be throttled hard in containerised environments with CPU limits.

The below screenshot shows the container with a CPU limit in Kubernetes. The first half of the time series is on a 13600k, with 20 threads. The second half is when the machine changed to use an EPYC 7763 with 128 threads. I changed the CPU limit for the third deployment, which is why it looks a bit more normal again.

image

automaxprocs can use cgroups automatically.

uhthomas added a commit to uhthomas/smartctl_exporter that referenced this issue Feb 26, 2024
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.

Fixes: prometheus-community#201
uhthomas added a commit to uhthomas/smartctl_exporter that referenced this issue Feb 26, 2024
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.

Fixes: prometheus-community#201

Signed-off-by: Thomas Way <[email protected]>
@SuperQ
Copy link
Contributor

SuperQ commented Apr 9, 2024

It would likely be simpler to deploy with a simple GOMAXPROCS=1. The exporter uses very little CPU itself.

@SuperQ SuperQ closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
@lahwaacz
Copy link
Contributor

@SuperQ Can this be done as-is or does it need something similar to prometheus/node_exporter#2530?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants