Research notes / LSM read amplification
Bloom filters: optimize the lookup, not each filter
Updated / Literature review and executable examples
A filter's false-positive rate is not a database's lookup cost. With the same total memory, protecting small runs more strongly can reduce unnecessary probes. That mathematical result is not a promised latency improvement.
On this page26 sections
What a negative answer buys
A standard Bloom filter represents membership compactly. Insertion sets hashed bits; a query with any unset bit is absent, while all-set bits mean only possible membership. Properly inserted keys are not rejected by an intact filter. The original 1970 paper already motivates avoiding unnecessary disk accesses. [1, method 2]
A positive answer does not establish existence, freshness or integrity. The engine still checks the data. Nor does the no-false-negative property protect against corrupt filter bytes or mismatched insertion and query logic.
Sorted tables can contain older versions and deletion markers. Their immutable files are merged during compaction; this changes the files a read may need to consult. [5] In RocksDB, L0 files can overlap, whereas higher leveled sorted runs are partitioned across SST files. Do not equate one level with one file. [4]
A deletion marker may still be needed to suppress older values. See LSM tombstones and delete persistence for the difference between absence and reclamation.
Restart points change the work inside a block
A filter may avoid a block lookup; a restart point changes how keys are found within that block. Bigtable's original paper treats block compression, caching and Bloom filtering as separate refinements. Its measurements are historical, not a benchmark of today's engines. [Bigtable, sections 4, 6-7]
In LevelDB 1.23, a restart point stores a full key. Other entries can store only the suffix differing from the preceding key. The block's offset directory lets a reader find a reconstruction starting point. With a fixed interval of 16, a nonempty block of 128 entries has eight offsets plus one count: 4 * 8 + 4 = 36 bytes. An interval of 1 gives 4 * 128 + 4 = 516 bytes. This is directory overhead, not total block size; repeated key bytes, entry headers, values and the outer block trailer are separate. [BlockBuilder]
Seek binary-searches restart keys and then reconstructs forward; Next decodes the next entry. Prev instead revisits an earlier restart and scans forward to the predecessor. Reverse and forward iteration therefore need not do equal decoding work. Existing iterator position can also affect a seek. [Block::Iter]
The data-block default interval is 16, but the index block uses 1. kNoCompression disables the later whole-block codec, not key-prefix encoding. A restart is not an independent disk-read boundary inside compressed bytes. [Options] [TableBuilder]
Measurement consequence: report block-cache misses, decompression and key reconstruction separately from filter probes. Restart spacing is a space/search trade-off, not a latency prediction, and prefix encoding is not a prefix Bloom predicate. These conclusions follow from the pinned implementation; no new engine benchmark was run.
Front coding needs a complete byte ledger
Front coding stores a shared-prefix length and the remaining suffix. Bucket heads permit search without reconstructing the whole dictionary. [Compressed String Dictionaries, section 2.4]
Consider four bytewise-sorted keys, tenant:0001 through tenant:0004, with empty values. The keys total 44 bytes. Under the LevelDB 1.23 entry layout, every entry here has three one-byte lengths: shared prefix, suffix and value. The following exact accounting excludes the outer five-byte block trailer, other SSTable blocks and any whole-block codec. [BlockBuilder] [TableBuilder]
| Restart interval | Key bytes | Entry headers | Restart directory | Block total |
|---|---|---|---|---|
| 1 | 44 | 12 | 20 | 76 |
| 2 | 24 | 12 | 12 | 48 |
| 4 | 14 | 12 | 8 | 34 |
This raw-key BlockBuilder illustration omits internal-key tags: normal database keys add an eight-byte sequence/type tag. It is not the size of an SSTable produced by DB::Put. [InternalKeyEncodingLength]
At interval 2, key storage falls to 24 bytes, but the block totals 48. At interval 4, it totals 34. Comparing only the suffixes with 44 raw key bytes would omit the framing needed to decode them. These are constructed byte counts, not a database compression ratio or latency measurement.
Prefix lengths are bytes. For example, UTF-8 keys with hex bytes c3 a9 and c3 aa share one byte, even though their Unicode characters differ. The suffix aa is not standalone UTF-8; reconstruct the key before interpreting it as text. Reproduce the accounting with the CC0 module and tests using node --test front-coding.test.mjs.
The original LevelDB 1.23 block builder and reader confirmed all 658 constructed test cases: complete block bytes, sequential decoding and seeking each inserted key. Cases cover empty blocks, partial restart groups, UTF-8 and length fields crossing 127/128 and 16383/16384 bytes. This checks raw blocks with empty values, not database writes, disk I/O or performance. The reproduction instructions, native probe, comparison driver and result receipt make the finite scope explicit.
Learned filters need complete backup coverage
A learned Bloom filter first asks a classifier whether a key may be present. The classifier can reject stored keys, so a backup Bloom filter must contain every such key. A negative is safe only when both stages reject and this coverage holds. Classifier accuracy alone does not supply the membership guarantee. [Kraska et al., section 5.1.1]
For a fixed stored set K, model f and threshold t, the backup must represent every x in K for which f(x) < t. The fraction of stored members needing backup is not the classifier-positive fraction of absent queries: the denominators differ.
Query drift changes cost; broken coverage changes correctness
Among queries for absent keys, let a be the fraction accepted by the classifier. Let b be the backup-positive fraction conditional on classifier rejection. Then the overall false-positive rate is:
FPR = a + (1 - a) * b
If no absent queries reach the backup, the classifier already accepts all of them: FPR is 1, and b need not be defined.
This conditional decomposition does not assume independent stages. A changed absent-query distribution can change these fractions while stored keys remain covered. A held-out estimate is not a guarantee for later queries. Compare model bytes plus backup bytes at the same total budget, and measure inference and lookup costs separately. [Mitzenmacher, sections 3-4]
For illustration, the existing exact hypothetical examples hold b at 2%: a of 1% gives 2.98% overall, while a of 10% gives 11.8%. These are probability calculations, not measured workloads. The reproducible model and tests also show why multiplying marginal stage rates can be wrong.
In a sandwiched design, an initial Bloom filter covers all stored keys before the classifier and backup. Rates for later stages must be conditioned on reaching them, unless a justified probabilistic model permits a simpler product. Extra filtering and model memory do not establish a latency improvement. [Mitzenmacher, section 5]
Engineering inference: validate and publish the stored set, input encoding, model, threshold and backup as one compatible generation. Changing any of them can change which keys need coverage. Reusing an old backup after replacing the classifier can therefore lose the guarantee even if the new model scores better on a test set. This is a consequence of the invariant, not a reproduced deployment failure.
Daisy filters: count the right denominator
A Daisy Bloom filter varies the number of bit probes by key, using input and query probabilities. Some keys get zero probes and always return positive. The SWAT 2024 paper preserves inserted-key membership, but Definition 1 bounds false-positive probability mass across all queries, not just absent queries. [75, definition 1 and section 1.1]
For a fixed stored set, write a = Pr(query is absent) and e = Pr(query is absent and filter says positive). When a > 0, the conditional false-positive rate is e / a. If every query is present, that conditional rate is undefined, not zero. RocksDB's point-lookup statistic uses the absent-query denominator. [3, Statistic]
| Workload | A count | B count (FP) | C count (TN) | FP / all queries | FP / absent queries |
|---|---|---|---|---|---|
| All queries absent | 0 | 1 | 999 | 0.1% | 0.1% |
| Mostly present queries | 990 | 1 | 9 | 0.1% | 10% |
| More queries for B | 990 | 9 | 1 | 0.9% | 90% |
The first two rows both report 0.1% across all queries, yet their absent-query rates differ by 100 times. The last row changes the query mix, not the stored set or filter answers. This is denominator arithmetic, not execution of the Daisy construction or a counterexample to its theorem. Download the executable count model.
Scope matters: the theorem assumes independent input draws from P and a query distribution Q satisfying sum(p_x * q_x) <= epsilon / n. Its guarantee holds with high probability over input sets. Daisy uses at most ceil(log2(1/epsilon)) probes; the paper's constant-time filter is a different construction. Oracle storage is excluded from the analysis. [75, page 9:3 and theorems 3-4]
The overlap assumption also limits hit-heavy workloads. A union-bound consequence of that model is E[Pr(query is present)] <= n * sum(p_x * q_x) <= epsilon, where the expectation is over sampled input sets. Thus the hit-heavy rows above illustrate denominator arithmetic, not typical inputs from the theorem's low-overlap model. This is a derived implication of the stated sampling assumptions, not an additional empirical result.
For an engine comparison, report both denominators, query mix, probability-estimator memory and lookup cost. Do not equate a query-weighted error budget with a per-key guarantee or a latency result.
Stable and counting filters make different promises
A stable Bloom filter deliberately forgets history. Deng and Rafiei's SIGMOD 2006 method probes counters, decrements selected cells, then resets the incoming key's cells to a maximum. Its stable occupancy is not permanent membership or a user-selected sliding window. Previously seen keys can return negative. [29, algorithm 1 and section 7]
The paper evaluates URL fingerprints and synthetic streams, not SST reads. Its implementation decrements adjacent cells after choosing a random start, while algorithm 1 specifies uniformly selected distinct cells. Neither is a time-to-live clock. [29, sections 5.1-5.2]
There is nevertheless a short-gap guarantee. A cell loses at most one per update, and updating happens even when the query reports a duplicate. Immediately after insertion, each of the key's cells equals Max; after g intervening updates, each is at least max(0, Max - g). Thus fewer than Max intervening updates cannot make that key negative. With Max=3, two intervening updates cannot erase it, but three can. Collisions can refresh its cells and retain it much longer: this lower bound is not a fixed expiry time. These are consequences of the update rule, not measured recall rates or a storage benchmark. [29, algorithm 1]
Implementation scope matters: the pinned PowerDNS implementation uses Max=1 and clears adjacent cells; Max=3 above is not its configuration. With Max=1, the bound protects an immediate repeat with zero intervening updates, not survival through even one intervening update. This is source inspection and deduction, not a measured deployment error rate. [36, stableBF]
Our engineering inference: do not use a negative from a forgetting filter to skip an authoritative SST that can still contain the key. Skipping a redundant crawl and hiding a stored value have different consequences. The allocation model below assumes filters that preserve their run's keys; a lower false-positive rate alone cannot justify this substitution.
Deletion needs accounting; counters need an overflow policy
A counting Bloom filter increments cells on insertion and decrements them on deletion. Exact counts preserve a colliding live key when another is removed. A positive lookup cannot authorize deletion of an unknown key. Fan and colleagues' Summary Cache paper explicitly warns that clipping a full counter can later produce a false negative after deletions. [30, section V-C]
That paper's small overflow-probability argument is not a guarantee for arbitrary repeated insertions. Rejecting overflow, rebuilding, or keeping saturated cells permanently positive have different costs. The last policy sacrifices eventual negative answers until a rebuild; it must not be confused with clipping and then decrementing normally.
Six controlled state traces
These are original, deterministic examples, not measured error rates. Each starts with four zero cells. The stable traces map A to (0, 1) and B to (2, 3), use maximum 1 and decrement one specified cell per update. The counting traces deliberately map both keys to (0, 1) and use maximum 3. All addresses are zero-based and distinct within an operation.
| Trace | Final cells | Exact expectation | Lookup | Meaning |
|---|---|---|---|---|
| Stable: decay A's cell while inserting B | [0, 1, 1, 1] | A occurred earlier | Negative | Forgotten history; false negative |
| Stable: 20 updates decay only B's cell | [1, 1, 1, 1] | A occurred earlier | Positive | A remains; no fixed expiry |
| Counting: insert colliding A and B; delete B | [1, 1, 0, 0] | A is still live | Positive | Correct update accounting |
| Counting: insert A; delete absent colliding B | [0, 0, 0, 0] | A is still live | Negative | Invalid deletion loses A |
| Cap at 3: four adds of A, three deletes | [0, 0, 0, 0] | One insertion remains | Negative | Saturation loses multiplicity |
| Sticky at 3: four adds of A, four deletes | [3, 3, 0, 0] | No insertion remains | Positive | Conservative false positive |
The first row forgets A after one intervening insertion. In the second, repeatedly selecting only B's cell leaves A positive after 20 updates. These chosen paths establish possibility, not their probability. The fifth row loses a remaining insertion because four additions were recorded as three; the sixth never decrements a saturated cell and therefore stays positive even after all four deletions.
Reproduce using the CC0 state module and generator: place them together and run node generate-filter-retention.mjs. The JSON receipt records the source hash, runtime and generation time. No random seed is needed: the schedules are explicit. This is not a production filter, a paper-benchmark reproduction, or an estimate of FPR, FNR or retention time.
Quotient filters: exact fingerprints, approximate keys
A quotient filter retains a fingerprint as a quotient and remainder. Metadata recovers the quotient when collisions shift a remainder away from its home slot. Matching a whole fingerprint can still confuse different keys. [55, section 3]
The counting quotient filter packs variable-sized counts into this representation. Its rank-and-select metadata improves run location; it does not make arbitrary keys collision-free. Resizing changes the quotient/remainder split, not the retained hash width. [60, sections 3-4]
Native check: a larger table does not separate these keys
We compiled the unchanged author library at 68939f587b0f, using its default hash, seed zero, 10-bit fingerprints and one thread. A deterministic search selected raw integer keys A = 0 and B = 1044 with the same fingerprint. This intentionally chosen collision is not a false-positive-rate estimate.
| Operation history | Exact live counts | CQF answer |
|---|---|---|
| Insert A five times, then B twice | A: 5; B: 2 | 7 for either |
| Resize from 64 to 128 slots | A: 5; B: 2 | 7 for either |
| Remove the five A insertions | A: 0; B: 2 | 2 for B |
| Reset; insert A once; remove absent B once | A: 1; B: 0 | 0 for A |
The last row deliberately violates the deletion precondition. It shows why an approximate positive must not authorize removal. Keep exact update accounting outside the filter. The noncolliding absent-key control leaves A unchanged. Matched A and B removals correctly empty the fingerprint.
Check the executable API, not just the README
At this revision, removing a count of zero leaves the count at 5, despite the README describing zero as deleting everything. qf_delete_key_value removes all stored multiplicity in our check. The noncolliding absent removal returns -1, not the header-documented -3. These are version-specific observations confirmed against source. [61, README, gqf.h and gqf.c]
Whole-counter deletion is different: the pinned qf_delete_key_value reads the approximate count before removing it. In default-hash mode that count belongs to the fingerprint/value pair, not necessarily one original key. A colliding live key can share that count. Use a decrement bounded by the intended key's known outstanding insertions. This is a source-derived qualification, not an additional native experiment. [61, gqf.c, lines 1982-2053]
Replay the C harness with the Python runner and method and build instructions. The native receipt records source hashes and three passing builds: unoptimized, optimized, and optimized with standard assertions disabled. The harness checks remain active.
Scope: this is a small native state-transition check, not a reproduction of either paper's benchmark or a test of concurrency, durability, SSD I/O or production capacity. The library's invertible-hash mode for bounded keys has a different contract. [61, hash modes]
SILT: a location index can leave membership unresolved
SILT combines a writable LogStore, intermediate HashStores and a compact SortedStore. Its entropy-coded trie locates stored keys but can also return a position for an absent key. The last store omits a membership filter, accepting a final read instead. Its roughly 0.7-byte-per-entry headline describes the combined design, not a Bloom filter. The paper assumes fixed-length records and uniformly hashed keys. [34, sections 2-3]
The authors' implementation checks the retrieved full key after locating a candidate block. A mismatch continues the search; it does not return that record's value. [35, Get]
Four records, 256 possible queries
Our constructed example stores byte keys 0, 64, 128 and 192 in that order. The first two bits select a slot; the remaining six bits are ignored by the locator. Each stored key has a unique slot, yet many absent keys reach the same slots. Comparing the complete retrieved key resolves membership.
| Query | Prefix | Slot | Key | Match |
|---|---|---|---|---|
| 0 | 00 | 0 | 0 | Yes |
| 1 | 00 | 0 | 0 | No |
| 63 | 00 | 0 | 0 | No |
| 64 | 01 | 1 | 64 | Yes |
| 65 | 01 | 1 | 64 | No |
| 128 | 10 | 2 | 128 | Yes |
| 192 | 11 | 3 | 192 | Yes |
| 255 | 11 | 3 | 192 | No |
Across all 256 possible byte queries, 4 are present and 252 are absent. Treating a returned slot as success would falsely accept all 252 absent queries in this particular construction. Full-key comparison rejects them all. These counts are not a measured SILT error rate, an entropy-compression result or a workload forecast.
Reproduce the census with the CC0 module and exhaustive tests. Place both files together and run node --test prefix-locator.test.mjs. No random seed or external package is needed.
For read accounting, separate locating a candidate, verifying its key and reading its value. The earlier allocation model optimizes avoidable probes on absent queries; it does not describe every compact index. An unfiltered terminal store can impose a read even when all earlier filters correctly reject the query. Count that read explicitly before comparing designs.
Recovery is another boundary: the paper's asynchronous updates can return before durable storage; synchronous completion is proposed separately.[34, section 4] A low read count does not establish an equivalent write-acknowledgement guarantee.
A positive Cuckoo lookup is not permission to delete
A Cuckoo filter stores short fingerprints in candidate buckets. It can delete an inserted item, unlike a standard bit-array Bloom filter. This capability has a precondition: the caller must know that an outstanding insertion exists. Looking up the same key in the filter cannot establish that fact. The original paper states this restriction explicitly. [20, section 3]
Redis also warns that deleting an item not previously added can create false negatives. Its CF.ADDNX documentation separately warns that a fingerprint match can suppress a genuinely new insertion. [22] [23] These are documented API conditions, not a new vulnerability claim.
Bucket arithmetic must survive a round trip
The two candidate buckets must remain the same after relocation. Fan and colleagues use XOR so the stored fingerprint can recover the alternate location without the original key. Applying that mapping twice must return to the starting bucket. [20, section 3.1] The pinned library enforces a power-of-two bucket count and masks the result; its lookup code asserts the round-trip identity. [21, constructor, IndexHash and Contain]
Boskov and colleagues investigate a modified implementation that permits other bucket counts. XOR followed by modulo need not preserve the pair, so relocation can put a fingerprint where its query will not look. Their reported rates belong to that modified experiment, not to every cuckoo filter. [41, sections 3-4]
For a small arithmetic counterexample, take six buckets, starting index 3 and fingerprint-hash value 5. The first step gives (3 XOR 5) mod 6 = 0; the return step gives (0 XOR 5) mod 6 = 5, not 3. A fingerprint moved from bucket 0 to bucket 5 has left its original lookup pair, 3 and 0. If neither queried bucket contains another matching fingerprint, lookup is negative. With eight buckets, the same values travel from 3 to 6 and back to 3.
This is an exact calculation, not a defect demonstrated in the unmodified library or a measured error rate. For a power-of-two count, the mask retains exactly the bucket-index bits, and XOR with the same value twice cancels. Changing the bucket count or range reduction therefore needs a proof or test of this round trip; changing only the modulo divisor is unsafe. Other reversible constructions require their own analysis.
A controlled collision in the reference library
We compiled the authors' library at commit 917583d6, leaving its implementation unchanged and injecting an identity test hasher through its template interface. Keys A = 7 and B = 65543 have distinct full hashes but the same 16-bit fingerprint, 7, and candidate buckets 0 and 1. Key C = 8 has a different fingerprint. This deliberately chosen fixture establishes possible behavior, not a collision frequency.
| Operations | Key that should remain | Final lookup | Interpretation |
|---|---|---|---|
| Insert A; delete absent B | A | Negative | False negative: absent deletion |
| Insert A; skip B on positive; delete A | B in the application's set | Negative | Missing representation after skipped insertion |
| Insert A and B; delete A once | B | Positive | Correct: one fingerprint remains |
| Insert A and B; delete A twice | B | Negative | False negative: repeated deletion |
| Insert A; delete absent C | A | Positive | Control: unmatched delete returns NotFound |
The third row is the control: keeping both insertions makes one legitimate deletion safe even though the fingerprints collide. A lookup for the deleted A still returns positive because B remains. That expected false positive does not authorize a second deletion. The fourth row demonstrates the consequence of replaying the deletion without tracking its earlier success.
The second row exposes an insertion-side shortcut: the application admits B to its real set but skips its filter insertion after a positive lookup. Deleting A later removes B's only apparent representation. This is our application-level trace using the reference library, not an execution of Redis CF.ADDNX.
Eight slots do not mean eight acknowledgements
In this pinned implementation, constructor argument 4 creates two four-slot buckets. Our separate repeated-key test gets 9 successful inserts, while Size() reports 8. The ninth fingerprint lives in a one-entry victim cache; the tenth Add returns NotEnoughSpace. After one deletion moves the victim into the table, Size() is still 8. Read operation statuses and implementation semantics, not just a size counter. This is not a universal Cuckoo-filter capacity rule. [21, AddImpl, Contain, Delete and Size]
Engineering consequence: maintain exact insertion/deletion accounting outside an approximate filter. Do not turn a possible match into a deduplication or retry decision. Keep that accounting consistent with the authoritative data under concurrency and recovery. Our sequential test does not establish a transaction protocol; see uncertain completion and retries for that separate boundary.
Reproduce the six scenarios using the instructions, C++ harness and runner. The JSON receipt records the commit, source hashes, compiler, flags, fixture and results. No default-hash FPR, latency, SSD behavior or paper-benchmark replication is claimed. The filter is in memory; no storage devices are modified.
XOR and binary fuse filters: static does not mean exact
An XOR filter builds a shared fingerprint array for a complete key set. A query compares its fingerprint with the XOR of three array entries. Construction peels keys with a uniquely used slot, then assigns values in reverse order. An unsuccessful peel triggers another hash choice; it is not a query result. [24, section 3]
A binary fuse filter places each key's locations in consecutive segments, improving construction locality and reducing space overhead. It still needs the full set at build time. The paper compares three- and four-location variants; its benchmarks are single-threaded and exclude disk and network I/O. [25, sections 3-5]
Hesela's engineering inference: an immutable SST is a plausible lifetime boundary for such a filter, but a mutable database is not one immutable set. Keep each filter bound to the data generation it represents. Do not substitute a failed or stale build for an absence result.
Six slots expose two unsafe shortcuts
Our synthetic example chooses addresses and byte fingerprints explicitly. It is an equation demonstration, not an implementation of hashing or a reproduction of either paper's benchmark. A, B and C use slot triples (0, 2, 4), (0, 3, 5) and (1, 2, 5), with fingerprints 5, 9 and 12. Singleton peeling removes C, A, B; reverse assignment produces the array [9, 0, 12, 0, 0, 0].
| Array state | A | B | C | D |
|---|---|---|---|---|
| Original build | Positive | Positive | Positive | Not tested |
| Clear shared slot 0 | Negative | Negative | Positive | Not tested |
| Patch slot 1 for D | Positive | Positive | Negative | Positive |
Clearing shared slot 0 in an attempt to delete A also rejects B, whose equation still needs that slot. Starting afresh, patching slot 1 to 7 makes a new D match (slots 1, 3, 4; fingerprint 7) but changes C's result from 12 to 11. Both shortcuts break a key that should remain represented. These are deliberately unsupported operations, not defects in a library.
A stalled peel is not proof of inconsistency
A second constructed system uses triples (0, 2, 4), (0, 3, 5), (1, 2, 5), (1, 3, 4) and fingerprints 1, 2, 4, 7. Every slot occurs twice, so no singleton exists and our peel stops before assigning a filter. Yet the explicit array [0, 0, 0, 6, 1, 4]satisfies all four equations. The test distinguishes failure of this construction method from absence of any mathematical solution.
Reproduce with the CC0 equation module and generator: place both together and run node generate-xor-equations.mjs. The JSON receipt records inputs, arrays, each check, runtime and source hash. No random sampling is used; these rows estimate neither false-positive probability nor construction-retry frequency.
ZOR: continuing a stalled build needs a second membership path
ZOR, presented at SEA 2026, continues a blocked peel by retaining one incident key and abandoning the others at a selected cell. Pure ZOR can miss members. The complete design stores missed abandoned keys in an auxiliary and accepts either match. That auxiliary is part of correctness, not just a speed optimization. The reported complete design pays additional negative-query cost; pure and complete benchmark bars have different semantics. [ZOR, sections 2.2-2.9 and 3]
Engineering inference: deterministic progress in the main stage does not establish a bounded construction contract for a separately chosen auxiliary builder. Preserve and validate both parts together.
A small remainder does not weight every absent query
For any two membership predicates on the same absent-query population, P(main or auxiliary) = P(main) + P(auxiliary) - P(both). The independent-error expression subtracts the product only when that independence is justified. Without it, the sum is an upper bound. The fraction of stored keys sent to the auxiliary is not a query probability: almost every true negative can reach that second path.
| Positive-set relation | Overlap | Combined positives | Combined fraction |
|---|---|---|---|
| Identical positives | 256 | 256 | 256/65536 |
| Independent byte coordinates | 1 | 511 | 511/65536 |
| Disjoint positives | 0 | 512 | 512/65536 |
The same component rates permit different combined rates. The independent row is constructed from all ordered byte pairs, testing a zero first or second byte; its intersection contains exactly one pair. The identical and disjoint rows use explicitly chosen sets. These illustrate event accounting, not ZOR's measured error or a criticism of its reported results.Exact count module and enumeration tests run together with node --test filter-union.test.mjs.
Budget construction separately
The pinned FastFilter README assumes distinct 64-bit input values and recommends budgeting about 24 temporary bytes per entry during binary-fuse construction. That implementation estimate is not the finished filter's bytes per key or a measured process peak. Its serialization formats also assume matching byte order. [26, input contract, memory and serialization]
Our deployment checklist: validate input normalization, handle build failure, verify all members before publication, test serialized round trips, and publish data and filter as one versioned pair. This is a proposed integration discipline, not a claim that we tested a database or a production filter.
VT-tree: skipping copies changes filter maintenance
The VT-tree reuses eligible nonoverlapping block spans through index pointers. Overlapping blocks still need merging. Rebuilding a membership filter by rereading every key would undermine this saving. [54, section 3.1]
A quotient filter can enumerate stored fingerprints and merge compatible filters without original keys. These are hashes, not recoverable records. [55, section 3] From Bloom's bit-setting rule, identical sizes and hash mappings allow bitwise-OR union, but this cannot recover keys or build an arbitrarily configured filter. [1, method 2]
The authors' presentation makes the trade-off explicit: a smaller stitching threshold preserves more blocks but can worsen scan locality, and cleaning still relocates live data. Its isolated stitching experiment excludes transactions. [56, slides 6-7, 16-17 and 22] Do not read those results as full-stack transaction latency. The paper's sections 4.1-4.3 also ran without defragmentation; cleaning was evaluated separately. [54, section 4]
For an engineering comparison, report merge-copy bytes, filter-maintenance work, later cleaning and scan reads separately. A lower immediate write count alone does not establish a lower total cost. This is a measurement recommendation, not a reproduced VT-tree benchmark.
Compaction changes the lookup's candidate runs
LSM compaction reorganizes sorted data and can remove obsolete versions when visibility rules allow. It is not compression, and a snapshot can keep an older version necessary. Some nonoverlapping files can move between levels without a rewrite. [18] [14]
The filter-allocation model below holds its runs fixed. A compaction policy changes those runs, so its results alone cannot choose a policy. RocksDB's taxonomy describes the following trade-offs, not universal performance multipliers. [14]
| Policy | Organization | Trade-off to measure |
|---|---|---|
| Leveled | In RocksDB, each nonzero level is one run split into nonoverlapping key ranges; L0 may contain overlapping runs. | Usually fewer candidate runs and lower retained-space overhead, paid for with more rewriting; update skew changes the cost. |
| Tiered | Accumulate runs, then merge groups into a typically larger run. RocksDB Universal is one implementation in this family. | Usually less rewriting, but more runs to search and more space between merges; peak merge space needs separate measurement. |
L0 is why RocksDB's Level policy is a hybrid, not a guarantee of one run at every level. Universal selects runs consecutive in age order, and its output can span multiple files. Treating a run as a file gives the wrong account of both read candidates and metadata. [4] [15]
Lazy leveling: keep the bottom compact, count the other runs
Lazy leveling tiers the smaller levels and levels the largest. Dostoevsky's point-lookup argument depends on optimized Bloom filters; short scans still pay to start across more runs. Its evaluation used an HDD RAID, not a current NVMe service.[Dostoevsky, sections 4-5]
Fluid LSM-tree generalizes this with independent caps K and Z. The original paper allows Z greater than one; restricting Z to one describes only part of its design space. [section 4.2, Figure 8]
For our arithmetic example, L is the number of disk levels, K caps each of the first L - 1 levels, and Z caps the last. At all caps the total is (L - 1) * K + Z. The table fixes L = 4 and size ratio T = 10. The intermediate row is an illustrative choice, not an optimizer result.
| Policy | K | Z | Total runs |
|---|---|---|---|
| Classic leveling | 1 | 1 | 4 |
| Lazy leveling | 9 | 1 | 28 |
| Tiering | 9 | 9 | 36 |
| Intermediate | 3 | 2 | 11 |
Thus the lazy example allows 28 runs, versus 4 for classic leveling. That is seven times the run count, not seven times the latency. Partial occupancy, key-range exclusions and cached data can all change work done by a query. A sorted run can span several SSTs, and RocksDB's actual L0 is not the one-run-per-level abstraction.[14]
Recompute the table with the counting module and tests. Before choosing a policy, measure the application's short scans as well as point lookups and ingest. This count supplies no I/O or throughput estimate.
Keep merge bytes and throttled time in the same example
The historical implementation note shipped with LevelDB 1.23 separates an L0 example that reads 14 MB and writes 14 MB from a non-L0 example that reads 26 MB and writes 26 MB. Its approximately 0.5-second estimate assumes 100 MB/s for the latter; the approximately 5-second discussion instead throttles background writing to 10% of that rate. These are documentation estimates, not measurements from this review or latency bounds for current engines. [5, Timing]
That distinction matters because incoming writes can accumulate L0 files while compaction is throttled, increasing read-side merging work. Record the workload and background-write budget before attributing a read-cost change to the filter or the number of SST files alone. The SSTable record keeps the file-level definition separate from the run-level layout.
A layout name is not a complete strategy
Sarkar and colleagues separate four decisions: the trigger, data layout, compaction granularity and data-movement policy. A file-selection change can therefore change a strategy without changing its leveled layout. Their study compares ten strategies in a shared, modified RocksDB implementation. [19, sections 3-5]
The default experiment uses direct I/O, one compaction thread and an 8 MB block cache. These conditions matter when interpreting throughput and tail latency; this is not a current production-engine ranking. We reviewed the updated 2022 version but did not reproduce its benchmark.
Its level numbering also differs: the paper calls the memory buffer level 0; RocksDB calls its first on-disk level L0. Translate the notation before comparing run counts. [19, section 2] [4]
More misses need not mean faster lookups
In the study's one million uniform point lookups over ten million preloaded entries, balanced present/absent mixes could have higher mean and P90 latency than the all-present or all-absent endpoints. The authors explain the shape through metadata access: absent queries probe filters across all levels; successful queries can stop earlier but must fetch their result. This is a result under that experimental setup, not a universal curve. [19, section 5.1.2 and figure 4(e,h)]
Measurement implication: benchmark the actual present/absent mix and report filter, index and data-cache conditions separately. An all-absent test of false positives alone does not measure a mixed application's lookup latency. This is our testing recommendation, not a reproduction of the paper's timings.
Name the numerator before comparing amplification
Read amplification in RocksDB's tuning guide counts physical reads per query. Our expected probes count is different: a cached probe may cause no device read, while fetching cold metadata can add reads. Device-wide counters can also include background compaction, so they do not isolate query reads. [16]
For a byte ratio, specify bytes read and useful bytes returned. An absent lookup returns zero useful bytes, so that ratio is undefined; report reads per absent query instead. Compare successful lookups and range scans separately, with cache state and the measurement interval stated.
Under a total-space convention, space amplification divides stored database bytes by represented logical data bytes. State whether the numerator includes WAL, metadata, retained versions and temporary output, and whether the denominator is uncompressed live keys and values. Report steady-state footprint and peak merge space separately; compression changes this accounting too. [16] [17]
The paper instead defines excess-space amplification using invalidated-entry bytes over unique-entry bytes. [19, section 4.2] In a simplified accounting example with 100 MiB of live entries and 20 MiB of obsolete entries, total space is 1.2 times live data, but excess space is 0.2 times live data, or 20%. These are the same state, not competing measurements. The conversion assumes matching byte representations and excludes metadata, WAL, compression differences and temporary output.
RocksDB Universal's max_size_amplification_percent is an additional-space estimate relative to the oldest run, not the total-space ratio or a hard cap on disk consumption. Its overwrite assumption can be wrong for an insert-only workload. Temporary input and output coexistence also matters. [15]
Hesela's measurement recommendation: record the policy, run counts, query mix, cache configuration, foreground read counters, compaction bytes and peak space together. This is an accounting checklist, not a RocksDB benchmark. Keep database write amplification separate from host-to-NAND write amplification.
Which set did the filter actually test?
A prefix filter represents extracted prefixes, not complete keys. A positive test for cat can be correct even when cat:5 is absent. Counting that as a Bloom collision confuses two different predicates. Prefix filtering helps only when skipping that prefix cannot skip a requested result. [10]
Consider the invented ASCII keys ant:1, cat:2, cat:8, dog:1, a three-character prefix and bytewise order. These are exact set answers, before introducing probabilistic filter errors. Intervals include their lower bound and exclude their upper bound.
| Interval | Lower key exists? | Its prefix exists? | Keys in interval |
|---|---|---|---|
[cat:5, cat:9) | No | Yes | cat:8 |
[cat:3, cat:7) | No | Yes | None |
[bee:0, dog:0) | No | No | cat:2, cat:8 |
[bee:0, bee:9) | No | No | None |
The third row is the dangerous shortcut: no bee prefix exists, yet the interval contains two cat keys. Rejecting that entire interval from one prefix test would lose results. The second row shows the opposite: a present prefix does not establish that this narrower interval contains anything.
Run the exact-set oracle. It validates these four examples, not RocksDB behavior or SuRF accuracy. It intentionally excludes short keys, non-ASCII collation, versions, tombstones and filter corruption.
A directory scan needs a directory predicate
TABLEFS (ATC 2013) groups metadata keys by parent inode and filename. Its added SSTable filter tests directory inodes, not whole filenames. [85, section 3.4]
Skipping irrelevant tables does not make retained rows cheap: packed attributes and small-file contents can inflate name-only scans. This is historical magnetic-disk evidence, not an SSD speedup claim. [85, section 4.4, Figure 13]
For a directory-listing benchmark, distinguish tables rejected, blocks read, bytes decoded and requested fields returned. A correct prefix predicate can avoid table reads while the row layout increases bytes decoded. These are measurement questions, not new TABLEFS measurements.
Test the order, not just the prefix length
In RocksDB v9.7.3, compatible prefix groups must be contiguous under the comparator. If two ordered endpoints share a prefix, every key between them must be in the extractor's domain and share it too. An out-of-domain key cannot interrupt that group. [11, ColumnFamilyOptions::prefix_extractor]
Our five finite examples separate these obligations. The first-three-byte transform returns hexadecimal prefixes; keys shorter than three bytes are outside its domain. The suffix-first comparator orders the numeric digit after the colon, then breaks ties by bytewise order. The fourth row uses the displayed order explicitly. These are invented key domains.
| Comparator and transform | Ordered keys | Contiguous groups? |
|---|---|---|
| Bytewise order, first three bytes | cat:1 < cat:3 < dog:2 | Yes, in this sample |
| Numeric suffix first, first three bytes | cat:1 < dog:2 < cat:3 | No |
| Out-of-domain key before the group | a < cat:1 < cat:3 < dog:2 | Yes, in this sample |
| Out-of-domain key inside the group | cat:1 < ! < cat:3 | No |
| Numeric suffix first, suffix as group | cat:1 < dog:2 < cat:3 | Yes, in this sample |
For a concrete lost-result example, suppose an SST contains only dog:2. Under suffix-first order, the interval [cat:1, cat:3) contains that key. Both bounds have prefix cat, absent from the SST. Skipping the interval on that perfectly correct negative would hide dog:2. There is no Bloom collision: the comparator/extractor pairing is invalid.
The fourth row exposes a second trap: checking only in-domain keys would miss the interruption by !. The third row is a control: a short key outside the group does not itself violate contiguity. Grouping by suffix instead changes the predicate and passes the fifth sample; it does not establish a general-purpose extractor.
The CC0 checker returns a three-key witness for failure. Its independent triple oracle checks all 1,944 combinations of four-key orders and two group labels plus an out-of-domain label. It rejects comparator-equivalent distinct sample keys rather than attempting to validate their filter policy.
Run node generate-prefix-order.mjs beside the checker using the generator; the JSON receipt records inputs, results, source hash and scope. These exact-set counterexamples do not execute RocksDB or estimate performance. Production tests must also cover unseen key encodings, comparator equality, version changes and the actual iterator configuration.
Prefix iteration is a correctness contract
RocksDB's manual prefix mode requires the caller to remain within the chosen prefix. Its guide warns that misuse can return incorrect results without an error. Prefix groups must also be compatible with comparator ordering. Do not treat a successful iterator status as a completeness proof. [10]
For supported table formats, total_order_seek=true requests total-order iteration. The pinned v9.7.3 header describes auto_prefix_mode as adaptive, but explicitly documents a short-key omission caveat when seek and upper-bound prefixes differ. The wiki's broad equivalence statement is therefore not an unconditional guarantee for that version. Check the deployed release and key domain; we did not reproduce the engine bug. [11]
Hesela's proposed regression check: compare complete ordered results against total-order mode on the same snapshot, with prefix_same_as_start=false in both configurations. Include prefix crossings, short keys and exclusive upper bounds; test before and after flush and compaction. A latency improvement is not acceptable if the result set changes.
A separate trap is comparator equality: the v9.7.3 filter-policy API warns that a comparator ignoring part of a key requires a matching filter policy. Hashing raw bytes while comparison ignores trailing spaces is not a valid implementation of the no-false-negative contract. [7]
Rosetta: cover intervals are not the whole probe budget
Rosetta represents binary prefixes in Bloom filters and can recursively check descendants after a positive, a process called doubting. Its memory allocation trades filter work against unnecessary reads. [45, sections 2-4]
The following exact geometry uses unsigned four-bit keys, inclusive endpoints and maximal aligned power-of-two blocks. An asterisk replaces all remaining bits; the empty prefix covers the whole 0-15 domain. It does not mean the implementation stores a root Bloom filter.
| Inclusive query | Positions | Disjoint cover | Binary prefixes | Cover blocks |
|---|---|---|---|---|
[5, 5] | 1 | [5, 5] | 0101 | 1 |
[5, 10] | 6 | [5, 5] + [6, 7] + [8, 9] + [10, 10] | 0101, 011*, 100*, 1010 | 4 |
[0, 15] | 16 | [0, 15] | * | 1 |
A singleton needs one block, although substituting R=1 into 2 log2(R) gives zero. Use the actual cover, not that expression as a literal all-input count. Nor does four blocks mean four total filter probes: recursive checks can add work. [45, sections 2.2 and 3]
The CC0 geometry module and tests reproduce these rows with node --test dyadic-cover.test.mjs. A separate recursive-tree oracle checks all 2,793 inclusive intervals in one- through six-bit domains, including every singleton. This validates the example's geometry, not Bloom accuracy or database performance.
SuRF preserves order for a different question
Zhang and colleagues' SIGMOD 2018 SuRF uses a truncated Fast Succinct Trie. Hash suffixes refine point filtering; real-key suffixes also retain ordering information for range filtering. This is not a standard Bloom filter with a different hash count. The described structure is static. [13, section 3]
The paper's RocksDB evaluation uses synthetic sensor events, not collected production telemetry. It compares equal-memory filters and separates point, open-seek and bounded-seek workloads. Section 5 still requires full-key checks for ambiguous boundaries and tied prefixes. Its range gains do not imply a universal point-lookup improvement or exact database counts. [13, sections 5-6]
Our engineering takeaway: define the query and its correctness oracle before tuning false-positive rate. Report empty-range frequency separately from absent-key frequency. No SuRF implementation or benchmark was run here.
Corpus: prefix Bloom filter, prefix extractor and succinct range filter. The extractor's domain is part of the interface, not just a string length. [12]
Proteus: adaptation follows filter construction
Proteus combines a uniform-depth trie with a prefix Bloom filter. Its CPFPR model selects prefix lengths from the keys, sampled empty queries and a memory budget; it can also choose a trie-only or Bloom-only design. [Proteus, section 4]
The RocksDB experiment keeps 20,000 sample queries, replacing old entries with every hundredth executed empty query. New SST filters use the current sample. The shift experiment interleaves 40 million puts with 60 million seeks to trigger reconstruction. [Proteus, sections 6.1 and 6.4] Updating the sample alone does not change an existing filter. Our inference: a read-only deployment needs an explicit rebuilding policy before treating these results as evidence of adaptation.
Three artifact checks before comparing results
| Surface | Contract | Comparison consequence |
|---|---|---|
| Range API | Left inclusive, right exclusive; the string Bloom path can include the right boundary conservatively. | Use the same endpoint convention in the exact-data oracle. |
| Memory API | getMemoryUsage() omits the prefix Bloom filter. | Do not label this return value total filter memory or process RSS. |
| FPR counters | The modified RocksDB counters are documented for forward iterators only. | Do not extend the reported denominator to arbitrary iterator workloads. |
The endpoint and memory contracts come from the pinned implementation; the instrumentation scope comes from its README. That README also records post-paper modeling changes, so the repository revision belongs in any reproduction report.
For an evaluation, record empty-range counts, sample age, which SSTs were rebuilt, filter CPU work and backing-store reads separately. Check ordered query results against the same snapshot before comparing latency. This is an evaluation checklist, not a reproduction of the published speedups.
Memento: dynamic does not mean unbounded
Memento Filter supports updates and growth by grouping hashed prefixes with ordered suffixes. For inclusive integer queries of length at most R (R >= 2), r = ceil(log2(R)) suffix bits give partitions of width 2^r: a query touches at most two. Longer queries remain supported, but need more partition checks. [Memento, section 4]
Inspect the wrapper, not just the headline: the pinned qf_range_query loops over intermediate prefixes for a longer interval. Its candidate-prefix count is floor(right / 2^r) - floor(left / 2^r) + 1. This is integer geometry, not a count of cache misses or backing-store reads; a positive answer can stop the search early. [pinned query implementation]
Do not test only result == 1: the documented query result is 0 for negative, 1 for positive, or 2 for positive with possible fingerprint rejuvenation. Both positive codes require the backing-store check. The header also documents a lock-failure code: treat that as an error, not evidence of an empty range. Its concurrency disclaimer explicitly says those features have not been thoroughly tested. [pinned API contract]
The paper's WiredTiger integration tests a mutable B-tree, not an LSM compaction benchmark. Later, Diva's dynamic evaluation uses a modified Memento baseline with Aleph-style expansion. A shared algorithm name does not make these artifacts or measurements interchangeable. [Memento, section 7.2] [Diva, section 5.2]
Evaluation boundary: record the artifact revision, suffix width, inclusive endpoints, query lengths and empty-range denominator. Compare exact query answers before throughput. This supplement is a source review, not an execution of either research artifact.
Diva: qualify the bound before sizing the filter
Diva permits variable-length keys and ranges, but its analysis assumes independent keys from Definition 4.1's well-behaved distribution. The sampling result (theorem 4.2) holds with high probability, not deterministically. Static point and range bounds are epsilon and 2 epsilon. After N insertions without distribution shifts, theorem 4.4 gives expected bounds epsilon/2 * (log2 N + 2) and epsilon * (log2 N + 2). These are not constant across growth. [Diva, section 4]
Section 3.5 discusses widening slots to stabilize error, at additional space cost. Section 5.1 transforms EnWiki strings with order-preserving Hu-Tucker coding before testing Diva and SuRF. Those results do not establish the same behavior for untreated strings. [Diva, sections 3.5 and 5.1]
| Insertions after construction | Point bound | Range bound |
|---|---|---|
| Initial construction | 1.0% | 2.0% |
| 1,024 | 6.0% | 12.0% |
| 1,048,576 | 11.0% | 22.0% |
The calculation module and regression tests are reusable without a database. A looser upper bound is not proof that actual errors increased by the same amount. Repeated queries also do not become independent observations merely because the calculation contains a probability.
Match the implementation parameter to the question
At pinned commit d0f85b25a9, constructors take infix_size, seed and load factor, rather than epsilon. The author example counts the unary counter in that size, sorts bulk-load inputs, and uses explicit lengths for binary keys containing zero bytes. RangeQuery returns a Boolean, not a probability or a matching record. [API] [Example]
Hesela's integration inference: record key encoding, construction order, growth history and empty-query denominator alongside the chosen configuration. Confirm positive candidates against the data. Keep transformed and raw workloads separate when comparing results. This is a source-reviewed sizing note, not execution of Diva or reproduction of its benchmarks.
Corpus: Diva range filter. Compare the Grafite range-length budget before interpreting equal configuration numbers as equal guarantees.
Grafite: budget for the range length
Grafite offers a distribution-independent false-positive bound using locality-preserving hashing and Elias-Fano encoding. For leading budget B bits per key it is min(1, ell / 2^(B - 2)), where ell is the inclusive integer interval length. The query bound is O(B), constant for fixed B; lower-order metadata is additional. [52, section 3]
The probability is over randomized construction for a fixed empty query, not a fresh coin toss every time that query is repeated. The paper's filter timings exclude backing-store access. Do not read its speedups as database latency gains. [52, proof of lemma 3.1 and section 6.1] See also repeated-query history.
| Leading bits/key | Positions | Exact upper bound | Upper bound (%) | Minimum bits/key for 1% |
|---|---|---|---|---|
| 12 | 1 | 1/1024 | 0.097656 | 9 |
| 12 | 32 | 32/1024 | 3.1250 | 14 |
| 12 | 1024 | 1024/1024 | 100.00 | 19 |
| 20 | 1 | 1/262144 | 0.00038147 | 9 |
| 20 | 32 | 32/262144 | 0.012207 | 14 |
| 20 | 1024 | 1024/262144 | 0.39063 | 19 |
Our inversion of the bound gives B = 2 + ceil(log2(ell / epsilon)) for a target strictly between zero and one. A 32-position query needs five more leading bits per key than a singleton at the same target; a 1024-position query needs ten more. A bound of 100% is uninformative, not a prediction that every query will be a false positive.
Check density before configuring a filter: the theorem's reduced universe n * L / epsilon must fit the key universe of size u. When an exact encoding is competitive, an approximate filter need not be the right choice. The arithmetic helper has no population input and does not validate that construction condition. [52, theorem 3.4]
Count positions, not results: inclusive [5, 10] contains six possible integers even if no records exist there. Decide the encoding and endpoint convention before converting a time or string interval. These calculations do not estimate process memory, choose a production filter or validate an adaptive attack model. The author's API also distinguishes requested budget from measured object size. [53]
Reproduce with the CC0 module and tests: place them together and run node --test grafite-budget.test.mjs. Exact integer checks cover singleton, saturation, uint64 endpoints and minimal sizing; no random sampling or filter execution is involved.
FLSM: one guard is not one table
PebblesDB's fragmented LSM tree places potentially overlapping tables inside disjoint guard ranges. It reduces repeated merging into destination tables, but the last level and some penultimate-level compactions still rewrite data. [46, section 3]
The authors describe table-level filters for point lookups and separate remedies for seeks: parallel searches and seek-triggered compaction. More parallel work is not less total work, and extra compaction spends writes. The project's documentation describes configurable optimizations; do not assume every published-paper optimization is enabled in a checkout. [47, read and seek optimizations]
A perfect answer to the wrong question can hide a result
Our constructed guard covers integer keys from 10 inclusive to 30 exclusive. Its three files contain A = [10, 20], B = [12, 18, 24] and C = [16, 22, 28]. For seek(17), exact membership is negative in every file. Nevertheless, their first keys at least 17 are 20, 18 and 22. The correct result is 18. Rejecting every file on membership returns no result.
| Query | Membership A / B / C | Correct successor | Unsafe membership-gated successor |
|---|---|---|---|
| 10 | Yes / No / No | 10 | 10 |
| 17 | No / No / No | 18 | None |
| 18 | No / Yes / No | 18 | 18 |
| 21 | No / No / No | 22 | None |
| 28 | No / No / Yes | 28 | 28 |
| 29 | No / No / No | None | None |
The present-key rows and exhausted interval are controls. The error needs no hash collision: this example deliberately uses exact membership. A production engine can prune by valid key-range or iterator bounds, but absence of the starting key alone cannot justify skipping a successor.
Reproduce with the CC0 model and tests, placed together, using node --test flsm-seek.test.mjs. An independent union-and-sort oracle covers 1,536 two-file cases. This is a single-guard correctness example: no versions, tombstones, cross-guard traversal, caches, storage I/O or PebblesDB benchmark is simulated.
A selected guard is not yet a read boundary
The paper keeps newly selected guards uncommitted: reads ignore them until compaction rearranges the tables and persists the updated boundaries. Removing the key from which a guard was chosen does not automatically remove the guard. Guard deletion is a separate layout change. [46, sections 3.3-3.4]
Extend our invented files with a candidate boundary at 20. Before repartitioning, all three files still belong to guard 10. Routing key 22 through a new, empty guard 20 would report absence despite the stored key. Our checker rejects this mixed layout; it is not a defect observed in PebblesDB.
| Snapshot | Selected guard | Routed membership | Layout check |
|---|---|---|---|
| Old layout; candidate 20 ignored | 10 | Present | Accept |
| New boundary; old file placement | 20 | Absent | Reject |
| New boundary and repartitioned files | 20 | Present | Accept |
Repartitioning the files at 20 restores agreement: keys equal to 20 belong to the new guard, and key 22 is found there. The old snapshot stays unchanged. Exhaustive checks cover 64 key subsets, five new boundaries and eight queries, giving 2,560 membership comparisons against an independent exact-set oracle.
Run the layout tests with the layout module and the earlier key-set module in one directory: node --test flsm-seek-layout.test.mjs. All three are CC0. This model has no disk writes, versioned values, tombstones, concurrent readers or recovery protocol. Matching boundaries and files is a routing invariant, not a proof of durable publication.
The paper evaluates a 16 GB machine with two Intel 750 SSDs in RAID0; compression was disabled, and results average at least five runs. Its results are historical evidence, not a current RocksDB ranking. [46, section 5.1]
REMIX: filtering is not merge ordering
A range filter can reject an empty candidate; it does not order the records in surviving files. REMIX records that merged order using anchor keys, cursor offsets and run selectors. Advancing through this view avoids repeated key comparisons. Compaction must still rebuild the index; this trades preparation work for later queries. [48, sections 3-4]
The FAST 2021 evaluation used an Intel 905P Optane SSD, not a representative NAND fleet. Its one-table seek control favored the merging iterator. Faster multi-run scans therefore do not imply a universal lookup win. [48, section 5.1]
Read the implementation's branch, not just its headline
The pinned author README describes later compressed-key blocks and optional hash tags. Compressed keys can reduce rebuild reads at the cost of extra stored bytes. A matching tag is only a candidate: the code still compares the full key. These changes are not the paper's original implementation. [49] [50, mssty_iter_match]
There is another boundary in ssty_build_api: overlapping new input tables select the merging-iterator path before the compressed-key branch is considered. Do not infer the executed rebuild path merely from the presence of compressed-key blocks. [50, ssty_build_api]
Our measurement recommendation: report rejected files, seek work, returned records and rebuild I/O separately. This is source synthesis; we did not execute RemixDB or reproduce its benchmark. A filter's false-positive rate cannot stand in for those counters.
LSM-trie: pay for filters before reading data
LSM-trie clusters filters for corresponding hash buckets. Its two-read design caches upper-level metadata; overflow redirection or false positives can require extra reads. Native ordered range queries are outside that design. [LSM-trie, sections 2.3-2.4]
The pinned lookup code checks active tables first, then uses a Bloom-container bitmap to select candidate tables. Bucket lookup can follow migration metadata recursively and compares the complete key before returning a match. A hash or filter match alone is not key equality. [lookup traversal] [bucket lookup]
Why a table can show more than 100%
Table 1 labels an additive total of 122.85% for 150 filters at 10 bits/key as a false-positive rate. It cannot be the probability of at least one false positive. [Table 1]
For an absent query tested against every filter, let X count positive answers. With the same marginal p for each filter, E[X] = n * p, regardless of dependence. Only with independent outcomes does P(X > 0) = 1 - (1 - p)^n. Without that assumption, min(1, n * p) is an upper bound, not an equality.
| Filters tested | Expected positives per query | Chance of any, independent case |
|---|---|---|
| 50 | 0.4095 | 33.71% |
| 100 | 0.8190 | 56.06% |
| 150 | 1.2285 | 70.87% |
At 150 filters the count exceeds one, but the independent probability remains below 100%. Neither value includes metadata reads, cache hits, bucket redirection or early termination after finding a live key. These calculations do not reproduce the paper's throughput.
Recalculate with the CC0 module and enumeration tests. Run node --test lsm-filter-count.test.mjs with both files in the same directory. Equal-marginal examples also demonstrate different union probabilities under different dependence.
Optimize a sum under a memory budget
Monkey, by Dayan, Athanassoulis and Idreos, makes the objective explicit: for an absent point lookup, add the false-positive probabilities of the runs considered. Its allocation favors more bits per entry in smaller runs. At low budgets some large runs can receive no filter. [2, section 4.1]
Our independent evaluator isolates that idea with three invented runs. Let n_i be stored entries in run i, b_i its filter bits per entry, and c = ln(2)^2. Use the continuous ideal approximation p_i = exp(-c b_i) from the paper's equation 2. It assumes an optimal hash count; it is not an exact finite-filter formula. [2]
Minimize R = sum(p_i), subject to sum(n_i b_i) = M and b_i >= 0.
For every query here, the key is absent from every run. All filters and indexes are resident, and one false positive costs one equally weighted probe. Linearity of expectation gives the sum even without assuming independence between filter outcomes. It is not P(at least one false positive). Multiple probes can occur on one query, so R can exceed one.
Writing w_i = n_i / sum(n), the marginal-cost condition gives b_i = max(0, (t - ln(w_i)) / c). Our bounded solver adjusts t until the weighted bit budget matches. Zero allocated bits mean bypassing the filter and probing the run, not rejecting all queries with an empty filter. This convex objective makes the constrained solution a global optimum within this model.
When does a run receive filter memory?
The fixed-run model gives a precise answer to the low-memory case. A run starts receiving memory only when the multiplier t exceeds its ln(w_i). At that boundary, sum the bits already assigned to smaller runs. The average budget threshold is:
B_i = sum over n_j < n_i of (n_j / N) ln(n_i / n_j) / c
Here N = sum(n) and B_i is measured in filter bits per stored entry across all runs. This is our derivation from the stated constrained model, not a measured hardware threshold. Buffer size and merge policy stay fixed.
| Run entries | Threshold, average bits / entry |
|---|---|
| 10,000 | 0.00000 |
| 100,000 | 0.04318 |
| 1,000,000 | 0.51811 |
At an average budget of 0.1 bits per entry, the two smaller runs have filters but the million-entry run does not. Bypassing that filter contributes one probe to every absent lookup in this model. It does not reject all queries. Equal-sized runs share a threshold; scaling every run by the same factor leaves these average-budget thresholds unchanged.
Integer hash counts, minimum filter sizes, cache misses and unequal read costs can change the practical choice. The threshold is not a recommendation to disable a production filter without measuring the workload.
The CC0 evaluator exposes activationThresholds(sizes). Regression tests enumerate active subsets independently and check allocations just below, at and above the boundaries. The existing 14-case dataset remains unchanged.
The same 11.1 million bits
Assume 10,000, 100,000 and 1,000,000 stored entries, for 1,110,000 total. An average budget of 10 bits per entry gives 11,100,000 filter bits. It excludes indexes, headers, alignment, allocator overhead and caches. Equal allocation uses 10 bits per entry in each run. The optimized allocation below spends exactly the same ideal budget.
00.03 probes / absent query
| Run entries | Bits / entry | Allocated bits | False positives, % |
|---|---|---|---|
| 10,000 | 19.067 | 190669.5 | 0.0105 |
| 100,000 | 14.274 | 1427441.8 | 0.1051 |
| 1,000,000 | 9.482 | 9481888.7 | 1.0508 |
The largest run's false-positive rate gets worse than the equal-allocation baseline, while total expected probes improve. That is the useful diagnostic: optimizing each component to the same percentage can miss the system objective.
Download 14 cases, their 42 per-run rows, provenance JSON and the evaluator. No database was loaded and no physical I/O measured. These are new worked examples, not a replication of Monkey's benchmark.
A mean fill ratio is not an exact error probability
The continuous allocation above is useful, but a finite filter needs a separate probability model. Bose and colleagues showed why the commonly repeated expression [1 - (1 - 1/m)^(kn)]^k can underestimate false positives. Their two-bit, one-key, two-hash counterexample gives 10 positive outcomes among 16 equally likely address combinations, not 9. This is an established result, not a new discovery by Hesela. [31, introduction and section 2]
Assume n distinct inserted keys, m bits and k independent uniform addresses per key, with replacement. The query key is absent. For a realized filter with x set bits, its conditional false-positive probability is exactly (x/m)^k under these assumptions. Across constructions, average that power; do not take the power of the average fill. The exponential expression (1 - exp(-kn/m))^k makes a further approximation.
Fewer base hashes do not make independent probes
Double hashing uses positions (h1(x) + i * h2(x)) mod m. Kirsch and Mitzenmacher establish the same limiting false-positive probability as standard Bloom filtering, with independent fully random base hashes and fixed bits per key and probe count as the set grows. Their convergence analysis and finite experiments do not assert exact equality for every filter size. [37, sections 5-6 and 8]
Consequently, our independent-address evaluator below is not a double-hashing evaluator. Reducing hash computation and preserving a probability model are separate claims.
Independent finite-state calculation
Hesela's evaluator tracks the probability of each occupied-bit count. Starting at zero, one address stays at count x with probability x/m, or adds one bit with probability 1 - x/m. After kn steps it sums P(x) * (x/m)^k. This evaluates the finite model in floating-point arithmetic; it is not a Monte Carlo estimate or a hash-library benchmark.
| Geometry | Finite model, % | Mean-fill power, % | Exponential, % |
|---|---|---|---|
| 2 / 1 / 2 | 62.50000 | 56.25000 | 39.95764 |
| 8 / 1 / 2 | 5.66406 | 5.49316 | 4.89291 |
| 64 / 8 / 4 | 2.53544 | 2.45562 | 2.39687 |
| 512 / 64 / 4 | 2.41403 | 2.40410 | 2.39687 |
| 4096 / 512 / 4 | 2.39901 | 2.39777 | 2.39687 |
The total bit budget hides block occupancy
Keep 512 bits, 64 distinct keys and four hashes. A global bit array gives 2.41403%. Eight 64-bit blocks with exactly eight keys in each give 2.53544%. Let each key independently choose one block uniformly, keeping its four addresses inside that block, and the result becomes 3.25659%. The mean keys per block remains eight; the distribution is different.
This is a constructed ideal blocked model. It does not implement Parquet: that format uses 256-bit blocks split into eight 32-bit words, with one selected bit per word and a specified multiply-and-shift mask. Its format documentation supplies separate sizing guidance. Do not transfer the table's numbers to Parquet or a particular RocksDB implementation. [32, Technical Approach and Sizing an SBBF]
For chosen block states, query weighting matters too. With two eight-bit blocks and two independent addresses inside the selected block, occupancies (4, 4) give 25% under uniform block queries; (0, 8) give 50%, despite the same total of eight set bits. For (0, 8), sending 90% of absent queries to the empty block gives 10%; reversing the weights gives 90%. These are conditional examples, not measured workload rates.
More choices change the query contract
Schmitz, Zentgraf and Rahmann's SEA 2025 BlowChoc method evaluates candidate blocks using their occupancy and the new bits an insertion would add. A query may accept either candidate, so fewer set bits must compensate for additional opportunities to match. Choosing between two insertion locations is not the same as querying only the less occupied block. [33, section 3]
The authors evaluate random integer keys and genomics workloads, separating insertion from positive and negative lookup throughput. Those measurements do not establish RocksDB latency. Our one-choice recurrence does not model their state-dependent placement. [33, section 4] See the blocked Bloom filter definition.
Reproduce and use the right denominator
The CC0 evaluator, generator, independent checks and JSON receipt accompany the dataset. The receipt records formulas, inputs, runtime, source hash and limits. Small cases are checked by enumerating concrete bitsets and query addresses, independently of the occupancy recurrence. A separate Python exact-rational verifier checks all 12 displayed cases, including the 4096-bit filter, using integer combinatorics; run it beside the JSON receipt. It conditions on the number of distinct query addresses and counts insertions covering them by inclusion-exclusion, avoiding the large insertion-state table. The verifier tests cross-check 80 small geometries against exact occupancy arithmetic and deliberately corrupt each reported probability; rejection also works with Python's -O option.
Engineering implication: record the filter layout, distinct-key count, block load and absent-query mix before attributing a discrepancy to poor hashing. These finite-occupancy calculations exclude double hashing, finite fingerprints and adaptive query selection; they do not predict milliseconds, cache misses or physical reads.
Repeating a false-positive key repeats the mistake
With fixed bits and hash functions, the same absent key receives the same answer. A false-positive probability of p is not a fresh coin toss on every retry. After a false positive has been observed, repeating that key without changing the filter is positive with probability 1. Bender and colleagues distinguish this from an adaptive guarantee that remains bounded after earlier answers under its hashing and capacity assumptions. [38, sections 1-2]
Consider one inserted key, four bits and one ideal uniform hash. Every query key is distinct from the inserted key. Compare four repetitions of one absent identity with four different absent identities. Each distinct identity gets one independent uniform address; repetitions reuse it. Enumerating all assignments gives:
| Absent-query identities | All-positive assignments / total | All four positive, % | Expected positives |
|---|---|---|---|
| One key, four repetitions | 4 / 16 | 25 | 1 |
| Four different keys | 4 / 1024 | 0.390625 | 1 |
Both cases average one positive, but the probability of four positives is 25% versus 0.390625%. Adding expectations does not require independence; multiplying these four marginal probabilities assumes independent answers, which repetition does not provide. Once a positive key is selected for repetition, the conditional workload changes again. These are constructed probabilities, not measured FPRs.
The CC0 enumerator and independent checks need no dependencies: place both together and run node --test bloom-query-history.test.mjs. They enumerate 16 and 1,024 assignments and check a closed-form oracle.
Adaptation has an information cost. The broom-filter construction uses remote state to identify the stored key responsible for a collision and refine its fingerprint. Its asymptotic access bound is not zero physical I/O or a latency guarantee. [38, theorem 6 and section 4] The telescoping-filter paper likewise separates local state from a remote representation used during correction; that remote state is excluded from its filter-space accounting. Its described design does not support deletion. [39, section 2.2 and appendix B.1]
Not every adaptive filter promises the same guarantee
A fresh challenge is not a repeated query
| Guarantee | Challenge | Required context |
|---|---|---|
| Naor-Yogev resilience | Previously unqueried nonmember | Oracle answers; specified adversary budget |
| Broom-filter adaptivity | Nonmember, including a repeated query | False-positive feedback, remote state, valid updates and hashing assumptions |
The first challenge explicitly excludes previously queried keys. It does not certify replay resistance for a known false positive. [74, definitions 2.2 and 2.4] The broom filter instead maintains a sustained false-positive bound. Its correction history must survive deletion and reinsertion until rehashing. [38, sections 2 and 4.3]
Evaluation implication: report fresh-key discovery, repeated-key replay and delete/reinsert workloads separately. A fixed-set uniform-query FPR cannot establish all three guarantees. These are source-defined contracts, not new benchmark results. See the machine-readable definition.
Support optimality bounds expected false positives by the number of distinct queries in a predetermined sequence. It is not adversarial adaptivity. For the Cuckooing ACF, the cited theorem covers at most n queries for n stored keys, two tables with n slots each and one slot per bucket; its bound includes lower-order and additive polylogarithmic terms. It is not an unconditional one-error-per-key promise or a proof for every high-load configuration. [40, sections 1, 3 and 5]
Finite correction storage also has a lifetime. The described telescoping implementation resets a block when its encoded selectors overflow; this can lose earlier corrections. Rebuild frequency and the distinct-query horizon therefore belong beside the memory budget. This is source review, not an execution of that implementation. [39, section 4 and appendix B.1]
For an engine evaluation, measure correction work, rebuilds and physical reads separately. This is an engineering inference: a logical false positive can be served from cache, while its repair can require additional state. The two enumerated cases above measure none of those costs.
AdaptiveQF: the reverse map changes the query contract
AdaptiveQF keeps extending fingerprints rather than changing selectors as in the telescoping filter. Its reverse map can be separate from the database or become the database. These are different storage layouts. [64, section 4]
| Layout | Storage organization | Ordered range queries |
|---|---|---|
| Merged | Keys and values in the reverse map | Not supported |
| Split | Separate database and reverse map | Retained in the database |
The preprint's filter-only microbenchmarks omit reverse-map work; its space table also excludes that map. Do not interpret these as whole-system costs. [64, sections 6.3-6.4]
Engineering inference: a point-lookup optimization is not a drop-in replacement for an ordered index. Check required queries, backing-state capacity and update coordination before comparing filters. This is source synthesis, not a new benchmark or a replication.
Aeris: remembering corrections has a storage budget
Aeris extends adaptation to range-emptiness queries. Its reverse map uses write buffering: inserts and deletes update that map, while value-only changes do not. Correcting a false positive still requires retrieving colliding keys. [65, sections 3.1-3.3]
The paper's WiredTiger experiment assigns the reverse map a 64 MB cache and subtracts that amount from the database cache. This is a memory-accounting choice, not evidence that auxiliary storage is free. [65, section 5.1]
Table 2 reports 5.1 GB of reverse-map disk space for 100 million 8-byte keys with 504-byte values. That row describes a 5% cache budget, a 10% adversarial-query rate and a range length of 32. It is an observed configuration in the authors' study, not a universal overhead ratio: changing value size changes the database bytes against which auxiliary storage is compared. [65, section 5.1, table 2]
Evaluation rule: report filter memory, reverse-map memory and disk usage, correction I/O and the configured range limit. Separate authors' benchmarks from local measurements; Hesela has not run this implementation.
Correction is not a privacy guarantee
Adaptive cuckoo designs can keep original keys in a separate table and change fingerprints after an exact lookup identifies a false positive. This differs from the fixed-fingerprint library tested earlier. [42, section 3]
The authors deliberately avoid partial-key bucket addressing: locations come from the full key, independently of the selected fingerprint. Otherwise changing a fingerprint could change its alternate bucket. Adaptation is therefore not a drop-in fingerprint replacement for the earlier XOR-addressed construction. [42, section 3]
Reviriego and colleagues show how changing answers can reveal membership information. Their known-hash extraction model and weaker probabilistic model have different requirements; extraction assumes no concurrent insertions. Persistent false positives remain possible. [43, section III]
Constructed example, not a paper replication: one cell stores A with two selectable fingerprints, (0, 1). Each row starts at selector 0 and queries its key twice. An exact backing-set oracle advances the selector only after a false positive; the observer sees only the raw filter answers. Keys B, C and D are absent. No insertion, deletion, relocation or other query intervenes.
| Key / exact membership | Fingerprints | Fixed answers | Adaptive answers | Case |
|---|---|---|---|---|
| A / present | 0, 1 | positive / positive | positive / positive | Stored key |
| B / absent | 0, 2 | positive / positive | positive / negative | Correctable collision |
| C / absent | 0, 1 | positive / positive | positive / positive | Persistent collision |
| D / absent | 3, 3 | negative / negative | negative / negative | No collision |
B becomes distinguishable from A, but C has the same two positive answers as A despite being absent. Thus the toy example refutes the rule "two positives prove membership"; it does not estimate disclosure risk. Negative transitions would also need a different interpretation if deletion or corruption were allowed. Download the CC0 trace model and tests; run node --test filter-privacy.test.mjs with both files together. The tests exhaust 512 two-selector configurations against a separate collision-set oracle.
The paper's preprocessing reduction deliberately makes input identities collide before filtering, trading ambiguity against extra false positives. Its fixed-width and restricted-universe results differ; this is not encryption or a blanket privacy guarantee. [43, sections IV-V]
Engineering inference: for a shared storage index, specify who can observe preliminary answers, trigger corrections and access exact records. A filter used only inside a trusted engine does not automatically expose the interface assumed here. False-positive performance and membership confidentiality need separate evaluation.
Engineering implication: report repeated-key concentration and the represented set alongside operation-weighted FPR. Deduplicating a trace answers a different question. Evaluate correction work and total memory before substituting an adaptive filter; the example above implements neither adaptive design.
Ribbon: smaller at rest, larger while building
Ribbon is a static approximate-membership alternative, not a compressed Bloom bit array. Its construction solves a banded system of Boolean equations; the resulting representation supports compact membership tests. The paper distinguishes standard Ribbon, homogeneous Ribbon and bumped Ribbon retrieval (BuRR). They are not interchangeable performance results. [6, sections 2-4]
The paper's section 12 compares in-memory data structures on an AMD EPYC 7702, with single-core tests and a memory-contended parallel workload. It separates construction, positive queries and negative queries. These experiments do not measure end-to-end RocksDB latency or storage-device throughput. [6]
There is also a configuration trap. In the pinned RocksDB v9.7.3 API, NewRibbonFilterPolicy(10) uses a Bloom-equivalent budget: approximately the same false-positive rate as a ten-bit Bloom filter, with about seven actual bits per key. It does not request a ten-bit Ribbon representation. The default hybrid policy uses Bloom for memtable flushes under leveled and universal compaction; bloom_before_level=1 also uses Bloom for L0. A policy change does not rewrite existing SST filters. [7]
Dillinger's 2021 implementation note estimates construction memory at roughly 230 bits per key for Ribbon versus 75 for Bloom, and uses resident sizes of seven versus ten. Those rounded, implementation-specific inputs motivate the following sensitivity check; they are not measurements from this site. [8]
A Ribbon policy does not guarantee a Ribbon output
The pinned implementation makes two decisions: choose a builder, then construct its output. The default treats a flush as level -1, but an intra-L0 compaction as level 0. The latter selects Ribbon at the default threshold and Bloom at bloom_before_level=1. Even a selected Ribbon builder can fall back. [27]
- A failed cache reservation for the banded solver selects Bloom.
- For fewer than 1,024 calculated slots, Bloom wins when its representation is smaller.
- Exhausting the bounded 256-seed search also selects Bloom.
These are source-reviewed branches, not measured event frequencies. Slot count is not key count; 1,024 is not a universal key threshold. [27]
Cache charging is not a process memory limit
In v9.7.3, explicitly enabling CacheEntryRole::kFilterConstruction charging accounts for construction against an available block cache; its compatibility default is disabled. A strict cache capacity can cause the reservation failure above. This is distinct from caching completed filter blocks with cache_index_and_filter_blocks. [28]
Do not assume every allocation is rejected at that boundary: the final filter-buffer reservation permits an unchecked error in this implementation. Neither a strict cache nor a Bloom fallback establishes a process-RSS cap. [27]
Hesela's diagnostic inference: record the configured policy, actual output format and cache-pressure conditions separately. A policy label alone cannot explain a memory comparison. The existing snapshot calculation is an all-Ribbon counterfactual, not a forecast of mixed output. Six source-reviewed cases with version, symbols and evidence limits are available as JSON.
Count resident keys and in-flight keys separately
Let N count entries represented by completed, memory-resident filters and B count entries across all simultaneously built filters. They exclude one another. Compare two hypothetical snapshots with identical populations, replacing all their Bloom representations with Ribbon:
Additional bytes = (155 B - 3 N) / 8.
The first term is extra temporary construction memory; the second is resident memory saved. Negative means less memory in this limited accounting model. It excludes caches of data and indexes, memtables, allocator overhead, and the timing of output-buffer allocation. It does not predict process RSS.
| Concurrent builders | Resident saving, MiB | Extra build memory, MiB | Net additional, MiB |
|---|---|---|---|
| 1 | 35.76 | 18.48 | -17.29 |
| 2 | 35.76 | 36.95 | 1.19 |
| 4 | 35.76 | 73.91 | 38.15 |
| 8 | 35.76 | 147.82 | 112.06 |
One builder saves net memory here; two already exceed the resident saving. Under these nominal constants, the crossover is N / B = 155 / 3, about 51.7. Thus "about fifty filters" is meaningful only after specifying their sizes, residency and simultaneous construction. With unequal sizes, count entries, not files. Rounded source estimates cannot establish a precise operational safety threshold.
Reproduce these four invented cases with the CC0 accounting module and inspect its inputs, results and provenance JSON. This is neither a Ribbon implementation nor a reproduction of the paper's experiments.
Partitioning changes residency, not membership semantics
RocksDB can split a filter into separately loaded partitions behind a top-level index. A cold key range then need not keep its entire SST filter in cache. Partitioning changes cache granularity; it does not prove a lower false-positive probability or make a positive result definitive. [9]
Hesela's practical inference: compare resident filter bytes, peak concurrent construction, construction CPU and observed lookup cost together. An on-disk size reduction alone is insufficient evidence of lower peak RAM. The equal-residency snapshot above deliberately does not model a fixed-size cache admitting more filters after they become smaller.
Corpus: Ribbon filter and partitioned filter.
What survives contact with an engine
Monkey's main experiments disabled the block cache, used direct I/O, and repeated trials three times; its error bars describe standard deviations, not universal guarantees. Its benchmark scope and our arithmetic are different evidence. [2, section 5]
RocksDB's cache-local full filters trade some ideal probability efficiency for CPU locality. Whole-key filters and prefix filters also answer different membership questions. A negative whole-key test is not a general range-query emptiness proof. [3]
Measure filter behavior using the right denominator. With the documented point-lookup counters, let P be full positives, T full true positives, and U useful negatives. Observed FPR is (P-T)/(P-T+U), not false positives divided by all reads. A zero denominator means no estimate. [3, statistics]
These counters describe filter checks, not unique application keys or physical reads. With whole-key filtering disabled and only a prefix filter, the represented predicate is prefix membership. Seek counters lack the true-positive count needed for this formula, so do not mix them into a point-lookup estimate. Repeated checks keep their workload weight. [3, statistics]
For a real comparison, hold the memory budget and query mix fixed; report absent versus successful lookups, overlapping files, cache residency, CPU time, actual storage reads and latency percentiles. A saved logical probe may save no device read when data is cached. Extra filter memory can also displace another useful cache. Our model deliberately prices neither effect.
For the write side of the same index, see key-value separation and value-log cleaning costs.
Related context: SSD write-amplification assumptions. Database read amplification and NAND write amplification describe different work at different layers.
Corpus: Bloom filter, LSM-tree, SSTable.
Primary sources
- Burton H. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM 13(7), 422-426 (1970), method 2. DOI: 10.1145/362686.362692.
- Niv Dayan, Manos Athanassoulis and Stratos Idreos. Monkey: Optimal Navigable Key-Value Store. SIGMOD 2017, 79-94; sections 2, 4.1 and 5. DOI: 10.1145/3035918.3064054.
- RocksDB project. RocksDB Bloom Filter: statistics, full filters and implementation trade-offs. Documentation reviewed 12 October 2026.
- RocksDB project. Leveled Compaction: sorted levels, SST files and overlapping L0. Documentation reviewed 12 October 2026.
- LevelDB 1.23 implementation note: sorted tables, compaction and historical timing assumptions.
- Peter C. Dillinger, Lorenz Huebschle-Schneider, Peter Sanders and Stefan Walzer. Fast Succinct Retrieval and Approximate Membership using Ribbon. arXiv:2109.01892v2 (2022), sections 2-4 and 12.
- RocksDB v9.7.3. include/rocksdb/filter_policy.h: NewRibbonFilterPolicy and bloom_before_level.
- Peter Dillinger. Ribbon Filter. RocksDB engineering note, 29 December 2021: construction and resident memory estimates.
- Maysam Yabandeh. Partitioned Index/Filters. RocksDB engineering note, 12 May 2017.
- RocksDB project. Prefix Seek: comparator compatibility, iterator modes and extractor changes.
- RocksDB v9.7.3. ReadOptions: total_order_seek, auto_prefix_mode short-key caveat and prefix_same_as_start.
- RocksDB v9.7.3. SliceTransform: domain, ordering and prefix-extraction contracts.
- Huanchen Zhang et al. SuRF: Practical Range Query Filtering with Fast Succinct Tries. SIGMOD 2018, 323-336, sections 3, 5 and 6. DOI: 10.1145/3183713.3196931.
- RocksDB project. Compaction: leveled, tiered and hybrid policies.
- RocksDB project. Universal Compaction: run selection, temporary space and amplification heuristic.
- RocksDB project. Tuning Guide: amplification factors and their accounting boundaries.
- RocksDB project. Space Tuning: compression, compaction and space usage.
- RocksDB project. Overview: multi-threaded compaction and snapshot visibility.
- Sarkar, Staratzis, Zhu and Athanassoulis. Constructing and Analyzing the LSM Compaction Design Space. PVLDB 14(11), 2216-2229 (2021), DOI: 10.14778/3476249.3476274; updated arXiv:2202.04522v2 (2022), sections 2-5.
- Bin Fan, David G. Andersen, Michael Kaminsky and Michael D. Mitzenmacher. Cuckoo Filter: Practically Better Than Bloom. CoNEXT 2014, section 3. DOI: 10.1145/2674005.2674994.
- efficient/cuckoofilter, commit 917583d6abef692dfa8e14453bd77d6e0b61eef3. CuckooFilter Add, Contain, Delete and victim-cache accounting.
- Redis command reference. CF.DEL: deletion precondition and false-negative warning. Documentation review, not a Redis execution test.
- Redis command reference. CF.ADDNX: fingerprint matches can suppress insertion. Documentation review, not a Redis execution test.
- Thomas Mueller Graf and Daniel Lemire. Xor Filters: Faster and Smaller Than Bloom and Cuckoo Filters. ACM JEA 25, article 1.5 (2020). DOI: 10.1145/3376122. Reviewed arXiv v3, sections 3-4.
- Thomas Mueller Graf and Daniel Lemire. Binary Fuse Filters: Fast and Smaller Than Xor Filters. ACM JEA 27, article 1.5 (2022). DOI: 10.1145/3510449. Sections 3-5.
- FastFilter xor_singleheader README, commit 5b6b321aa5c0c8ef5b5fb3145206f07f3754a0a1: input contract, construction memory and serialization.
- RocksDB v9.7.3: Ribbon builder selection and construction fallbacks.
- RocksDB v9.7.3: filter-construction cache charging and its default.
- Deng and Rafiei. Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters. SIGMOD 2006. DOI: 10.1145/1142473.1142477.
- Fan, Cao, Almeida and Broder. Summary Cache: A Scalable Wide-Area Web Cache Sharing Protocol. ToN 8(3), 2000. DOI: 10.1109/90.851975.
- Bose et al. On the false-positive rate of Bloom filters. Author-hosted manuscript, introduction and section 2.
- Apache Parquet format documentation. Bloom Filter: Technical Approach and Sizing an SBBF.
- Johanna Elena Schmitz, Jens Zentgraf and Sven Rahmann. Blocked Bloom Filters with Choices. SEA 2025, article 25, sections 3-4. DOI: 10.4230/LIPIcs.SEA.2025.25.
- Hyeontaek Lim, Bin Fan, David G. Andersen and Michael Kaminsky. SILT: A Memory-Efficient, High-Performance Key-Value Store. SOSP 2011, sections 2-4.
- SILT authors' implementation, commit 9970432b27db7b9ef3f23f56cdd0609183e9fd83. FawnDS_SF_Ordered_Trie::Get: candidate block and full-key comparison.
- PowerDNS stableBF implementation at commit 60be7ecb53c4715c8b8d832ec2268b100b827cd3: bit cells, testAndAdd and decrement.
- Kirsch and Mitzenmacher. Less Hashing, Same Performance: Building a Better Bloom Filter. RSA 33, 2008, sections 5-6 and 8. DOI: 10.1002/rsa.20208.
- Bender, Farach-Colton, Goswami, Johnson, McCauley and Singh. Bloom Filters, Adaptivity, and the Dictionary Problem. arXiv:1711.01616v3 (2018), sections 1-4.
- Lee, McCauley, Singh and Stein. Telescoping Filter: A Practical Adaptive Filter. arXiv:2107.02866v1 (2021), section 2.2 and appendix B.1.
- Tsvi Kopelowitz, Samuel McCauley and Ely Porat. Support Optimality and Adaptive Cuckoo Filters. arXiv:2105.10622v1 (2021), sections 1, 3 (Theorem 1) and 5.
- Boskov, Trachtenberg and Starobinski. Birdwatching: False Negatives In Cuckoo Filters. CoNEXT 2020 Student Workshop, sections 3-4. DOI: 10.1145/3426746.3434063.
- Mitzenmacher, Pontarelli and Reviriego. Adaptive Cuckoo Filters. ACM JEA 25 (2020), article 1.1, section 3. DOI: 10.1145/3339504.
- Reviriego et al. On the Privacy of Adaptive Cuckoo Filters: Analysis and Protection. IEEE TIFS 19 (2024), sections III-V. DOI: 10.1109/TIFS.2024.3404868.
- Antoine Limasset. ZOR Filters: Fast and Smaller Than Fuse Filters. SEA 2026, sections 2.2, 2.4, 2.7-2.9 and 3. DOI: 10.4230/LIPIcs.SEA.2026.24.
- Luo et al. Rosetta: A Robust Space-Time Optimized Range Filter for Key-Value Stores. SIGMOD 2020, sections 2-5. DOI: 10.1145/3318464.3389731.
- Raju, Kadekodi, Chidambaram and Abraham. PebblesDB: Building Key-Value Stores using Fragmented Log-Structured Merge Trees. SOSP 2017, pp. 497-514, sections 3-5. DOI: 10.1145/3132747.3132765.
- PebblesDB authors: read and seek optimizations, tuning and post-paper changes
- Zhong, Chen, Wu and Jiang. REMIX: Efficient Range Query for LSM-trees. FAST 2021, pp. 51-64; sections 3-5. Author-hosted full paper.
- RemixDB author implementation, pinned README: post-paper compressed keys and hash-tag optimizations.
- RemixDB pinned sst.c: tagged full-key matching, tombstone-aware iteration and rebuild-path selection.
- Dayan and Idreos. Dostoevsky. SIGMOD 2018, pp. 505-520; sections 4.1-4.3 and Figure 8. DOI: 10.1145/3183713.3196927.
- Costa, Ferragina and Vinciguerra. Grafite: Taming Adversarial Queries with Optimal Range Filters. PACMMOD 2(1), 2024; Theorem 3.4, Corollary 3.5 and section 6.1. DOI: 10.1145/3639258.
- Grafite author implementation: filter constructors, query and size; pinned commit 6838e9c6f757b300c410e79bc9c608ece2c5f23f.
- Shetty et al. Building Workload-Independent Storage with VT-Trees. FAST 2013, pp. 17-30, section 3.1.
- Bender et al. Don't Thrash: How to Cache Your Hash on Flash. PVLDB 5(11), 2012, pp. 1627-1637, section 3.
- Shetty et al. FAST 2013 presentation, slides 6-7, 15-17 and 22: stitching, cleaning and experiment scope.
- Knorr et al. Proteus: A Self-Designing Range Filter. SIGMOD 2022, pp. 1670-1684, sections 4 and 6. DOI: 10.1145/3514221.3526167.
- Proteus author code: Query endpoint contract and getMemoryUsage; commit 7580c5b8d184afd19f3fdaf10f782344bdf552f5.
- Proteus artifact README: post-paper modeling changes and forward-iterator FPR instrumentation; pinned commit 7580c5b8d184afd19f3fdaf10f782344bdf552f5.
- Pandey, Bender, Johnson and Patro. A General-Purpose Counting Filter: Making Every Bit Count. SIGMOD 2017, 775-787, sections 3-4. DOI: 10.1145/3035918.3035963.
- CQF author implementation, commit 68939f587b0f33f8c45be4f0e2a18e12bffa9fa6: hash modes and update/query API.
- Kraska, Beutel, Chi, Dean and Polyzotis. The Case for Learned Index Structures. SIGMOD 2018, section 5.1.1. DOI: 10.1145/3183713.3196909.
- Mitzenmacher. A Model for Learned Bloom Filters and Optimizing by Sandwiching. NeurIPS 2018, sections 3-5.
- Wen et al. Adaptive Quotient Filters. arXiv:2405.10253v1 (2024), sections 3-4 and 6.3-6.4. DOI: 10.48550/arXiv.2405.10253.
- Chesetti, Eslami, Zhang, Dayan and Pandey. Aeris Filter: A Strongly and Monotonically Adaptive Range Filter. PACMMOD 4(1), article 7 (February 2026), sections 3-5. DOI: 10.1145/3786621.
- Wu, Xu, Shao and Jiang. LSM-trie. USENIX ATC 2015, pp. 71-82; sections 2.3-2.4, Table 1.
- LSM-trie author code: recursive_lookup and db_lookup, pinned revision.
- LSM-trie author code: full-key equality and recursive bucket lookup, pinned revision.
- LevelDB 1.23: BlockBuilder entry encoding and restart directory.
- LevelDB 1.23: Block::Iter Seek, Next and Prev.
- LevelDB 1.23: TableBuilder index options and block compression.
- LevelDB 1.23: Options::block_restart_interval and compression.
- Chang et al. Bigtable: A Distributed Storage System for Structured Data. OSDI 2006, sections 4, 6 and 7.
- Moni Naor and Eylon Yogev. Bloom Filters in Adversarial Environments. CRYPTO 2015, 565-584. DOI: 10.1007/978-3-662-48000-7_28. Author manuscript, section 2, Definitions 2.2 and 2.4.
- Bercea, Houen and Pagh. Daisy Bloom Filters. SWAT 2024, 9:1-9:19. DOI: 10.4230/LIPIcs.SWAT.2024.9. Definition 1 and theorems 3, 4, 12.
- Eslami and Dayan. Memento Filter. PACMMOD 2(6), article 244 (2024). DOI: 10.1145/3698820; sections 4-7, arXiv v3.
- Memento Filter public API: query results, resizing and concurrency disclaimer; commit ded520cebdabfb3f3d640d838c0aee44636453e2.
- Memento Filter qf_range_query implementation, including intermediate-prefix loop; commit ded520cebdabfb3f3d640d838c0aee44636453e2.
- Eslami, Bercea and Dayan. Diva: Dynamic Range Filter for Var-Length Keys and Queries. PVLDB 18(11), 2025; sections 2, 5.2. DOI: 10.14778/3749646.3749664.
- Eslami, Bercea and Dayan. Diva. PVLDB 18(11), 3923-3936 (2025), sections 3-5. DOI: 10.14778/3749646.3749664.
- Diva author implementation: constructors, RangeQuery and ShrinkInfixSize. Commit d0f85b25a90e00e3aeff4391e2f280d11cacb2af.
- Diva author example: sorted bulk loading, infix-size parameter and explicit-length binary keys. Commit d0f85b25a9.
- Brisaboa, Canovas, Martinez-Prieto and Navarro. Compressed String Dictionaries (2011), section 2.4. arXiv:1101.5506v1.
- LevelDB 1.23: InternalKeyEncodingLength and sequence/type tags
- Ren and Gibson. TABLEFS: Enhancing Metadata Efficiency in the Local File System. USENIX ATC 2013, pp. 145-156; sections 3.4 and 4.3.
Updated . Original code and computed rows: CC0. Source works retain their rights. Native contract checks are not failure-rate estimates or reproductions of paper benchmarks.