profile
viewpoint

Ask questionsIncrease default value for -search.maxPointsPerTimeseries

Hi! Trying to execute the following query for the last 7 days in Grafana.

avg(
  avg_over_time(
    rate(luxtronik_waermemenge{attr="heizung_kWh"}[5m])[10m:1m]
  )
) by(attr)

While this succeeds in Prometheus, it fails in Victoria:

cannot execute "avg(\n avg_over_time(\n rate(luxtronik_waermemenge{attr="heizung_kWh"}[5m])[10m:1m]\n )\n) by(attr)":
cannot evaluate "avg_over_time(rate(luxtronik_waermemenge{attr="heizung_kWh"}[5m])[10m:1m])":
  too many points for the given
    step=60000,
    start=1560798000000 and
    end=1561404660000:
  10112; cannot exceed 10000 points

I could probably tune -search.maxPointsPerTimeseries, however I am unsure if this could result in OOM.

Any guidance on how to handle this correctly?

VictoriaMetrics/VictoriaMetrics

Answer questions valyala

It is safe to increase -search.maxPointsPerTimeseries. The default 10K limit was set before subqueries where introduced in Prometheus and VictoriaMetrics. This was reasonable, since every returned point is usually displayed on a single pixel on the graph. 10K was enough for any modern monitor, since they have lower number of pixels on each side. After introducing subqueries the default limit can be safely increased. So it will be increased in the next version of VictoriaMetrics to 30K.

useful!
source:https://uonfu.com/
Github User Rank List