mirror of https://github.com/facebook/rocksdb.git
638d239507
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 |
||
---|---|---|
.. | ||
block.cc | ||
block.h | ||
block_based_filter_block.cc | ||
block_based_filter_block.h | ||
block_based_filter_block_test.cc | ||
block_based_table_builder.cc | ||
block_based_table_builder.h | ||
block_based_table_factory.cc | ||
block_based_table_factory.h | ||
block_based_table_reader.cc | ||
block_based_table_reader.h | ||
block_builder.cc | ||
block_builder.h | ||
block_prefix_index.cc | ||
block_prefix_index.h | ||
block_test.cc | ||
block_type.h | ||
cachable_entry.h | ||
data_block_footer.cc | ||
data_block_footer.h | ||
data_block_hash_index.cc | ||
data_block_hash_index.h | ||
data_block_hash_index_test.cc | ||
filter_block.h | ||
filter_block_reader_common.cc | ||
filter_block_reader_common.h | ||
flush_block_policy.cc | ||
flush_block_policy.h | ||
full_filter_block.cc | ||
full_filter_block.h | ||
full_filter_block_test.cc | ||
index_builder.cc | ||
index_builder.h | ||
partitioned_filter_block.cc | ||
partitioned_filter_block.h | ||
partitioned_filter_block_test.cc | ||
uncompression_dict_reader.cc | ||
uncompression_dict_reader.h |