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
This commit is contained in:
Aliaksandr Valialkin 2022-10-17 18:17:42 +03:00
parent ae55ad8749
commit fb50730ba7
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -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 {