From ac9c2a796fcabe39a476b5194d016d1bb482b943 Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Thu, 28 Mar 2024 16:17:33 +0100 Subject: [PATCH] docs: describe timeout query argument (#6020) Signed-off-by: hagen1778 Co-authored-by: hagen1778 --- README.md | 10 ++++++++++ docs/Cluster-VictoriaMetrics.md | 10 ++++++++++ docs/README.md | 10 ++++++++++ docs/Single-server-VictoriaMetrics.md | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/README.md b/README.md index 86e9da9fc..42609a7fa 100644 --- a/README.md +++ b/README.md @@ -1681,6 +1681,7 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical This means that the maximum memory usage and CPU usage a single query can use is proportional to `-search.maxUniqueTimeseries`. - `-search.maxQueryDuration` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM when executing unexpected heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxConcurrentRequests` limits the number of concurrent requests VictoriaMetrics can process. Bigger number of concurrent requests usually means bigger memory usage. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries may need `100 * 100 MiB = 10 GiB` of additional memory. So it is better to limit the number of concurrent queries, while pausing additional incoming queries if the concurrency limit is reached. @@ -1729,10 +1730,19 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical - `-search.maxLabelsAPIDuration` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. See also `-search.maxLabelsAPISeries` and `-search.ignoreExtraFiltersAtLabelsAPI`. +- `-search.maxExportDuration` limits the duration for requests to [/api/v1/export*](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1export). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. +- `search.maxStatusRequestDuration` limits the duration for requests to [/api/v1/status/tsdb](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1statustsdb). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxTagValueSuffixesPerSearch` limits the number of entries, which may be returned from `/metrics/find` endpoint. See [Graphite Metrics API usage docs](#graphite-metrics-api-usage). See also [resource usage limits at VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#resource-usage-limits), diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index b14692feb..d4343a9e4 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -654,6 +654,7 @@ Some workloads may need fine-grained resource usage limits. In these cases the f a single query can use at `vmstorage` is proportional to `-search.maxUniqueTimeseries`. - `-search.maxQueryDuration` at `vmselect` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM at `vmselect` and `vmstorage` when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxConcurrentRequests` at `vmselect` and `vmstorage` limits the number of concurrent requests a single `vmselect` / `vmstorage` node can process. Bigger number of concurrent requests usually require bigger amounts of memory at both `vmselect` and `vmstorage`. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries @@ -710,10 +711,19 @@ Some workloads may need fine-grained resource usage limits. In these cases the f - `-search.maxLabelsAPIDuration` at `vmselect` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. See also `-search.maxLabelsAPISeries` and `-search.ignoreExtraFiltersAtLabelsAPI`. +- `-search.maxExportDuration` at `vmselect` limits the duration for requests to [/api/v1/export*](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1export). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM at `vmselect` and `vmstorage` when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. +- `search.maxStatusRequestDuration` at `vmselect` limits the duration for requests to [/api/v1/status/tsdb](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1statustsdb). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM at `vmselect` and `vmstorage` when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-storage.maxDailySeries` at `vmstorage` can be used for limiting the number of time series seen per day aka [time series churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). See [cardinality limiter docs](#cardinality-limiter). - `-storage.maxHourlySeries` at `vmstorage` can be used for limiting the number of [active time series](https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series). diff --git a/docs/README.md b/docs/README.md index a6fa01baf..ee6c32a4c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1684,6 +1684,7 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical This means that the maximum memory usage and CPU usage a single query can use is proportional to `-search.maxUniqueTimeseries`. - `-search.maxQueryDuration` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM when executing unexpected heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxConcurrentRequests` limits the number of concurrent requests VictoriaMetrics can process. Bigger number of concurrent requests usually means bigger memory usage. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries may need `100 * 100 MiB = 10 GiB` of additional memory. So it is better to limit the number of concurrent queries, while pausing additional incoming queries if the concurrency limit is reached. @@ -1732,10 +1733,19 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical - `-search.maxLabelsAPIDuration` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. See also `-search.maxLabelsAPISeries` and `-search.ignoreExtraFiltersAtLabelsAPI`. +- `-search.maxExportDuration` limits the duration for requests to [/api/v1/export*](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1export). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. +- `search.maxStatusRequestDuration` limits the duration for requests to [/api/v1/status/tsdb](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1statustsdb). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxTagValueSuffixesPerSearch` limits the number of entries, which may be returned from `/metrics/find` endpoint. See [Graphite Metrics API usage docs](#graphite-metrics-api-usage). See also [resource usage limits at VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#resource-usage-limits), diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index dfb60ad21..9508806c0 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -1692,6 +1692,7 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical This means that the maximum memory usage and CPU usage a single query can use is proportional to `-search.maxUniqueTimeseries`. - `-search.maxQueryDuration` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM when executing unexpected heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxConcurrentRequests` limits the number of concurrent requests VictoriaMetrics can process. Bigger number of concurrent requests usually means bigger memory usage. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries may need `100 * 100 MiB = 10 GiB` of additional memory. So it is better to limit the number of concurrent queries, while pausing additional incoming queries if the concurrency limit is reached. @@ -1740,10 +1741,19 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical - `-search.maxLabelsAPIDuration` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. See also `-search.maxLabelsAPISeries` and `-search.ignoreExtraFiltersAtLabelsAPI`. +- `-search.maxExportDuration` limits the duration for requests to [/api/v1/export*](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1export). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. +- `search.maxStatusRequestDuration` limits the duration for requests to [/api/v1/status/tsdb](https://docs.victoriametrics.com/url-examples/?highlight=apiv1export#apiv1statustsdb). + If the query takes longer than the given duration, then it is canceled. + This allows saving CPU and RAM when executing unexpectedly heavy queries. + The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. - `-search.maxTagValueSuffixesPerSearch` limits the number of entries, which may be returned from `/metrics/find` endpoint. See [Graphite Metrics API usage docs](#graphite-metrics-api-usage). See also [resource usage limits at VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#resource-usage-limits),