跳至正文內容
TursoDB.cn 獨立社群 · MVCC 並行寫入與每 Agent 獨立庫實戰 閱讀解析 →
真實環境校驗實驗室 已載入完整真實硬體校驗數據

TursoDB 真實環境實測與校驗中心

公開可重現的真實硬體基準套件,涵蓋 Node.js、Bun、Rust 與 Shell 執行環境。堅持零編造數據——所有向量圖表均由真實 Linux 實機產出的 JSON 直接驅動渲染。

實測環境指紋

linux-kvm-xeon-e2288g-v2 · 2026-12-05T19:14:15Z
CPU / RAM
Intel(R) Xeon(R) E-2288G CPU @ 3.70GHz (8c / 7.8GB)
Virt / Kernel
kvm · 6.8.0-147-generic
io_uring Probe
ENABLED · io_uring_setup(8) succeeded
Filesystem
ext4

8 大可重現真實校驗場景(E1–E8)

每個場景鎖定一個真實生產問題——從容器 seccomp 攔截 io_uring 實測到千庫隔離 AI Agent 架構。

E1 VERIFIED
Node.js Bun

並發寫入壓測:TursoDB MVCC vs SQLite WAL

1 / 4 / 8 / 16 並發寫入,涵蓋無衝突追加與熱點行爭搶兩組真實負載。

對照目標
TursoDB(BEGIN CONCURRENT)vs better-sqlite3 / bun:sqlite(WAL)
實測指標
寫入 TPS · p50 / p95 / p99 延遲 · SQLITE_BUSY 與衝突重試率
重現指令
bash benchmarks/run-suite.sh --only e1 --runtime all

Concurrent Read-Compute(2ms)-Write TX @ 16w (bun 1.4.5)

越高越好 · tx/s
TursoDB BEGIN CONCURRENT · 16w (p99 44.894ms · retries 0%) 1,795 tx/s
bun:sqlite (WAL FULL) BEGIN IMMEDIATE · 16w (p99 933.177ms · busy 170) 261.6 tx/s

Concurrent Read-Compute(2ms)-Write TX p99 Latency @ 16w (bun 1.4.5)

越低越好 · ms
TursoDB BEGIN CONCURRENT · 16w 44.9 ms
bun:sqlite (WAL FULL) BEGIN IMMEDIATE · 16w (pessimistic writer lock queue) 933.2 ms

Durable Append Throughput — Verified FULL Sync (bun 1.4.5)

越高越好 · ops/s
TursoDB MVCC · 1w (bun 1.4.5) (sync=2 · retries 0%) 2,853 ops/s
bun:sqlite (WAL FULL) · 1w (sync=2 · busy 0) 2,463 ops/s
TursoDB MVCC · 4w (bun 1.4.5) (sync=2 · retries 0%) 2,700 ops/s
bun:sqlite (WAL FULL) · 4w (sync=2 · busy 14) 2,141 ops/s
TursoDB MVCC · 8w (bun 1.4.5) (sync=2 · retries 0%) 2,793 ops/s
bun:sqlite (WAL FULL) · 8w (sync=2 · busy 26) 2,431 ops/s
TursoDB MVCC · 16w (bun 1.4.5) (sync=2 · retries 0%) 2,399 ops/s
bun:sqlite (WAL FULL) · 16w (sync=2 · busy 89) 1,464 ops/s

Durable Append p99 Latency — Verified FULL Sync (bun 1.4.5)

越低越好 · ms
TursoDB MVCC · 1w (bun 1.4.5) 0.61 ms
bun:sqlite (WAL FULL) · 1w 0.78 ms
TursoDB MVCC · 4w (bun 1.4.5) 2.94 ms
bun:sqlite (WAL FULL) · 4w 1.17 ms
TursoDB MVCC · 8w (bun 1.4.5) 3.59 ms
bun:sqlite (WAL FULL) · 8w 1.31 ms
TursoDB MVCC · 16w (bun 1.4.5) 46.6 ms
bun:sqlite (WAL FULL) · 16w 258.8 ms

