Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22010

Enhance fidelity of ep-engine's LRU

    XMLWordPrintable

Details

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              owend Daniel Owen
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty