From fb50730ba70ae9eb410398fd31086427e8d74e2d Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 17 Oct 2022 18:17:42 +0300 Subject: [PATCH] lib/storage: double the number of rawRows shards on multi-core systems This should increase data ingestion scalability on multi-core systems at the cost of slightly higher memory usage --- lib/storage/partition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/partition.go b/lib/storage/partition.go index 5687f23ba5..85568ee95b 100644 --- a/lib/storage/partition.go +++ b/lib/storage/partition.go @@ -64,7 +64,7 @@ const finalPartsToMerge = 3 // The number of shards for rawRow entries per partition. // // Higher number of shards reduces CPU contention and increases the max bandwidth on multi-core systems. -var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 3) / 4 +var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 1) / 2 // getMaxRawRowsPerShard returns the maximum number of rows that haven't been converted into parts yet. func getMaxRawRowsPerShard() int {