You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a long-standing issue that I'd like to consult about:
All containers are limited using Docker Compose with the following configuration:
deploy:
resources:
limits:
cpus: '1'
memory: 1G
Different containers with the same CPU limit exhibit different behaviors. When checking all containers with Docker, the result for "CpuQuota" is 0, which is expected since I haven’t set a specific CPU quota value. However, in cases where no quota is set, I’m seeing that some containers have container_spec_cpu_quota while others do not. This discrepancy is causing Prometheus to calculate the CPU usage for individual containers on the server as significantly high. The specific PromQL query I'm using is:
I have a long-standing issue that I'd like to consult about:
All containers are limited using Docker Compose with the following configuration:
deploy:
resources:
limits:
cpus: '1'
memory: 1G
Different containers with the same CPU limit exhibit different behaviors. When checking all containers with Docker, the result for "CpuQuota" is 0, which is expected since I haven’t set a specific CPU quota value. However, in cases where no quota is set, I’m seeing that some containers have container_spec_cpu_quota while others do not. This discrepancy is causing Prometheus to calculate the CPU usage for individual containers on the server as significantly high. The specific PromQL query I'm using is:
((sum by(instance, nodename, name) (rate(container_cpu_usage_seconds_total{name!=""}[1m])) / sum by(instance, nodename, name) (container_spec_cpu_quota{name!=""} / container_spec_cpu_period{name!=""})) * 100)
The text was updated successfully, but these errors were encountered: