3scale-ops / prometheus-exporter-operator

Operator to centralize the setup of 3rd party prometheus exporters on Kubernetes/OpenShift, with a collection of grafana dashboards
Apache License 2.0
42 stars 15 forks source link

Feat/Increase default cpu limits for all exporters (except sendgrid) to avoid CPUThrottling #47

Closed slopezz closed 1 year ago

slopezz commented 1 year ago

We have seen that all exporters, although their average CPU usage is pretty low (even less than 5m), all of them (except sendgrid) are affected by CPUThrottling:

100 * sum by(container, pod, namespace) (increase(container_cpu_cfs_throttled_periods_total{container!=""}[5m]))
  / sum by(container, pod, namespace) (increase(container_cpu_cfs_periods_total[5m])) > 25

The most affected ones are:

image image

This PR sets higher default cpu.limits for all exporters trying to achieve to not have CPU throttled.

Anyway, if for any reason you prefer to have lower cpu.limits although having CPU throttled, you can always overwrite default resources configuration, example:


apiVersion: monitoring.3scale.net/v1alpha1
kind: PrometheusExporter
metadata:
  name: elasticsearch
spec:
  type: es
  dbHost: https://elasticsearch.com
  dbPort: 443
  resources:
    requests:
      cpu: 25m
      memory: 64Mi
    limits:
      cpu: 200m
      memory: 128Mi

/kind feature /kind release /priority important-soon /assign

3scale-robot commented 1 year ago

LGTM label has been added.

Git tree hash: b14c34b252f31cc75251ad4a03329eeb27b0e528

slopezz commented 1 year ago

/approve

3scale-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slopezz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/3scale-ops/prometheus-exporter-operator/blob/main/OWNERS)~~ [slopezz] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment