facebook / facebook/rocksdb

PhysicalCoreID() is a major bottleneck

Open
#3,889 13 comments 1 reaction 1 assignee Claimed by @ajkr View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.