{
  "slug": "s3-fifo",
  "term": "S3-FIFO",
  "aliases": [
    "S3FIFO",
    "S3 FIFO"
  ],
  "definition": "S3-FIFO is a cache replacement policy that combines small and main resident FIFO queues with a nonresident ghost queue.",
  "note": "The small queue tests newly fetched objects before main-queue retention. Ghost entries retain identity, not payload: a ghost match is still a miss, but directs the fetched object to main. Hits update access counters without moving objects immediately. [s3fifo]\n\nThe paper starts counters at zero and caps them at three. Small-to-main promotion requires two hits after insertion; main reinsertion needs one and spends a counter credit. The prose resets the counter on promotion, although that reset is absent from the corresponding pseudocode branch. [s3fifo]\n\nQuick demotion limits the time unpromising objects occupy probationary space; lazy promotion postpones ordering work until eviction. These mechanisms explain why a FIFO-based design is not equivalent to plain FIFO replacement. They do not establish a universal miss-ratio advantage over LRU. [qdlp]\n\nImplementation boundary: in the pinned author simulator, S3FIFO_can_insert accepts an object whose size equals the small queue's capacity, but the non-ghost branch of S3FIFO_insert rejects sizes greater than or equal to that capacity. A size check passing therefore does not guarantee insertion. This boundary belongs to that pinned implementation, not every S3-FIFO library. [artifact]\n\nThe linked transition examples distinguish promotion, ghost routing and bounded main-queue eviction work. They are constructed policy examples, not cache-trace measurements. [method]",
  "status": "research",
  "advantages": [],
  "limitations": [
    {
      "text": "Objects reused only after leaving the small queue can miss on their second request; short probation is workload-dependent. A ring-buffer implementation can also leave deleted slots unavailable until eviction reaches them.",
      "citationIds": [
        "s3fifo"
      ]
    }
  ],
  "related": [
    "fifo-replacement",
    "cache-admission",
    "ghost-cache-entry",
    "two-queue-replacement",
    "sieve-eviction",
    "tinylfu"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-07",
  "citations": [
    {
      "id": "s3fifo",
      "title": "Yang, Zhang, Qiu, Yue and Rashmi. FIFO Queues are All You Need for Cache Eviction. SOSP 2023, sections 4.1-4.2 and 5.2; DOI 10.1145/3600006.3613147.",
      "url": "https://jasony.me/publication/sosp23-s3fifo.pdf",
      "accessed": "2026-11-07"
    },
    {
      "id": "qdlp",
      "title": "Yang et al. FIFO can be Better than LRU: the Power of Lazy Promotion and Quick Demotion. HotOS 2023, sections 2-3; DOI 10.1145/3593856.3595887.",
      "url": "https://jasony.me/publication/hotos23-qdlp.pdf",
      "accessed": "2026-11-07"
    },
    {
      "id": "artifact",
      "title": "Author artifact S3FIFO.c, pinned commit 6bc49d9630572721b41cd08adfa982775f3cb1de: S3FIFO_can_insert and S3FIFO_insert.",
      "url": "https://github.com/Thesys-lab/sosp23-s3fifo/blob/6bc49d9630572721b41cd08adfa982775f3cb1de/libCacheSim/libCacheSim/cache/eviction/S3FIFO.c",
      "accessed": "2026-11-07"
    },
    {
      "id": "method",
      "title": "Hesela: existing S3-FIFO transition method, assumptions and executable examples.",
      "url": "https://hesela.dev/research/s3fifo-method.md",
      "accessed": "2026-11-07"
    }
  ],
  "provenance": [
    "Source review on 2026-11-07. A dedicated algorithm identifier supplements the existing FIFO record; its earlier evidence and numerical examples are retained. No new performance measurement is claimed.",
    "The equal-size insertion boundary is source inspection; the full simulator and its allocation path were not executed. [artifact]"
  ]
}