Concurrent Read-Compute(2ms)-Write TX @ 16w (node v22.23.5)

越高越好 · tx/s
TursoDB BEGIN CONCURRENT · 16w (p99 57.322ms · retries 0%) 1,353 tx/s
better-sqlite3 (WAL FULL) BEGIN IMMEDIATE · 16w (p99 916.636ms · busy 169) 268.1 tx/s

Concurrent Read-Compute(2ms)-Write TX p99 Latency @ 16w (node v22.23.5)

越低越好 · ms
TursoDB BEGIN CONCURRENT · 16w 57.3 ms
better-sqlite3 (WAL FULL) BEGIN IMMEDIATE · 16w (pessimistic writer lock queue) 916.6 ms

Durable Append Throughput — Verified FULL Sync (node v22.23.5)

越高越好 · ops/s
TursoDB MVCC · 1w (node v22.23.5) (sync=2 · retries 0%) 2,410 ops/s
better-sqlite3 (WAL FULL) · 1w (sync=2 · busy 0) 2,259 ops/s
TursoDB MVCC · 4w (node v22.23.5) (sync=2 · retries 0%) 2,748 ops/s
better-sqlite3 (WAL FULL) · 4w (sync=2 · busy 13) 2,272 ops/s
TursoDB MVCC · 8w (node v22.23.5) (sync=2 · retries 0%) 2,670 ops/s
better-sqlite3 (WAL FULL) · 8w (sync=2 · busy 27) 2,149 ops/s
TursoDB MVCC · 16w (node v22.23.5) (sync=2 · retries 0%) 2,406 ops/s
better-sqlite3 (WAL FULL) · 16w (sync=2 · busy 93) 1,403 ops/s

Durable Append p99 Latency — Verified FULL Sync (node v22.23.5)

越低越好 · ms
TursoDB MVCC · 1w (node v22.23.5) 0.96 ms
better-sqlite3 (WAL FULL) · 1w 0.91 ms
TursoDB MVCC · 4w (node v22.23.5) 2.51 ms
better-sqlite3 (WAL FULL) · 4w 1.07 ms
TursoDB MVCC · 8w (node v22.23.5) 5.42 ms
better-sqlite3 (WAL FULL) · 8w 102.6 ms
TursoDB MVCC · 16w (node v22.23.5) 42.0 ms
better-sqlite3 (WAL FULL) · 16w 207.8 ms
E2 VERIFIED
Shell Node.js Bun

Linux I/O 堆疊與虛擬化實測:io_uring × fsync × seccomp

實測探測核心 io_uring_setup 系統呼叫可用性,量化 4 KiB WAL fsync 延遲與解耦佇列深度 fio 吞吐。

對照目標
Linux KVM / 實體機(io_uring qd=1 與 qd=8)vs 阻塞式 psync(qd=1)及容器 seccomp 探測
實測指標
io_uring 系統呼叫結果 · 4K fsync p50/p95/p99 · 解耦 fio IOPS
重現指令
bash benchmarks/run-suite.sh --only e2

4KiB WAL fsync Latency (kvm · ext4)

越低越好 · ms
fsync p50 0.35 ms
fsync p95 0.49 ms
fsync p99 0.58 ms

fio 4K Random Write + fsync: io_uring (qd=8/1) vs psync (qd=1) (kvm)

越高越好 · IOPS
fio io_uring (qd=8 · kvm) (fsync p99 1.09ms · write clat p99 0.444ms) 16,641 IOPS
fio io_uring (qd=1 · kvm) (fsync p99 0.758ms · write clat p99 0.092ms) 2,391 IOPS
fio psync (qd=1 · kvm) (fsync p99 0.618ms · write clat p99 0.023ms) 2,926 IOPS
E3 VERIFIED
Node.js Bun

每 Agent 獨立庫密度:100 / 1,000 / 5,000 庫極限測試

