{
  "slug": "3l-cache",
  "term": "3L-Cache",
  "aliases": [
    "3L Cache"
  ],
  "definition": "3L-Cache is an object-level learned eviction policy that reduces training and prediction work through selective history collection and bidirectional candidate sampling.",
  "note": "A gradient-boosted model predicts log next-arrival intervals. Candidates come from both older residents and recent arrivals; a heap and hash table retain predictions until invalidated by access, resampling or model refresh. [paper]\n\nThe byte-miss and object-miss variants are different configurations. In the pinned code, byte mode ranks predicted intervals plus request-counter offset; object mode multiplies predicted intervals by object size. The interface defaults to byte-miss-ratio. Comparing both metrics does not establish that one configuration optimizes both. [code] [interface]\n\nThe FAST 2025 study uses 4,855 traces, selected for more than ten million requests, with small and large capacities at 0.1% and 10% of each trace footprint. Simulator and HTTP prototype results describe different evaluation surfaces. [paper]\n\nThe paper defines CPU overhead as CPU load multiplied by time and distinguishes simulator replay from HTTP-prototype monitoring. A throughput-only comparison is not a substitute for that measurement. [paper]",
  "status": "research",
  "advantages": [],
  "limitations": [
    "A mean of paired throughput ratios and a ratio of summed elapsed times use different weights and can favor different policies. Neither measures CPU cost without matching CPU accounting; the arithmetic examples at https://hesela.dev/research/three-l-cache/aggregation.json are synthetic, not 3L-Cache benchmark results.",
    "Process CPU clocks exclude separate worker processes. Python RUSAGE_CHILDREN accounts for terminated, waited-for children, not a live worker tree; the measured scope and time boundary must accompany a CPU-cost comparison. [cpu-clock] [cpu-resource]",
    "CPU-load samples from unequal time intervals need duration weighting. Process and host-wide CPU percentages use different normalization; the first nonblocking percentage call is not measured idle time. The synthetic ledger at https://hesela.dev/research/three-l-cache/CPU_SAMPLING.md illustrates this instrumentation issue without attributing it to the paper. [cpu-percent]"
  ],
  "related": [
    "learning-relaxed-belady",
    "gl-cache",
    "sieve-eviction",
    "byte-hit-ratio"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-25",
  "citations": [
    {
      "id": "paper",
      "title": "Zhou et al. 3L-Cache: Low Overhead and Precise Learning-based Eviction Policy for Caches. FAST 2025, pp. 237-254, sections 4-5.",
      "url": "https://www.usenix.org/system/files/fast25-zhou-wenbin.pdf",
      "accessed": "2026-11-25"
    },
    {
      "id": "code",
      "title": "3L-Cache author implementation: prediction, lookup and train; commit 134cd159b635cdab75419a4281bed1a330fef31f.",
      "url": "https://github.com/optiq-lab/3L-Cache/blob/134cd159b635cdab75419a4281bed1a330fef31f/3LCache/TLCache.cpp",
      "accessed": "2026-11-25"
    },
    {
      "id": "interface",
      "title": "3L-Cache author interface: default objective and TLCache-OMR/BMR names; commit 134cd159b635cdab75419a4281bed1a330fef31f.",
      "url": "https://github.com/optiq-lab/3L-Cache/blob/134cd159b635cdab75419a4281bed1a330fef31f/3LCache/TLCache_Interface.cpp",
      "accessed": "2026-11-25"
    },
    {
      "id": "cpu-clock",
      "title": "Python 3.12 time: process_time and perf_counter measurement contracts.",
      "url": "https://docs.python.org/3.12/library/time.html#time.process_time",
      "accessed": "2026-11-25"
    },
    {
      "id": "cpu-resource",
      "title": "Python 3.12 resource: RUSAGE_SELF, RUSAGE_CHILDREN and CPU-time fields.",
      "url": "https://docs.python.org/3.12/library/resource.html#resource.getrusage",
      "accessed": "2026-11-25"
    },
    {
      "id": "cpu-percent",
      "title": "psutil API: process CPU percentage, first-call initialization and host-wide normalization.",
      "url": "https://psutil.readthedocs.io/stable/#psutil.Process.cpu_percent",
      "accessed": "2026-11-25"
    }
  ],
  "provenance": [
    "Full-paper and pinned-code review. No model training, production-trace replay or cache-performance replication was performed.",
    "The artifact review at https://hesela.dev/research/three-l-cache/README.md isolates plotting arithmetic; it does not reconstruct the published figures.",
    "A separate bounded native CPU-accounting observation is documented at https://hesela.dev/research/three-l-cache/CPU_ACCOUNTING.md; its process counters are not cache-performance measurements."
  ]
}
