Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Known limits

What mushroomdb does not do, or does only up to a point. Each row says what was measured and where.

LimitationDetail
Memory-firstThe working graph lives in RAM. Measured to 100,000 nodes and about 10 million derived edges, on a 24 GiB machine, across two builds: on v0.1.1 (2026-08-24), 4.72 GiB peak while building it and 8.09 GiB to replay the WAL with no snapshot; on v0.2 (2026-08-28), 0.02 s at 31–41 MiB to reopen from a snapshot, which is memory-mapped rather than loaded. None of these was re-measured on the current build. Ten million nodes was the original design intent and is not a measurement. A memory-shaped run on 0.8.0 (entities with text, the memory schema, about 1.6 edges per node and one rule) reached 1,000,000 nodes at 2.65 GiB peak, opening in 1.18 s from a snapshot and 11.3 s from the WAL, with recall at 66 ms p50; its one rule tripped its 1,000,000-edge budget, so that run says nothing about ten million derived edges at that size. In the 100,000-node run each rule was capped at 1,000,000 derived edges. See dogfood/results/scale-memory-1m.md. See dogfood/results/scale-100k.md.
Single writer; interactive transactions are snapshot-isolated and in memoryOne writer at a time, many readers: within a process via RwLock, across processes via the advisory LOCK file. write_batch commits all ops in one WAL frame (all-or-nothing on crash replay) but is not isolated: readers may observe intermediate states while a committed batch is applied in memory. Interactive transactions (HTTP /tx/*, Bolt BEGIN/COMMIT) group statements into one atomic commit under snapshot isolation, but live in the server’s memory and are rolled back by a restart; see Transactions. Isolation is snapshot isolation, not serializable: write skew is possible. A transaction begun with a role token that has a write scope writes with the same scope restrictions as auto-commit; a role token with no write scope, and every read key, cannot write inside a transaction. There are no cross-process transactions.
Peer writes do not notify subscribersCommits another process made are picked up by refresh() and are there on the next read, but they fire no EdgeFired/EdgeRetracted event, so /watch and /subscribe see only writes made through this process. Poll if you need to react to a hook’s writes.
Cold start without a snapshot re-fires all rulesSnapshots persist derived edges, ANN state, and view definitions. At 100k nodes / ~10M derived edges: 0.02 s from a snapshot (measured on V8; the format is V9 now, V10 with multiplicity) vs 8.16 min WAL-only (ANN re-fit dominates). Call snapshot() before close. See dogfood/results/scale-100k.md.
Two-hop Cypher joins at scaleDense patterns producing >1,000,000 intermediate rows error without LIMIT. Add LIMIT n: the pull-based executor stops early and never materializes the full binding table.
Cypher write subsetCREATE (several patterns; a node needs neither a label nor an id), MATCH…SET (including SET n = {…} and SET n += {…}), MATCH…REMOVE (properties), MATCH…DELETE, MATCH…DETACH DELETE, and MERGE (by key, or by label and properties for any other pattern, with ON CREATE SET / ON MATCH SET, optionally with one directed relationship (a)-[:T]->(b)), and `UNWIND … CREATE
Approximate vector mode is opt-inapproximate: true enables HNSW candidate selection. Per-query recall floors min 0.90 / mean 0.95, measured 1.0 / 1.0 at 5k / dim 1536 (fixed-seed probe). Review the trade-off before using it in completeness-critical workloads.
Demo refuses existing directoriesmushroomdb demo exits 1 if the target directory is non-empty, including hidden files (.DS_Store counts). Use a fresh path.
Python bindings return dictspandas/polars zero-copy is not wired yet. HTTP POST /query defaults to Arrow IPC; JSON via ?format=json.
Insert-count multiplicity is opt-in and one-wayenable_multiplicity() starts recording a per-pair insert count, which degree(…, multiplicity=True) sums; both default to False, so every existing caller keeps unique-neighbour semantics. Opting in writes a V10 snapshot that releases before 0.6.10 refuse by name, and there is no call that opts back out. The call is not atomic either; an exception means outcome unknown, not nothing happened: reopen and call is_multiplicity_enabled(). A store that never calls it stays V9 and readable by every release back to 0.6.5.

Engine caps

Four caps in the memory write and read path began as reasoned first guesses. Each was measured at 1,000,000 nodes on an Apple M4 Pro (12 cores, 24 GiB, macOS 15.7.3), release build of rustc 1.92.0, base 1200cdf, synthetic Zipf text in the memory shape (about 1.6 edges per node). Counts are read from the engine’s own reports. Every latency here was taken on a loaded machine (uptime load averages 14.5, 12.4, 15.4 at the start of the recall_rows re-run, on 12 cores; the main run’s load was not recorded), so read them as upper bounds and as ratios between rows, not as absolute figures. Medians come from the sample counts shown; write latencies are fsync-bound and noisy, so the p95 column is not a promise. Full output: dogfood/results/caps-1m.md; harness: crates/core-api/examples/caps_bench.rs. No cap was changed.

CapValueMeasured at 1M nodesVerdict
MAX_QUERY_TERMS (recall.rs)24recall_rows on text that matches (topic words planted in 100 nodes per row): 6 terms 132 ms p50, 12 terms 194 ms, 24 terms 280 ms p50 (325 ms p95). The index search alone (search_hybrid over every declared field, random Zipf words) is 240 ms p50 at 24 terms, 173 ms at 12, 353 ms at 48 and 460 ms at 96; on the hundred most common words 169 / 67 / 310 / 588 ms. Marginal cost per term (Zipf): 5.6 ms from 12 to 24, 4.7 ms from 24 to 48, 2.2 ms from 48 to 96; (common words): 8.5, 5.9, 5.8 ms. A 400-word topic reports terms = 24. The 1.1 ms recall p50 in the run is the 2,018 documentation paragraphs used as stand-in prompts, whose words are in no node, so no posting list is read; it is not the cost of a matching topic. Of those paragraphs, p50 was 14 terms and p90 and above were 24, so 24.8 % hit the cap.Kept. The cap bounds a once-per-turn query at about 0.3 s at 1M nodes. A cap of 12 would clip more than half of these prompts (their p50 is 14) and save about 85 ms; 48 would add about 110 ms of index search for terms a digest of six lines cannot use. Measured under load, see below.
Half-coverage floor (recall_rows)at least half the topic’s termsA planted target is returned at floor 1/2 when it holds 1 of 2, 2 of 3, 2 of 4 or 3 of 5 terms, and not at 1 of 3, 2 of 5 or fewer. Unrelated topics still return a hit at the shipped floor in 300 of 300 two-word topics, 104 of 300 three-word, 169 of 300 four-word, 1 of 300 six-word, 0 of 300 ten-word. Floor 2/3 cuts the two-word case to 53 of 300 and drops every 1-of-2 target.Kept, with the cost stated. A two-word topic naming an entity and an action finds the entity (1 of 2); the price is that short topics of unrelated common words return a hit, which the covered count shows. A stricter floor loses the shape this product is made of.
MAX_FULLTEXT_PAIRS (remember.rs)32One call naming 40 fresh labels declares 24 (8 default + 24 = 32) and the engine reports exactly those; on a store already at 32 it declares 0 in 21 ms. With the same text spread over 32 pairs instead of 8: remember p50 14.6 ms vs 14.3 ms (300 alternating calls each), snapshot size identical (125.9 MiB). Open time is not published: the open numbers in this run came from a machine whose load was not recorded for the main run and was 14–16 on 12 cores during the re-run. Declaring one pair on a populated label costs 111–423 ms.Kept. Pair count did not move write latency or snapshot size at equal text volume, so the cap guards against unbounded growth rather than a measured write cost. Open time was not compared.
MAX_PROVISIONAL_PER_COMMIT (remember.rs)20remember p50 with 0, 1, 5, 10, 20, 21, 40, 100 unknown about keys: 21.0, 19.1, 16.9, 17.5, 20.1, 17.8, 19.0, 21.7 ms (60 interleaved calls each). Stubs created never exceeded 20; the rest were listed in provisional_capped (1, 20 and 80 for 21, 40 and 100 keys).Kept. A stub costs nothing a fsync-bound write shows, so 20 is a flood guard and not a cost limit. How many stubs a real caller needs per call was not measured; no caller telemetry exists.

analyze at 1,000,300 nodes (about 1.6 million edges, budget_ms 0 as the tool runs it): degree 461 ms, components 631 ms, central (PageRank, converged) 844 ms, clusters (Louvain) 5.3 s. Peak resident memory for the run was 1.3 GiB.

Not measured: real prompts (the stand-in was documentation text, not conversation), real entity text, and ten million nodes.