lib/storage: increase the number of rawRowsShard shards on systems with more than 4 CPU cores

This should improve data ingestion scalability on systems with many CPU cores
This commit is contained in:
Aliaksandr Valialkin 2022-04-06 19:49:17 +03:00
parent 7bad7133bc
commit 57143e9435
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -65,7 +65,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() + 7) / 8
var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 3) / 4
// getMaxRawRowsPerShard returns the maximum number of rows that haven't been converted into parts yet.
func getMaxRawRowsPerShard() int {