跳至正文内容
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 的真实探测、同等 FULL 落盘并发写到千库隔离 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% 写开销区间,并校验磁盘页密文与 100 字节文件头边界。

对照目标
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 静态索引驱动