rocksdb/db/blob
Levi Tamasi 23376aa576 Improve the accounting of memory used by cached blobs (#10583)
Summary:
The patch improves the bookkeeping around the memory usage of
cached blobs in two ways: 1) it uses `malloc_usable_size`, which accounts
for allocator bin sizes etc., and 2) it also considers the memory usage
of the `BlobContents` object in addition to the blob itself. Note: some unit
tests had been relying on the cache charge being equal to the size of the
cached blob; these were updated.

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

Test Plan: `make check`

Reviewed By: riversand963

Differential Revision: D39060680

Pulled By: ltamasi

fbshipit-source-id: 3583adce2b4ce6e84861f3fadccbfd2e5a3cc482
2022-08-26 15:53:08 -07:00
..
blob_constants.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_contents.cc Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
blob_contents.h Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
blob_counting_iterator.h Log the amount of blob garbage generated by compactions in the MANIFEST (#8450) 2021-06-24 16:11:56 -07:00
blob_counting_iterator_test.cc Cleanup multiple implementations of VectorIterator (#8901) 2021-10-06 07:48:31 -07:00
blob_fetcher.cc Support readahead during compaction for blob files (#9187) 2021-11-19 17:53:47 -08:00
blob_fetcher.h Support readahead during compaction for blob files (#9187) 2021-11-19 17:53:47 -08:00
blob_file_addition.cc Print blob file checksums as hex (#8437) 2021-06-22 09:49:44 -07:00
blob_file_addition.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_addition_test.cc Print blob file checksums as hex (#8437) 2021-06-22 09:49:44 -07:00
blob_file_builder.cc Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
blob_file_builder.h Support prepopulating/warming the blob cache (#10298) 2022-07-17 07:13:59 -07:00
blob_file_builder_test.cc Support prepopulating/warming the blob cache (#10298) 2022-07-17 07:13:59 -07:00
blob_file_cache.cc Rename ImmutableOptions variables (#8409) 2021-06-16 16:51:38 -07:00
blob_file_cache.h Rename ImmutableOptions variables (#8409) 2021-06-16 16:51:38 -07:00
blob_file_cache_test.cc Have Cache use Status::MemoryLimit (#10262) 2022-07-06 14:41:46 -07:00
blob_file_completion_callback.h Fix LITE mode builds on MacOs (#8981) 2021-10-04 05:30:26 -07:00
blob_file_garbage.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_garbage.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_garbage_test.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_meta.cc Add BlobMetaData retrieval methods (#8273) 2021-06-28 08:13:29 -07:00
blob_file_meta.h Add BlobMetaData retrieval methods (#8273) 2021-06-28 08:13:29 -07:00
blob_file_reader.cc Fix build error due to uninitialized read_req (#10312) 2022-07-22 09:24:13 -07:00
blob_file_reader.h Enable blob caching for MultiGetBlob in RocksDB (#10272) 2022-06-30 13:24:35 -07:00
blob_file_reader_test.cc Enable blob caching for MultiGetBlob in RocksDB (#10272) 2022-06-30 13:24:35 -07:00
blob_garbage_meter.cc Add a class for measuring the amount of garbage generated during compaction (#8426) 2021-06-21 22:25:30 -07:00
blob_garbage_meter.h Add a class for measuring the amount of garbage generated during compaction (#8426) 2021-06-21 22:25:30 -07:00
blob_garbage_meter_test.cc Add a class for measuring the amount of garbage generated during compaction (#8426) 2021-06-21 22:25:30 -07:00
blob_index.h Remove local static string (#8103) 2022-08-05 23:03:51 -07:00
blob_log_format.cc Remove local static string (#8103) 2022-08-05 23:03:51 -07:00
blob_log_format.h Add a class for measuring the amount of garbage generated during compaction (#8426) 2021-06-21 22:25:30 -07:00
blob_log_sequential_reader.cc Add rate limiter priority to ReadOptions (#9424) 2022-02-16 23:18:14 -08:00
blob_log_sequential_reader.h Fix a issue with initializing blob header buffer (#8537) 2021-08-02 17:15:06 -07:00
blob_log_writer.cc WritableFileWriter tries to skip operations after failure (#10489) 2022-08-10 10:19:20 -07:00
blob_log_writer.h Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
blob_read_request.h Enable blob caching for MultiGetBlob in RocksDB (#10272) 2022-06-30 13:24:35 -07:00
blob_source.cc Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
blob_source.h Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
blob_source_test.cc Improve the accounting of memory used by cached blobs (#10583) 2022-08-26 15:53:08 -07:00
db_blob_basic_test.cc Reset blob value as soon as it's not needed in DBIter (#10490) 2022-08-09 11:39:57 -07:00
db_blob_compaction_test.cc Fix wrong value passed in compaction filter in BlobDB (#10391) 2022-08-11 13:55:28 -07:00
db_blob_corruption_test.cc Enable a few unit tests to use custom Env objects (#9087) 2021-11-08 11:05:59 -08:00
db_blob_index_test.cc Remove own ToString() (#9955) 2022-05-06 13:03:58 -07:00
prefetch_buffer_collection.cc Support readahead during compaction for blob files (#9187) 2021-11-19 17:53:47 -08:00
prefetch_buffer_collection.h Support readahead during compaction for blob files (#9187) 2021-11-19 17:53:47 -08:00