-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24543: engine: pass rocksdb perf stats back to go r=petermattis a=tschottdorf Being able to see RocksDB-level perf counters in slow read operations can be helpful to diagnose issues such as #17229. Being able to see I/O slowness at the RocksDB level should be helpful to diagnose disk bottlenecking. This commit optionally enables collection of (a currently singleton subset) RocksDB performance counters on a per-iterator basis but makes it straightforward to add anything from the IO or PerfContext. Note that the RocksDB perf counters use TLS (thread-local storage). Iterators are usually created and used from goroutines, so they are not tied to a thread. To avoid this, the iterator holds a struct into which it accumulates the collected counters for each operation that takes place in C++. Compared to the overhead of crossing the cgo barrier in the first place, the added two conditionals seem negligible (and the branch predictor should do a good job on them). As a first cut, it prints the number of skipped RocksDB tombstones into the trace for scan operations. Was was tempted to make this event log automatic upon closing the iterator, but this would require passing a `context.Context` into `(Iterator).Close` as well as `NewIterator` which seemed potentially controversial. Release note: None Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
- Loading branch information
Showing
18 changed files
with
311 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.