A library that provides an embeddable, persistent key-value store for fast storage. http://rocksdb.org
Find a file
Yoshinori Matsunobu b23fc77aca Add per-block-type block read byte perf counters (#14473)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/14473

Add separate PerfContext byte counters for data, index, filter, compression-dictionary, and metadata block reads while preserving block_read_byte as the aggregate. Wire the new counters through the block fetch and multi-read data block paths, expose them via the C perfcontext API, and extend table tests to verify byte attribution and that the classified counters sum back to block_read_byte.

Reviewed By: xingbowang

Differential Revision: D97333746

fbshipit-source-id: 3411844d7fa9c76c9ff28af477b3a72a5d6e5d9b
2026-03-19 14:54:24 -07:00
.github stop using portable folly build for nightly job (#14391) 2026-02-26 12:43:28 -08:00
buckifier Update format-diff script to add text to new files (#14143) 2025-11-21 11:32:10 -08:00
build_tools Add CLAUDE.md and optimize tooling for claude code (#14293) 2026-02-03 05:53:50 -08:00
cache Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
claude_md Add claude md file for deprecated option removal (#14360) 2026-02-24 23:04:22 -08:00
cmake Fix zstd typo in cmake (#12309) 2024-02-22 14:39:05 -08:00
coverage internal_repo_rocksdb 2024-10-14 03:01:20 -07:00
db Add per-block-type block read byte perf counters (#14473) 2026-03-19 14:54:24 -07:00
db_stress_tool Add verify_manifest_content_on_close option (#14451) 2026-03-19 12:01:23 -07:00
docs Remove Support Ukraine banner from RocksDB website (#14463) 2026-03-17 10:15:24 -07:00
env Fix close(-1) on failed open in btrfs rename fsync path (#14443) 2026-03-13 12:26:44 -07:00
examples Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
file Fix missed condition variable signal in DeleteScheduler (#14442) 2026-03-10 10:26:45 -07:00
fuzz Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
include/rocksdb Add per-block-type block read byte perf counters (#14473) 2026-03-19 14:54:24 -07:00
java Support automated interpolation search (#14383) 2026-03-06 10:13:51 -08:00
logging Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
memory Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
memtable Fix finger.prev_[0] assertion failure in MultiGet finger search (#14465) 2026-03-17 09:57:24 -07:00
microbench Remove deprecated DB::Open raw pointer variants (and more) (#14335) 2026-02-17 23:33:39 -08:00
monitoring Add per-block-type block read byte perf counters (#14473) 2026-03-19 14:54:24 -07:00
options Add verify_manifest_content_on_close option (#14451) 2026-03-19 12:01:23 -07:00
plugin Add initial CMake support to plugin (#9214) 2021-11-30 17:16:53 -08:00
port Add injected error log ring buffer for fault injection diagnostics (#14431) 2026-03-11 18:15:04 -07:00
table Add per-block-type block read byte perf counters (#14473) 2026-03-19 14:54:24 -07:00
test_util Remove obsolete compression code and some .h->.cc movement (#14325) 2026-02-13 11:18:05 -08:00
third-party Fix tests broken by gtest upgrade (#13661) 2025-06-04 10:44:17 -07:00
tools Add verify_manifest_content_on_close option (#14451) 2026-03-19 12:01:23 -07:00
trace_replay propagate request_id from app -> Rocks -> FS (#13616) 2025-05-16 21:25:50 -07:00
unreleased_history Add verify_manifest_content_on_close option (#14451) 2026-03-19 12:01:23 -07:00
util Refactor MultiScan to use MultiScanIndexIterator (#14401) 2026-03-04 21:09:54 -08:00
utilities Fix TSAN data race in InjectedErrorLog by suppressing benign races (#14467) 2026-03-19 09:40:02 -07:00
wiki Add a new picking algorithm in fifo compaction (#14326) 2026-02-15 10:04:58 -08:00
.clang-format
.clang-tidy 2026 02 21 accelerate ci (#14368) 2026-02-24 04:47:32 -08:00
.gitignore Add Meta internal config file to gitignore (#13307) 2025-01-16 14:59:42 -08:00
.lgtm.yml
.watchmanconfig Added .watchmanconfig file to rocksdb repo (#5593) 2019-07-19 15:00:33 -07:00
AUTHORS
BUCK Fix TSAN data race in InjectedErrorLog by suppressing benign races (#14467) 2026-03-19 09:40:02 -07:00
ccache_msvc_compiler.bat Use ccache to accelerate windows build (#14064) 2025-10-20 10:37:08 -07:00
CLAUDE.md Add claude md file for deprecated option removal (#14360) 2026-02-24 23:04:22 -08:00
CMakeLists.txt Fix TSAN data race in InjectedErrorLog by suppressing benign races (#14467) 2026-03-19 09:40:02 -07:00
CODE_OF_CONDUCT.md Adopt Contributor Covenant 2019-08-29 23:21:01 -07:00
common.mk Clean up variables for temporary directory (#9961) 2022-05-06 16:38:06 -07:00
CONTRIBUTING.md
COPYING
crash_test.mk Add a cleanup target to crash_test.mk (#14286) 2026-02-03 12:22:09 -08:00
DEFAULT_OPTIONS_HISTORY.md Add Options::DisableExtraChecks, clarify force_consistency_checks (#9363) 2022-01-18 17:31:03 -08:00
Directory.Build.props Use ccache to accelerate windows build (#14064) 2025-10-20 10:37:08 -07:00
DUMP_FORMAT.md
folly.mk Prepare for 11.1.0 development (#14365) 2026-02-24 12:09:55 -08:00
HISTORY.md Prepare for 11.1.0 development (#14365) 2026-02-24 12:09:55 -08:00
INSTALL.md Require C++20 (#13904) 2025-08-28 16:59:16 -07:00
issue_template.md Add Google Group to Issue Template 2020-01-28 14:40:37 -08:00
LANGUAGE-BINDINGS.md Add python binding to LANGUAGE-BINDINGS.md (#13391) 2025-02-10 17:38:40 -08:00
LICENSE.Apache
LICENSE.leveldb
Makefile Fix TSAN data race in InjectedErrorLog by suppressing benign races (#14467) 2026-03-19 09:40:02 -07:00
PLUGINS.md Add encfs plugin link (#12070) 2023-11-14 07:33:21 -08:00
README.md Remove deprecated integration tests from README.md (#11354) 2023-04-07 16:52:50 -07:00
rocksdb.pc.in build: fix pkg-config file generation (#9953) 2022-05-30 12:46:40 -07:00
src.mk Fix TSAN data race in InjectedErrorLog by suppressing benign races (#14467) 2026-03-19 09:40:02 -07:00
thirdparty.inc
USERS.md Add Venice as a RocksDB user (#13179) 2024-12-05 12:09:44 -08:00
Vagrantfile
WINDOWS_PORT.md Update branch name in WINDOWS_PORT.md (#8745) 2021-09-01 19:26:39 -07:00

RocksDB: A Persistent Key-Value Store for Flash and RAM Storage

CircleCI Status

RocksDB is developed and maintained by Facebook Database Engineering Team. It is built on earlier work on LevelDB by Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)

This code is a library that forms the core building block for a fast key-value server, especially suited for storing data on flash drives. It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) and Space-Amplification-Factor (SAF). It has multi-threaded compactions, making it especially suitable for storing multiple terabytes of data in a single database.

Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples

See the github wiki for more explanation.

The public interface is in include/. Callers should not include or rely on the details of any other header files in this package. Those internal APIs may be changed without warning.

Questions and discussions are welcome on the RocksDB Developers Public Facebook group and email list on Google Groups.

License

RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.