實測單機批次建庫耗時、程序 RSS 記憶體、磁碟佔用與跨千庫隨機並發讀延遲。

對照目標
TursoDB 每 Agent 獨立檔案 vs PostgreSQL 單實例多租戶對照
實測指標
建庫總耗時 · RSS 記憶體(MB) · 磁碟體積 · 100 並發隨機讀 p99
重現指令
bash benchmarks/run-suite.sh --only e3 --runtime all

Per-Agent DB Provisioning Time (1000 DBs · bun 1.4.5)

越低越好 · ms
Avg create + schema + seed per DB 3.30 ms

Resource Footprint Across 1000 Isolated DBs (bun 1.4.5)

越低越好 · MB
Process RSS (1000 warm handles open) (base 39.62MB / create 58.71MB / closed 169.09MB) 2,165 MB
Total disk footprint (.db + WAL) 24.0 MB

Multi-Tenant Read p99 @ 50 concurrency (bun 1.4.5)

越低越好 · ms
TursoDB 1000 Isolated DBs — Warm Cache (bun 1.4.5) (p50 0.395ms · in-process (0 TCP)) 0.56 ms
PostgreSQL 16 Shared Table — Warm Pool (1000 tenants) (p50 2.255ms · max=50 TCP named-prepared) 7.55 ms
TursoDB 1000 Isolated DBs — Fresh Open+Close (zero-cache serverless handle open) 30.3 ms

Per-Agent DB Provisioning Time (1000 DBs · node v22.23.5)

越低越好 · ms
Avg create + schema + seed per DB 2.72 ms

Resource Footprint Across 1000 Isolated DBs (node v22.23.5)

越低越好 · MB
Process RSS (1000 warm handles open) (base 58.99MB / create 72.87MB / closed 182.73MB) 2,185 MB
Total disk footprint (.db + WAL) 24.0 MB

Multi-Tenant Read p99 @ 50 concurrency (node v22.23.5)

越低越好 · ms
TursoDB 1000 Isolated DBs — Warm Cache (node v22.23.5) (p50 0.785ms · in-process (0 TCP)) 1.23 ms
PostgreSQL 16 Shared Table — Warm Pool (1000 tenants) (p50 3.898ms · max=50 TCP named-prepared) 8.02 ms
TursoDB 1000 Isolated DBs — Fresh Open+Close (zero-cache serverless handle open) 28.4 ms
E4 VERIFIED
Shell Node.js Bun

核心原生加密開銷:明文 vs AEGIS-256 vs AES-256-GCM

在 AES-NI 實機驗證官方 6% 讀 / 14% 寫開銷區間,並校驗磁碟頁密文與檔頭邊界。

對照目標
TursoDB 明文 vs --experimental-encryption(aegis256 / aes256gcm)
實測指標
讀寫效能損耗百分比 · 磁碟密文驗證 · 無金鑰拒絕開啟實證
重現指令
bash benchmarks/run-suite.sh --only e4

Bulk Write Latency: Plaintext vs Native Encryption (50,000 rows · median)

越低越好 · ms
TursoDB Plaintext (50,000 rows bulk write) (Baseline (unencrypted)) 195.0 ms
TursoDB AEGIS-256 (50,000 rows bulk write) (+40.0% vs Plaintext) 273.0 ms
TursoDB AES-256-GCM (50,000 rows bulk write) (+64.1% vs Plaintext) 320.0 ms

Full-Table Decrypt Scan Latency (50,000 rows · fresh open median)

越低越好 · ms
TursoDB Plaintext (full-table decrypt scan) (Baseline (unencrypted)) 14.0 ms
TursoDB AEGIS-256 (full-table decrypt scan) (+42.9% vs Plaintext) 20.0 ms
TursoDB AES-256-GCM (full-table decrypt scan) (+135.7% vs Plaintext) 33.0 ms
E5 VERIFIED
Node.js Bun

原生向量精準度實測:vector32 vs vector8 vs vector1bit

基於 1 萬 / 5 萬 / 10 萬筆 384 維向量,量化壓縮比、餘弦檢索延遲與 Top-10 召回率權衡。

