prometheus-community / smartctl_exporter

Export smartctl statistics to prometheus
Apache License 2.0
264 stars 78 forks source link

smartctl_exporter should be cgroup aware #201

Closed uhthomas closed 2 months ago

uhthomas commented 4 months ago

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.

SuperQ commented 2 months ago

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

lahwaacz commented 1 month ago

@SuperQ Can this be done as-is or does it need something similar to https://github.com/prometheus/node_exporter/pull/2530?