From 05e301cfa0fd7f69f1554641d888b76437db1db8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 16 Mar 2021 21:51:17 +0200 Subject: [PATCH] app/vmselect/netstorage: reduce mutex contention when unpacking data on a system with high number of CPU cores --- app/vmselect/netstorage/netstorage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index ee244e490d..1cc8854907 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -299,7 +299,7 @@ func unpackWorker() { // unpackBatchSize is the maximum number of blocks that may be unpacked at once by a single goroutine. // // This batch is needed in order to reduce contention for upackWorkCh in multi-CPU system. -var unpackBatchSize = 8 * cgroup.AvailableCPUs() +var unpackBatchSize = 32 * cgroup.AvailableCPUs() // Unpack unpacks pts to dst. func (pts *packedTimeseries) Unpack(tbf *tmpBlocksFile, dst *Result, tr storage.TimeRange, fetchData bool, at *auth.Token) error {