Go to file
Baptiste Lemaire e51be2c5a1 Improve MemPurge sampling (#8656)
Summary:
Previously, the `MemPurge` sampling function was assessing whether a random entry from a memtable was garbage or not by simply querying the given memtable (see https://github.com/facebook/rocksdb/issues/8628 for more details).
In this diff, I am updating the sampling function by querying not only the memtable the entry was drawn from, but also all subsequent memtables that have a greater memtable ID.
I also added the size of the value for KV entries in the payload/useful payload estimates (which was also one of the reasons why sampling was not as good as mempurging all the time in terms of L0 SST files reduction).
Once these changes were made, I was able to clean obsolete objects and functions from the `MemtableList` struct, and did a bit of cleanup everywhere.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8656

Reviewed By: pdillinger

Differential Revision: D30288583

Pulled By: bjlemaire

fbshipit-source-id: 7646a545ec56f4715949daa59ab5eee74540feb3
2021-08-13 14:35:41 -07:00
.circleci Add missing steps for cmake build (#8524) 2021-07-15 13:37:49 -07:00
.github/workflows
buckifier
build_tools Pass extra db_stress args to fbcode crash tests (#8587) 2021-07-27 12:46:47 -07:00
cache Fix a minor issue with initializing the test path (#8555) 2021-07-23 08:38:45 -07:00
cmake
coverage
db Improve MemPurge sampling (#8656) 2021-08-13 14:35:41 -07:00
db_stress_tool Memtable sampling for mempurge heuristic. (#8628) 2021-08-10 18:09:03 -07:00
docs Bump addressable from 2.7.0 to 2.8.0 in /docs (#8515) 2021-07-12 17:06:07 -07:00
env Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
examples
file Move old files to warm tier in FIFO compactions (#8310) 2021-08-09 12:51:14 -07:00
fuzz Make EventListener into a Customizable Class (#8473) 2021-07-27 07:47:02 -07:00
hdfs
include/rocksdb Improve MemPurge sampling (#8656) 2021-08-13 14:35:41 -07:00
java Move old files to warm tier in FIFO compactions (#8310) 2021-08-09 12:51:14 -07:00
logging Do not attempt to rename non-existent info log (#8622) 2021-08-04 17:25:00 -07:00
memory
memtable Improve MemPurge sampling (#8656) 2021-08-13 14:35:41 -07:00
microbench
monitoring Fix a minor issue with initializing the test path (#8555) 2021-07-23 08:38:45 -07:00
options Re-add retired mempurge flag definitions for legacy-options-file temporary support. (#8650) 2021-08-11 16:07:30 -07:00
plugin
port Standardize on GCC for TSAN conditional compilation (#8543) 2021-07-15 23:50:00 -07:00
table Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
test_util Make MergeOperator+CompactionFilter/Factory into Customizable Classes (#8481) 2021-08-06 08:27:25 -07:00
third-party
tools Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
trace_replay Code cleanup for trace replayer (#8652) 2021-08-12 09:22:43 -07:00
util Simplify GenericRateLimiter algorithm (#8602) 2021-08-09 16:47:15 -07:00
utilities Code cleanup for trace replayer (#8652) 2021-08-12 09:22:43 -07:00
.clang-format
.gitignore
.lgtm.yml
.travis.yml
.watchmanconfig
AUTHORS
CMakeLists.txt Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
DEFAULT_OPTIONS_HISTORY.md
DUMP_FORMAT.md
HISTORY.md Code cleanup for trace replayer (#8652) 2021-08-12 09:22:43 -07:00
INSTALL.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Minor Makefile update to exclude microbench as dependency (#8523) 2021-07-16 15:36:51 -07:00
PLUGINS.md
README.md
ROCKSDB_LITE.md
TARGETS Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
USERS.md
Vagrantfile
WINDOWS_PORT.md
appveyor.yml
defs.bzl
issue_template.md
src.mk Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
thirdparty.inc

README.md

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

CircleCI Status TravisCI Status Appveyor Build status PPC64le Build 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/master/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.

Design discussions are conducted in https://www.facebook.com/groups/rocksdb.dev/ and https://rocksdb.slack.com/

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.