VictoriaMetrics/lib/promscrape
Roman Khavronenko 8e2a8a6ae2
lib/promscrape: limit number of sent stale series at once (#3686)
Stale series are sent when there is a difference between current
and previous scrapes. Those series which disappeared in the current scrape
are marked as stale and sent to the remote storage.

Sending stale series requires memory allocation and in case when too many
series disappear in the same it could result in noticeable memory spike.
For example, re-deploy of a big fleet of service can result into
excessive memory usage for vmagent, because all the series with old
pod name will be marked as stale and sent to the remote write storage.

This change limits the number of stale series which can be sent at once,
so memory usage remains steady.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3668
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3675
Signed-off-by: hagen1778 <roman@victoriametrics.com>

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-01-23 21:56:17 -08:00
..
discovery discovery/{consul,nomad}: fix cancelling serviceWatcher in-flight requests (#3658) 2023-01-17 21:47:51 -08:00
discoveryutils discovery/{consul,nomad}: fix cancelling serviceWatcher in-flight requests (#3658) 2023-01-17 21:47:51 -08:00
testdata lib/promscrape: fix errors in test config 2022-02-08 20:10:28 +02:00
client.go lib/promscrape: properly log the actual response size after c4229a1bba 2023-01-23 21:13:06 -08:00
config_test.go lib/promscrape: implement target-level and metric-level relabel debugging 2022-12-10 02:25:56 -08:00
config_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
config.go lib/promscrape: properly apply series limit 2023-01-17 10:30:16 -08:00
relabel_debug.go lib/promrelabel: pass query args via query string at /metric-relabel-debug and /target-relabel-debug pages if their length doesnt exceed 1000 2023-01-05 16:45:42 -08:00
scraper.go lib/promscrape: add Prometheus-compatible service discovery for Nomad (#3549) 2023-01-05 18:07:02 -08:00
scrapework_test.go lib/promscrape: limit number of sent stale series at once (#3686) 2023-01-23 21:56:17 -08:00
scrapework_timing_test.go lib/promscrape: add exported_ prefix to metric names exported by scrape targets if they clash with automatically generated metrics 2022-11-28 18:37:34 -08:00
scrapework.go lib/promscrape: limit number of sent stale series at once (#3686) 2023-01-23 21:56:17 -08:00
statconn.go lib/promscrape: properly show proxy_url option value at /config page 2021-10-26 21:24:22 +03:00
targetstatus.go lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:28:14 -08:00
targetstatus.qtpl lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:28:14 -08:00
targetstatus.qtpl.go lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:28:14 -08:00