對照目標
TursoDB vector32 vs vector8(~4x 壓縮)vs vector1bit(~32x 壓縮)
實測指標
資料庫體積(MB) · Top-10 餘弦檢索延遲 · Recall@10 召回率
重現指令
bash benchmarks/run-suite.sh --only e5 --runtime all

Vector Storage Footprint (10000 × 384d · WAL-checkpointed · bun 1.4.5)

越低越好 · MB
TursoDB vector32 (10000 × 384d) (float32 baseline (1.0×)) 19.6 MB
TursoDB vector8 (10000 × 384d) (5.0× smaller vs float32) 3.92 MB
TursoDB vector1bit (10000 × 384d) (34.1× smaller vs float32) 0.57 MB

Cosine Top-10 p50 Latency & Recall@10 (bun 1.4.5)

越低越好 · ms
TursoDB vector32 Top-10 Cosine (bun 1.4.5) (p99 7.707ms · Recall@10 100%) 6.88 ms
TursoDB vector8 Top-10 Cosine (bun 1.4.5) (p99 5.892ms · Recall@10 97.2%) 5.79 ms
TursoDB vector1bit Top-10 Cosine (bun 1.4.5) (p99 2.22ms · Recall@10 10.5%) 2.17 ms

Vector Storage Footprint (10000 × 384d · WAL-checkpointed · node v22.23.5)

越低越好 · MB
TursoDB vector32 (10000 × 384d) (float32 baseline (1.0×)) 19.6 MB
TursoDB vector8 (10000 × 384d) (5.0× smaller vs float32) 3.92 MB
TursoDB vector1bit (10000 × 384d) (34.1× smaller vs float32) 0.57 MB

Cosine Top-10 p50 Latency & Recall@10 (node v22.23.5)

越低越好 · ms
TursoDB vector32 Top-10 Cosine (node v22.23.5) (p99 7.341ms · Recall@10 100%) 6.89 ms
TursoDB vector8 Top-10 Cosine (node v22.23.5) (p99 6.007ms · Recall@10 97.2%) 5.72 ms
TursoDB vector1bit Top-10 Cosine (node v22.23.5) (p99 2.255ms · Recall@10 10.5%) 2.15 ms
E6 VERIFIED
Node.js Bun

OLTP + OLAP 混合實測:TursoDB vs DuckDB(含 ATTACH 直連)

對比 10 萬次單行點寫與百萬行聚合分析,並實測 DuckDB 直接 ATTACH TursoDB 檔案零拷貝耗時。

對照目標
TursoDB(行存 OLTP)vs DuckDB(列存 OLAP)+ 零拷貝 ATTACH 聯動
實測指標
點寫 TPS · 百萬行 GROUP BY 延遲 · DuckDB ATTACH 直讀耗時
重現指令
bash benchmarks/run-suite.sh --only e6

OLTP Single-Row Point Writes (Prepared · 5000 tx · bun 1.4.5)

越高越好 · ops/s
TursoDB Row OLTP (bun 1.4.5) 2,519 ops/s
DuckDB Columnar (Prepared) 1,174 ops/s

OLAP GROUP BY Aggregation (100,000 rows · median · bun 1.4.5)

越低越好 · ms
TursoDB OLAP GROUP BY (100,000 rows) 33.2 ms
DuckDB Native Columnar (100,000 rows) 3.80 ms
DuckDB ATTACH → TursoDB .db (zero-copy) (Verified 100,000 rows) 20.2 ms

OLTP Single-Row Point Writes (Prepared · 5000 tx · node v22.23.5)

越高越好 · ops/s
TursoDB Row OLTP (node v22.23.5) 2,324 ops/s
DuckDB Columnar (Prepared) 1,191 ops/s

OLAP GROUP BY Aggregation (100,000 rows · median · node v22.23.5)

