VictoriaMetrics/app/vmselect/promql
Zakhar Bessarab 7205c79c5a
app/vmselect/promql: use lock-less approach to gather results of parallel processing for evalRollup* funcs (#4004)
* vmselect/promql: refactor `evalRollupNoIncrementalAggregate` to use lock-less approach for parallel workers computation

Locking there is causing issues when running on highly multi-core system as it introduces lock contention during results merge.

New implementation uses lock less approach to store results per workerID and merges final result in the end, this is expected to significantly reduce lock contention and CPU usage for systems with high number of cores.

Related: #3966
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* vmselect/promql: add pooling for `timeseriesWithPadding` to reduce allocations

Related: #3966
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* vmselect/promql: refactor `evalRollupFuncWithSubquery` to avoid using locks

Uses same approach as `evalRollupNoIncrementalAggregate` to remove locking between workers and reduce lock contention.

Related: #3966
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2023-03-24 23:07:12 -07:00
..
active_queries.go app/vmselect: show X-Forwarded-For contents on /api/v1/status/active_queries page 2020-07-31 20:05:18 +03:00
aggr.go .golangci.yml: properly enable revive linter and fix all the warnings it detects 2023-02-26 12:18:59 -08:00
aggr_incremental.go app/vmselect: optimize incremental aggregates a bit 2023-03-20 15:37:06 -07:00
aggr_incremental_test.go app/vmselect/promql: fix TestIncrementalAggr test on systems less than 3 CPU cores 2023-03-20 20:37:18 -07:00
aggr_test.go app/vmselect/promql: add mode() aggregate function 2020-07-20 15:31:20 +03:00
binary_op.go app/vmselect/promql: reduce memory allocations when searching for time series pairs with identical labelsets in q1 op q2 queries 2023-01-15 13:03:23 -08:00
eval.go app/vmselect/promql: use lock-less approach to gather results of parallel processing for evalRollup* funcs (#4004) 2023-03-24 23:07:12 -07:00
eval_test.go vmselect/promql: enable search.maxPointsSubqueryPerTimeseries for sub-queries (#2963) 2022-08-24 15:25:18 +03:00
exec.go app/vmselect/promql: avoid memory allocations and copying from source timeseries to the returned result at timeseriesToResult() 2023-01-09 22:38:59 -08:00
exec_test.go metricsql: support optional 2nd argument for rollup functions (#3841) 2023-02-24 13:47:52 -08:00
memory_limiter.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:45:13 +03:00
memory_limiter_test.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:45:13 +03:00
parser.go app/vmselect: accept optional extra_filters[] query args for all the supported Prometheus querying APIs 2021-12-06 17:07:09 +02:00
rollup.go app/vmselect/promql: fix panic when calculating aggr_func(rollup*()) 2023-02-27 11:48:27 -08:00
rollup_result_cache.go app/vmselect/promql: prevent from cannot unmarshal timeseries from rollupResultCache panic after the upgrade to v1.89.0 2023-03-12 19:09:39 -07:00
rollup_result_cache_test.go vmselect/promql: enable search.maxPointsSubqueryPerTimeseries for sub-queries (#2963) 2022-08-24 15:25:18 +03:00
rollup_test.go app/vmselect/promql: add mad_over_time(m[d]) function 2023-02-11 01:06:20 -08:00
rollup_timing_test.go app/vmselect: use consistent randomizer in tests 2023-01-23 19:27:25 -08:00
timeseries.go app/vmselect/promql: prevent from SIGBUS crash on architecures, which deny unaligned access to 8-byte words (e.g. ARM) 2023-03-12 16:32:08 -07:00
timeseries_test.go app/vmselect/promql: add test to ensure 8-byte alignment (#3948) 2023-03-16 09:01:42 -07:00
transform.go fix interpolate function for filling only intermediate gaps (#3816) (#3857) 2023-02-22 18:38:43 -08:00
transform_test.go vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982) 2022-09-14 17:41:09 +03:00
tzdata.go all: add go:build lines for Go1.17 2021-07-26 15:48:21 +03:00