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

Benchmarks

This page tracks MuroDB performance over time for a fixed embedded-DB style workload mix. Each entry is tied to a concrete version (git commit) so changes can be compared historically.

Benchmark Scope

Current benchmark runner: src/bin/murodb_bench.rs

Workloads:

  • point_select_pk: point lookup by primary key (SELECT ... WHERE id = ?)
  • point_update_pk: point update by primary key (UPDATE ... WHERE id = ?)
  • insert_autocommit: single-row insert per transaction (auto-commit)
  • range_scan_limit_100: range read (WHERE id >= ? ORDER BY id LIMIT 100)
  • mixed_80r_15u_5i: mixed OLTP-like workload (80% read / 15% update / 5% insert)
  • fts_select_natural: fulltext natural-language search (MATCH(body) AGAINST(... IN NATURAL LANGUAGE MODE))
  • fts_update_point: point update on FTS-indexed TEXT column
  • fts_mixed_70q_30u: FTS-focused mixed workload (70% search / 30% update)

Additional microbenchmark:

  • murodb_snippet_bench: compares legacy vs current fts_snippet() implementation on representative text sizes and reports approximate offset-map memory bytes.

Default dataset/config:

  • initial rows: 20,000
  • fts initial rows: 256
  • select ops: 20,000
  • update ops: 5,000
  • insert ops: 5,000
  • scan ops: 2,000
  • mixed ops: 10,000
  • fts select ops: 5,000
  • fts update ops: 2,000
  • fts mixed ops: 5,000
  • warmup ops: 200
  • batch size (initial load): 500

Run command:

cargo run --release --bin murodb_bench

Migration note: as of 2026-02-22, benchmark scope includes additional FTS workloads. Older entries without FTS metrics are not directly comparable on total runtime.

Versioned Results

Date (UTC)CommitEnvironmentNotes
2026-02-22a78694537f59local dev machinefirst baseline
2026-02-22829ad18145c2local dev machineafter secondary-index root persistence fix
2026-02-225c422b8blocal dev machineadded snippet microbenchmark and UTF-8 offset-map optimization

2026-02-22 / a78694537f59

Raw output summary:

WorkloadOpsTotal secOps/secp50 (ms)p95 (ms)p99 (ms)
point_select_pk20,0000.144532138,377.800.00820.00960.0108
point_update_pk5,00027.098314184.515.22106.92868.9318
insert_autocommit5,0008.785356569.131.54802.48165.7406
range_scan_limit_1002,00020.24066498.819.632613.531013.9811
mixed_80r_15u_5i10,00010.417702959.900.01126.24216.7669

Row counts:

  • start: 20,000
  • after insert phase: 25,000
  • final: 25,519

2026-02-22 / 829ad18145c2

Raw output summary:

WorkloadOpsTotal secOps/secp50 (ms)p95 (ms)p99 (ms)
point_select_pk20,0000.123495161,949.510.00720.00760.0087
point_update_pk5,0008.146347613.771.48562.05785.4681
insert_autocommit5,0008.675668576.321.50772.70745.8033
range_scan_limit_1002,00018.577489107.669.220712.172912.5408
mixed_80r_15u_5i10,0003.6263372,757.600.00981.72562.4382
fts_select_natural5,0002.7977001,787.180.55950.60870.6366
fts_update_point2,00011.462999174.475.43217.06259.7803
fts_mixed_70q_30u5,00010.865190460.190.62966.33757.4033

Row counts:

  • start: 20,000
  • after insert phase: 25,000
  • final: 25,519

2026-02-22 / 5c422b8b (Snippet Microbenchmark)

Command:

cargo run --release --bin murodb_snippet_bench

Raw output summary:

CaseItersLegacy p50 (us)New p50 (us)p50 SpeedupApprox offset-map bytes
snippet_short_tail_hit2,00014.1015.090.93x4,936
snippet_medium_tail_hit2,000126.01127.930.99x48,136
snippet_long_tail_hit5001245.521228.431.01x480,136

Notes:

  • Short/medium cases are near parity.
  • Long tail-hit case shows small but measurable p50 reduction.
  • Offset-map memory is linear in normalized char count: (chars + 1) * sizeof(usize).

2026-02-22 / Stop-ngram behavior example

Reference scenario (same as SQL integration tests):

SettingQueryExpected behavior
stop_filter=offMATCH(body) AGAINST('東京タワー' IN NATURAL LANGUAGE MODE)broader recall (東京* docs can match)
stop_filter=on, stop_df_ratio_ppm=500000samehigher precision (mostly exact-intent doc remains)

Adding New Entries

When updating this page for a new version:

  1. Run cargo run --release --bin murodb_bench.
  2. Record git rev-parse --short=12 HEAD.
  3. Append one row to the “Versioned Results” table.
  4. Add a new subsection with the raw metrics table for that commit.

Keep benchmark parameters constant unless intentionally changing the benchmark definition. If benchmark definitions change, include a short migration note in the new entry.