越低越好 · ms
TursoDB OLAP GROUP BY (100,000 rows) 32.6 ms
DuckDB Native Columnar (100,000 rows) 3.55 ms
DuckDB ATTACH → TursoDB .db (zero-copy) (Verified 100,000 rows) 21.5 ms
E7 VERIFIED
Rust Shell

新一代 Rust / Go 嵌入式橫評:TursoDB vs Stoolap vs ChaiSQL

以原生 Rust Cargo 與 Go 驅動,實測冷啟動、10 萬行寫入、主鍵點查 p99 與 sqlite3 檔案相容性。

對照目標
TursoDB(Rust)vs Stoolap(Rust)vs ChaiSQL(純 Go)
實測指標
冷啟動耗時 · 10 萬行寫入 TPS · 主鍵點查 p99 · sqlite3 相容實證
重現指令
bash benchmarks/run-suite.sh --only e7

Native Batch Insert Throughput (50,000 rows · Prepared · Rust --release)

越高越好 · rows/s
TursoDB 0.8.4 (Rust SQLite Format) (WAL + FULL · prepared) 696,035 rows/s
C SQLite 3.54.1 (rusqlite bundled) (WAL + FULL · prepared) 2,764,592 rows/s
Stoolap 0.5.1 (Rust HTAP) (file:// default sync (normal) · prepared) 492,556 rows/s

Native Primary-Key Point Lookup p99 (2,000 verified queries · Prepared)

越低越好 · ms
TursoDB 0.8.4 Point Lookup p99 (p50 0.0014ms) 0.0017 ms
C SQLite 3.54.1 Point Lookup p99 (p50 0.0012ms) 0.0014 ms
Stoolap 0.5.1 Point Lookup p99 (p50 0.0004ms) 0.0008 ms
E8 VERIFIED
Shell Bun Node.js

AgentFS 沙箱實戰:冷啟動、CoW 寫入、快照與 SQL 稽核

實測單檔 Agent 沙箱初始化、1,000 次檔案變更、cp 瞬時快照與 SQL 查詢 tool_calls 稽核耗時。

對照目標
AgentFS CLI / SDK 單檔 CoW 沙箱 vs 宿主機目錄對照
實測指標
沙箱初始化耗時 · 千檔寫入吞吐 · 快照耗時 · SQL 稽核查詢延遲
重現指令
bash benchmarks/run-suite.sh --only e8

AI Sandbox Snapshot (Uncompressed): AgentFS Single-File vs Host Dir (100 files)

越低越好 · ms
AgentFS Single-File Snapshot (`cp` after WAL checkpoint) (76.0 KiB · integrity_check=ok) 0.30 ms
Host Directory Snapshot (`cp -r`, 100 files) (19.1× vs single-file cp) 5.73 ms
Host Directory Archive (uncompressed `tar`, 100 files) (33.5× vs single-file cp) 10.1 ms

AgentFS Sandbox Operations & SQL Audit Latency

越低越好 · ms
AgentFS `init` (single .db) 20.9 ms
AgentFS CLI writes (100× fork/exec) (~8.76ms per CLI subprocess) 876.3 ms
AgentFS SQL Timeline Audit 16.3 ms

在你的 Linux 主機上一鍵重現

在任意 Linux 實體機或 KVM 虛擬機(建議 Linux >= 6.8、透傳 CPU AES-NI)中執行環境探測與實測套件。

Linux Real-Hardware · Node.js + Bun + Rust + Shell
# 1. Probe CPU flags (AES-NI/AVX2), Linux kernel, ZFS & real io_uring syscall
bash benchmarks/env-probe.sh

# 2. Install Node.js / Bun benchmark dependencies
(cd benchmarks && bun install)   # or: (cd benchmarks && npm install)

# 3. Run selected or all 8 scenarios across Node.js, Bun & Rust
bash benchmarks/run-suite.sh --all --runtime all

# 4. Import real hardware JSON report into website charts
npm run benchmarks:import benchmarks/results/<report>.json
搜尋
按 Esc 關閉 · 由 Pagefind 靜態索引驅動