Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

3.0 KB
Raw Blame

M2: Sharded WAL — 16 WAL writers

Date: Fri Apr 17 10:44:24 PM UTC 2026 Config: ingest_shards=16 (default for 32 cores)

20M Doc Ingest (3 runs, 32 workers, batch=10000)

Run 1

 xerj index: complete
═══════════════════════════════════════════════════════════
 index          : battle-20m
 file           : /tmp/nginx_20m.ndjson
 file size      : 8632 MB
 docs sent      : 20000000
 errors         : 0
 ingest time    : 21.79 s
 ingest rate    : 917709 docs/s  (WAL-durable, in-memtable)
 final flush    : 1.14 s
 total elapsed  : 22.94 s
 total rate     : 871980 docs/s  (fully segment-durable)
 workers        : 32
 batch size     : 10000
═══════════════════════════════════════════════════════════
2026-04-17T22:44:48.131851Z  WARN xerj_engine::index: merge: failed to parse stored as RawValue: Serde("invalid type: newtype struct, expected any valid JSON value") at character 0

Run 2

 xerj index: complete
═══════════════════════════════════════════════════════════
 index          : battle-20m
 file           : /tmp/nginx_20m.ndjson
 file size      : 8632 MB
 docs sent      : 20000000
 errors         : 0
 ingest time    : 21.64 s
 ingest rate    : 924221 docs/s  (WAL-durable, in-memtable)
 final flush    : 1.18 s
 total elapsed  : 22.82 s
 total rate     : 876401 docs/s  (fully segment-durable)
 workers        : 32
 batch size     : 10000
═══════════════════════════════════════════════════════════
2026-04-17T22:45:14.575955Z  INFO xerj_storage::wal: WAL checkpoint written generation=8 max_seq_no=18498588

Run 3

 xerj index: complete
═══════════════════════════════════════════════════════════
 index          : battle-20m
 file           : /tmp/nginx_20m.ndjson
 file size      : 8632 MB
 docs sent      : 20000000
 errors         : 0
 ingest time    : 21.96 s
 ingest rate    : 910591 docs/s  (WAL-durable, in-memtable)
 final flush    : 2.27 s
 total elapsed  : 24.23 s
 total rate     : 825459 docs/s  (fully segment-durable)
 workers        : 32
 batch size     : 10000
═══════════════════════════════════════════════════════════

Comparison

Version Ingest rate Total rate Cores used
Single WAL (before) ~790k/s ~720k/s 9/32 (27%)
16 sharded WALs see above see above TBD