From 46c98cd97a073e47a6f18f3228cb544db667cb24 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 5fb321c1f9..bc211a9922 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -71,7 +71,7 @@ func (rss *Results) Cancel() { rss.tbf = nil } -var timeseriesWorkCh = make(chan *timeseriesWork, gomaxprocs) +var timeseriesWorkCh = make(chan *timeseriesWork, gomaxprocs*16) type timeseriesWork struct { rss *Results @@ -169,7 +169,7 @@ type packedTimeseries struct { addrs []tmpBlockAddr } -var unpackWorkCh = make(chan *unpackWork, gomaxprocs) +var unpackWorkCh = make(chan *unpackWork, gomaxprocs*128) type unpackWork struct { tbf *tmpBlocksFile