thanos-io / promql-engine

Multi-threaded PromQL engine implementation based on the Volcano paper.
Apache License 2.0
142 stars 55 forks source link

Support max samples limit #498

Open yeya24 opened 2 days ago

yeya24 commented 2 days ago

https://github.com/thanos-io/promql-engine/pull/452 supports tracking peak samples during an execution of the query.

What we are still missing from the old Promql engine is max samples limit enforced by flag query.max-samples, which can be used to protect the query engine from getting OOM killed.

https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L512

harry671003 commented 2 days ago

Is this useful in the engine? Each step is only keeping a batch of 10 samples per series in memory.