PhysicalCoreID() is a major bottleneck
Open
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
In some use case, `PhysicalCoreID()` called from `recordTick()` is responsible for about 30% of the total CPU consumption of the application, and for even larger share of RocksDB's CPU consumption.
In our use case, just reverting #2258 helped. We don't call RocksDB from too many threads.
It would be nice to have an option to choose either process-local or thread-local stats.
Another approach that could satisfy all use cases is to stripe `StatisticsData` into NCPU * 4 (for example) parts, and update a randomly chosen one in `recordTick()`.
Contributor guide
Assessment
This issue has not been assessed yet.