rocksdb/cache
Guido Tagliavini Ponce c277aeb42c Midpoint insertions in ClockCache (#10305)
Summary:
When an element is first inserted into the ClockCache, it is now assigned either medium or high clock priority, depending on whether its cache priority is low or high, respectively. This is a variant of LRUCache's midpoint insertions. The main difference is that LRUCache can specify the allocated capacity for high-priority elements via the ``high_pri_pool_ratio`` parameter. Contrarily, in ClockCache, low- and high-priority elements compete for all cache slots, and one group can take over the other (of course, it takes more low-priority insertions to push out high-priority elements). However, just as LRUCache, ClockCache provides the following guarantee: a high-priority element will not be evicted before a low-priority element that was inserted earlier in time.

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

Test Plan: ``make -j24 check``

Reviewed By: pdillinger

Differential Revision: D37607787

Pulled By: guidotag

fbshipit-source-id: 24d9f2523d2f4e6415e7f0029cc061fa275c2040
2022-07-06 18:28:35 -07:00
..
cache.cc Enable SecondaryCache::CreateFromString to create sec cache based on the uri for CompressedSecondaryCache (#10132) 2022-06-10 12:23:10 -07:00
cache_bench.cc Add (& fix) some simple source code checks (#8821) 2021-09-07 21:19:27 -07:00
cache_bench_tool.cc Clock cache (#10273) 2022-06-29 21:50:39 -07:00
cache_entry_roles.cc Account memory of FileMetaData in global memory limit (#9924) 2022-06-14 13:06:40 -07:00
cache_entry_roles.h Expose CacheEntryRole and map keys for block cache stat collections (#9838) 2022-04-14 09:38:55 -07:00
cache_entry_stats.h New stable, fixed-length cache keys (#9126) 2021-12-16 17:15:13 -08:00
cache_helpers.h Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
cache_key.cc Enhance new cache key testing & comments (#9329) 2022-02-04 14:15:58 -08:00
cache_key.h Fix key size in cache_bench (#10234) 2022-06-23 11:26:50 -07:00
cache_reservation_manager.cc Account memory of FileMetaData in global memory limit (#9924) 2022-06-14 13:06:40 -07:00
cache_reservation_manager.h Account memory of FileMetaData in global memory limit (#9924) 2022-06-14 13:06:40 -07:00
cache_reservation_manager_test.cc Have Cache use Status::MemoryLimit (#10262) 2022-07-06 14:41:46 -07:00
cache_test.cc Have Cache use Status::MemoryLimit (#10262) 2022-07-06 14:41:46 -07:00
clock_cache.cc Midpoint insertions in ClockCache (#10305) 2022-07-06 18:28:35 -07:00
clock_cache.h Midpoint insertions in ClockCache (#10305) 2022-07-06 18:28:35 -07:00
compressed_secondary_cache.cc Prevent double caching in the compressed secondary cache (#9747) 2022-04-11 13:28:33 -07:00
compressed_secondary_cache.h Prevent double caching in the compressed secondary cache (#9747) 2022-04-11 13:28:33 -07:00
compressed_secondary_cache_test.cc Enable SecondaryCache::CreateFromString to create sec cache based on the uri for CompressedSecondaryCache (#10132) 2022-06-10 12:23:10 -07:00
fast_lru_cache.cc Have Cache use Status::MemoryLimit (#10262) 2022-07-06 14:41:46 -07:00
fast_lru_cache.h Clock cache (#10273) 2022-06-29 21:50:39 -07:00
lru_cache.cc Have Cache use Status::MemoryLimit (#10262) 2022-07-06 14:41:46 -07:00
lru_cache.h Use optimized folly DistributedMutex in LRUCache when available (#10179) 2022-06-17 13:08:45 -07:00
lru_cache_test.cc Midpoint insertions in ClockCache (#10305) 2022-07-06 18:28:35 -07:00
sharded_cache.cc Update Cache::Release param from force_erase to erase_if_last_ref (#9728) 2022-03-22 10:22:18 -07:00
sharded_cache.h Update Cache::Release param from force_erase to erase_if_last_ref (#9728) 2022-03-22 10:22:18 -07:00