rocksdb/utilities
Maysam Yabandeh 638d239507 Charge block cache for cache internal usage (#5797)
Summary:
For our default block cache, each additional entry has extra memory overhead. It include LRUHandle (72 bytes currently) and the cache key (two varint64, file id and offset). The usage is not negligible. For example for block_size=4k, the overhead accounts for an extra 2% memory usage for the cache. The patch charging the cache for the extra usage, reducing untracked memory usage outside block cache. The feature is enabled by default and can be disabled by passing kDontChargeCacheMetadata to the cache constructor.
This PR builds up on https://github.com/facebook/rocksdb/issues/4258
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5797

Test Plan:
- Existing tests are updated to either disable the feature when the test has too much dependency on the old way of accounting the usage or increasing the cache capacity to account for the additional charge of metadata.
- The Usage tests in cache_test.cc are augmented to test the cache usage under kFullChargeCacheMetadata.

Differential Revision: D17396833

Pulled By: maysamyabandeh

fbshipit-source-id: 7684ccb9f8a40ca595e4f5efcdb03623afea0c6f
2019-09-16 15:26:21 -07:00
..
backupable Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
blob_db Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
cassandra Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
checkpoint Export Import sst files (#5495) 2019-07-17 12:27:14 -07:00
compaction_filters Comment out unused variables 2018-03-05 13:13:41 -08:00
convenience Auto roll logger to enforce options.keep_log_file_num immediately after a new file is created (#5370) 2019-05-31 10:50:19 -07:00
leveldb_options Change RocksDB License 2017-07-15 16:11:23 -07:00
memory Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
merge_operators New API to get all merge operands for a Key (#5604) 2019-08-06 14:26:44 -07:00
option_change_migration Avoid double-compacting data in bottom level in manual compactions (#5138) 2019-04-16 23:32:20 -07:00
options simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
persistent_cache Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
simulator_cache Charge block cache for cache internal usage (#5797) 2019-09-16 15:26:21 -07:00
table_properties_collectors Reduce the number of random iterations in compact_on_deletion_collector_test (#5635) 2019-07-26 15:53:34 -07:00
trace Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
transactions Refactor ArenaWrappedDBIter into separate files (#5801) 2019-09-13 13:50:43 -07:00
ttl Fix segfalut in ~DBWithTTLImpl() when called after Close() (#5485) 2019-06-20 13:08:17 -07:00
write_batch_with_index upgrade gtest 1.7.0 => 1.8.1 for json result writing 2019-09-09 11:24:11 -07:00
debug.cc Support GetAllKeyVersions() for non-default cf (#5544) 2019-07-07 22:43:52 -07:00
env_librados_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_librados.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_mirror.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_timed_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_timed.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
merge_operators.h New API to get all merge operands for a Key (#5604) 2019-08-06 14:26:44 -07:00
object_registry_test.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
object_registry.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
util_merge_operators_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00