{
  "slug": "shards",
  "term": "SHARDS",
  "aliases": [
    "Spatially Hashed Approximate Reuse Distance Sampling",
    "SHARDS sampling"
  ],
  "definition": "SHARDS estimates cache miss-ratio curves by hashing block identities into a sample and scaling their observed reuse distances.",
  "note": "Selection: at a fixed threshold, every reference to a selected block is retained. Sampling individual requests is not equivalent. Distances are scaled by 1/R, where R is the location-sampling rate. [shards-paper]\n\nMemory: a fixed rate does not bound tracked identities. Fixed-size SHARDS lowers its threshold, removes excluded identities and rescales earlier histogram counts. This rescaling is approximate, not exact removal of each discarded block's history. [shards-paper]\n\nInterpretation: the published LRU evaluation uses fixed-size blocks and treats reads and writes alike. Its capacity-averaged error is not a guarantee at every cache size or for a new workload. [shards-paper]\n\nOther policies: miniature simulations scale both the reference stream and cache capacity, then run the chosen policy. An LRU histogram alone does not predict ARC or LIRS behavior. [miniature]\n\nNormalization: N requests at location rate R give expected sample count N*R, not necessarily observed count Ns. SHARDSadj adds N*R-Ns to the first histogram bucket. Miniature simulations divide misses by N*R instead of Ns. This correction does not guarantee accuracy. [shards-paper] [miniature]\n\nConstructed example: A,A,B,B,A,A,B,B has 2/8 cold-start LRU misses at two slots. Keeping all references to A gives 1/4 at one slot; keeping every other request gives 4/4. This illustrates different sampling units, not SHARDS accuracy. [example]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "reuse-distance",
    "miss-ratio-curve",
    "kosmo"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-18",
  "citations": [
    {
      "id": "shards-paper",
      "title": "Waldspurger, Park, Garthwaite and Ahmad. Efficient MRC Construction with SHARDS. FAST 2015, pp. 95-110; sections 2.1-2.3, 3.3 and 4.3.",
      "url": "https://www.waldspurger.org/carl/papers/shards-fast15.pdf",
      "accessed": "2026-11-18"
    },
    {
      "id": "miniature",
      "title": "Waldspurger, Saemundson, Ahmad and Park. Cache Modeling and Optimization using Miniature Simulations. USENIX ATC 2017, pp. 487-498; sections 3.1-3.2.",
      "url": "https://www.usenix.org/system/files/conference/atc17/atc17-waldspurger.pdf",
      "accessed": "2026-11-18"
    },
    {
      "id": "example",
      "title": "Hesela. Constructed sampling-unit and request-normalization examples: exact LRU ledgers and explicit denominators.",
      "url": "https://hesela.dev/research/shards-sampling.json",
      "accessed": "2026-11-18"
    },
    {
      "id": "example-code",
      "title": "Hesela. Executable sampling-unit example (Node.js); run with --check to verify the accompanying JSON.",
      "url": "https://hesela.dev/research/shards-sampling.mjs",
      "accessed": "2026-11-18"
    }
  ],
  "provenance": [
    "Primary-source synthesis with a deterministic constructed illustration. No original traces, author implementation, performance benchmark or reproduction of published SHARDS error rates.",
    "Normalization follows FAST 2015 section 4.3.3 and ATC 2017 section 3.1.1. The nine-A/one-B illustration uses chosen samples, not a randomized accuracy evaluation."
  ]
}
