# SIEVE probe accounting: what the bound does and does not promise

Hesela research companion, 2026-11-01. This explains the existing eight-trace
packet; it introduces no new device measurement or population estimate.

**Result.** One sequential eviction may inspect C + 1 candidates even though
total eviction inspections from an empty cache are at most E + H at each
completed-request boundary. A cheap cache hit and an amortized bound do not
guarantee low latency for every miss.

## Counted operation and assumptions

A probe inspects one resident visited bit, including the final zero-bit
candidate selected for removal. Count E completed evictions and H hits.
C is capacity in equal-size entries. Admission is immediate and starts with a
clear bit. Requests are sequential; exclude concurrent hits, expiration,
external removals and non-mutating victim previews. These conditions describe
Algorithm 1 of the [NSDI 2024 paper](https://www.usenix.org/system/files/nsdi24-zhang-yazhuo.pdf),
section 3.1, printed page 1232. They are not a claim about every deployed cache.

## Conservation proof

Let V0 be the initially set resident bits, U the number of hit-driven
zero-to-one transitions, V the set resident bits remaining, and P total probes.

Each completed eviction performs exactly one final zero-bit inspection.
Each of its other inspections clears one set bit. Removal and admission
concern clear bits. Therefore the number of clearings is both P - E and
V0 + U - V:

    P = E + V0 + U - V <= E + H + V0

The inequality uses U <= H and V >= 0. Repeated hits to an already-set bit
increase H without increasing U. From empty, V0 = 0, giving P <= E + H.
With N requests and at most one eviction per miss under these assumptions,
E + H <= N. This is an operation-count statement, not CPU cycles or timing.

For a single eviction, at most C initially set bits can be cleared. A final
inspection finds a clear bit, so the bound is C + 1. In the retained capacity-3
trace ABCABCD, the last miss performs four probes. A warm start with one set
slot can similarly require two probes on its first measured miss despite
H = 0 and E = 1. The public verifier intentionally supports cold starts only.

## Why a passing total is insufficient

For capacity one, outcomes MHHMM cannot have eviction probe counts 2 then 2.
The two hits set only one bit; the first eviction clears it and admits a clear
replacement. No later hit supplies a second clearing. The verifier therefore
also tracks a feasible interval of visited-bit counts for every prefix.

It deliberately forgets object identities and pointer order. Passing is a
necessary accounting check, not full SIEVE conformance or an independent
replication of the earlier native-library comparison.

In the [pinned author artifact](https://github.com/cacheMon/NSDI24-SIEVE/blob/0861f8261c37b8286a70449a1defb5a4749c72d2/libCacheSim/libCacheSim/cache/eviction/Sieve.c),
Sieve_to_evict and Sieve_to_evict_with_freq preview a victim without clearing
visited bits or advancing the stored hand. Repeated previews can repeat work
without consuming clearing credits. Do not include preview inspections in P
while applying the eviction bound. This is source inspection, not a preview
throughput experiment.

## Reproduce the existing arithmetic

Download these four adjacent files into one directory:
[saved traces](sieve-traces.json), [summary](sieve-probe-budget.json),
[verifier](sieve-probe-budget.mjs), and [tests](sieve-probe-budget.test.mjs).
With Node.js supporting its built-in test runner:

    node --test sieve-probe-budget.test.mjs

The input's SHA-256 is
40133e721fec720254a2016dac352e6a30b35757d688dc5112903ea344324ae0.
The frozen input records its original generation time, 2026-10-17.
Tests check all eight rows, rejecting controls and an explicit small-state
accounting oracle. No dependency installation or cache-library build is needed.

The [glossary record](https://hesela.dev/terms/sieve-eviction/) supplies the
definition, caveats and related concepts; the
[Observatory analysis](https://hesela.com/analyses/sieve-cache-eviction-traces/)
compares the original constructed traces. These chosen witnesses are not a
random workload sample. Do not infer failure prevalence, confidence intervals,
hardware throughput or a universal policy ranking from their counts.
