examples/sqlite-raw/BENCH_RESULTS.md
Captured on 2026-04-15 from /home/nathan/rivet/examples/sqlite-raw.
pnpm --dir examples/sqlite-raw bench:large-insert
Additional runs:
BENCH_MB=1 pnpm --dir examples/sqlite-raw bench:large-insert
BENCH_MB=5 pnpm --dir examples/sqlite-raw bench:large-insert
BENCH_MB=10 pnpm --dir examples/sqlite-raw bench:large-insert
RUST_LOG=rivetkit_sqlite_native::vfs=debug BENCH_MB=1 pnpm --dir examples/sqlite-raw bench:large-insert
examples/sqlite-rawhttp://127.0.0.1:6420TEXT payloadnode:sqlite| Payload | Actor DB Insert | Actor DB Verify | End-to-End Action | Native SQLite Insert | Actor DB vs Native | End-to-End vs Native |
|---|---|---|---|---|---|---|
| 1 MiB | 832.2ms | 0.4ms | 1137.6ms | 1.8ms | 461.11x | 630.34x |
| 5 MiB | 4199.6ms | 3655.5ms | 8186.3ms | 25.3ms | 166.19x | 323.96x |
| 10 MiB | 9438.2ms | 8973.5ms | 19244.0ms | 45.5ms | 207.34x | 422.75x |
From the debug run with RUST_LOG=rivetkit_sqlite_native::vfs=debug and BENCH_MB=1:
317 total KV round-trips30 get(...) calls287 put(...) calls577 total keys writtenget: 63.1msput: 856.0msThe current SQLite-over-KV path is chunking the database into 4 KiB pages and issuing a large number of KV writes and reads through the tunnel for a single large insert. The evidence points much more strongly at the SQLite VFS / KV channel / engine path than at raw SQLite execution.