Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.6.0
Description
The Least-Recently-Used field for each StoredValue in ep-engine is currently 2 bits, giving us only 4 possible values for how often an item has been used.
We should investigate what benefits (in terms of reducing Background fetches due to evicting the wrong items) we could gain by increasing the number of values the LRU can encode. Related is what algorithm we actually use - LRU or something smarter?
Related reading: memC3's CLOCK-based eviction
Suggestioned Approach
1. Implement a "perfect" recently used algorithm as a ideal baseline (e.g. use a monotonically incrementing "last_accessed_time" and always evict things which are the least accessed. Obviously this will have significant overheads, but can be used to determine an "idealised" BG-fetch quantity.
2. Run various workloads to simulate access patterns (random, sequential, revAB simulator, zipfain, ... others?), and measure the "ideal" bgfetch frequency and current 2-bit LRU behaviour.
3. Compare with other proposed algorithms.
Attachments
Issue Links
- relates to
-
MB-28044 Cache miss ratio increased in scenarios with a fixed working set and uniform access pattern
- Closed
-
MB-28373 Performance regression in "Delta recovery after graceful failover" (reb_recovery_100M_dgm_kv_delta_graceful)
- Closed
-
MB-28047 Ejection makes no progress for several minutes causing TMP OOM failures during data ingestion
- Closed
-
MB-11782 Adding Nodes To A Cluster Can Result In Reduced Active Residency Percentages
- Resolved
- links to