From 467279acd26e825fcfabe8ca7d81865755a70343 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 16 Apr 2020 17:32:02 +0300 Subject: [PATCH] docs/Single-server-VictoriaMetrics.md: imrpove docs about metrics deletion --- README.md | 5 +++-- docs/Single-server-VictoriaMetrics.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e6e87600..29da16b24 100644 --- a/README.md +++ b/README.md @@ -602,7 +602,7 @@ Steps for restoring from a snapshot: Send a request to `http://:8428/api/v1/admin/tsdb/delete_series?match[]=`, where `` may contain any [time series selector](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-series-selectors) for metrics to delete. After that all the time series matching the given selector are deleted. Storage space for -the deleted time series isn't freed instantly - it is freed during subsequent merges of data files. +the deleted time series isn't freed instantly - it is freed during subsequent [background merges of data files](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). It is recommended verifying which metrics will be deleted with the call to `http://:8428/api/v1/series?match[]=` before actually deleting the metrics. @@ -617,9 +617,10 @@ The delete API is intended mainly for the following cases: It isn't recommended using delete API for the following cases, since it brings non-zero overhead: * Regular cleanups for unneded data. Just prevent writing unneeded data into VictoriaMetrics. + This can be done with relabeling in [vmagent](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmagent/README.md). See [this article](https://www.robustperception.io/relabelling-can-discard-targets-timeseries-and-alerts) for details. * Reducing disk space usage by deleting unneded time series. This doesn't work as expected, since the deleted - time series occupy disk space until the next merge operation, which can never occur. + time series occupy disk space until the next merge operation, which can never occur when deleting too old data. It is better using `-retentionPeriod` command-line flag for efficient pruning of old data. diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 6e6e87600..29da16b24 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -602,7 +602,7 @@ Steps for restoring from a snapshot: Send a request to `http://:8428/api/v1/admin/tsdb/delete_series?match[]=`, where `` may contain any [time series selector](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-series-selectors) for metrics to delete. After that all the time series matching the given selector are deleted. Storage space for -the deleted time series isn't freed instantly - it is freed during subsequent merges of data files. +the deleted time series isn't freed instantly - it is freed during subsequent [background merges of data files](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). It is recommended verifying which metrics will be deleted with the call to `http://:8428/api/v1/series?match[]=` before actually deleting the metrics. @@ -617,9 +617,10 @@ The delete API is intended mainly for the following cases: It isn't recommended using delete API for the following cases, since it brings non-zero overhead: * Regular cleanups for unneded data. Just prevent writing unneeded data into VictoriaMetrics. + This can be done with relabeling in [vmagent](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmagent/README.md). See [this article](https://www.robustperception.io/relabelling-can-discard-targets-timeseries-and-alerts) for details. * Reducing disk space usage by deleting unneded time series. This doesn't work as expected, since the deleted - time series occupy disk space until the next merge operation, which can never occur. + time series occupy disk space until the next merge operation, which can never occur when deleting too old data. It is better using `-retentionPeriod` command-line flag for efficient pruning of old data.