From d20c2156e48d80f5e783f079838ba8b168253e95 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 6 Aug 2020 17:22:10 +0300 Subject: [PATCH] app/vmselect/netstorage: reduce contention on unpackworkCh and timeseriesWorkCh for multi-CPU system by providing more capacity for these chans --- app/vmselect/netstorage/netstorage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index e8917e076..86c2f8c84 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -72,7 +72,7 @@ func (rss *Results) mustClose() { rss.sr = nil } -var timeseriesWorkCh = make(chan *timeseriesWork, gomaxprocs) +var timeseriesWorkCh = make(chan *timeseriesWork, gomaxprocs*16) type timeseriesWork struct { rss *Results @@ -167,7 +167,7 @@ type packedTimeseries struct { brs []storage.BlockRef } -var unpackWorkCh = make(chan *unpackWork, gomaxprocs) +var unpackWorkCh = make(chan *unpackWork, gomaxprocs*128) type unpackWork struct { br storage.BlockRef