VictoriaMetrics/app/vmselect
Zakhar Bessarab 71044221f6
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-25 01:24:20 -07:00
..
bufferedwriter lib/netutil: move IsTrivialNetworkError() function there, since it is used in multiple places across the code 2023-01-27 13:24:44 -08:00
clusternative lib/vmselectapi: limit the number of concurrently executed requests 2023-01-06 18:39:46 -08:00
deployment Rootless docker images by default (#358) 2020-03-27 21:18:32 +02:00
graphite all: use metricsql.CompileRegexp instead of regexp.Compile for compiling regexps used in graphite queries 2023-01-09 21:45:34 -08:00
graphiteql Graphite vmalert wip (#112) 2021-02-01 15:28:30 +02:00
multiarch all: run apk update && apk upgrade in base Alpine Docker image in order to get all the recent security fixes 2023-02-09 14:03:02 -08:00
netstorage app/vmselect: optimize incremental aggregates a bit 2023-03-24 23:50:31 -07:00
prometheus app/vmselect: remove data race on updating EvalConfig.IsPartialResponse from concurrently running goroutines 2023-03-12 16:57:28 -07:00
promql app/vmselect/promql: use lock-less approach to gather results of parallel processing for evalRollup* funcs (#4004) 2023-03-25 01:24:20 -07:00
querystats app/vmselect: do not track queries with less than 1ms execution time at /api/v1/status/top_queries 2021-07-15 16:53:35 +03:00
searchutils app/vmselect/searchutils: accept partial RFC3339 values at time, start and end query args 2022-12-28 19:46:21 -08:00
static/css app/vmselect: properly serve static css for /select/.../metric-relabel-debug page 2022-12-10 03:04:43 -08:00
vmui app/vmui: UX enhancements for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3706 2023-02-09 11:05:57 -08:00
main.go all: follow-up for 7a3e16e774 2023-03-12 01:19:55 -08:00
Makefile app/{vminsert,vmselect,vmstorage}: add package-{vminsert,vmselect,vmstorage}-{goarch} Makefile rules for building arch-specific docker images 2022-10-07 20:17:01 +03:00
README.md app/vmselect: expose vmui at /vmselect/<accountID>/vmui/ instead of /vmselect/<accountID>/prometheus/vmui/ 2021-07-10 12:32:21 +03:00
vmui.go app/vmselect: follow-up after 820312a2b1 2023-01-11 23:37:51 -08:00

vmselect performs the following tasks:

  • Splits incoming selects to tasks for vmstorage nodes and issues these tasks to all the vmstorage nodes in the cluster.

  • Merges responses from all the vmstorage nodes and returns a single response.

The vmui directory contains static contents built from app/vmui package with make vmui-update command. The vmui page is available at http://<vmselect>:8481/select/<accountID>/vmui/.