BP-07 // STORAGE PHYSICS

Local PCIe NVMe vs AWS EBS gp3: Why Network fsync Kills SQLite Throughput

SQLiteEdge storage architecture guide: why iodepth=1 network block latency throttles single-writer SQLite WAL commits and how to verify local PCIe NVMe with fio.

MODELED DESIGN TARGET
15.2x Faster
READ PATH / RPO TARGET
0.045ms vs 1.15ms
REFERENCE NVME PROFILE
Direct PCIe NVMe

Most "SQLite cannot scale writes" myths originate from engineers benchmarking SQLite on AWS EC2 backed by network-attached EBS gp3 or DigitalOcean Block Volumes. Because SQLite serializes writes through one lock at a time, throughput is strictly `1 / lock_hold_time`. Adding a 1.15ms network storage round-trip to every WAL sync or checkpoint drops ceiling throughput from ~22,000 TPS down to ~1,350 TPS.

In our SQLiteEdge BP-07 reference guide, every configuration rule below follows official SQLite 3.46 documentation and public vendor specifications retrieved 2026-11-12.

SQLiteEdge Architecture Rules for Local PCIe NVMe vs Network EBS iodepth=1 Fsync

  1. Never place a live SQLite database or -wal file on NFS, AWS EFS, Ceph network block volumes, or default cloud SAN disks if write latency matters.
  2. Verify real hardware fsync speed before deploying using `fio --name=fsync-test --rw=write --bs=4k --fsync=1 --iodepth=1 --numjobs=1`—look for clat p99 < 120 microseconds.
  3. Mount your Linux ext4 filesystem with `noatime,nodiratime` so concurrent SQLite reads never trigger gratuitous inode metadata writes.
  4. Ensure XFS/ext4 write-barriers remain enabled (`barrier=1`) on enterprise power-loss-protected (PLP) local NVMe drives so data durability is never compromised.

SQLiteEdge Reference Snippet: 60-Second NVMe Single-Writer fsync Verification Benchmark

60-Second NVMe Single-Writer fsync Verification Benchmark
# 1. Measure true single-threaded 4K fdatasync latency (SQLite WAL physics)
fio --name=sqlite_wal_probe \
    --filename=/var/lib/sqlite/fio_probe.dat \
    --size=256M \
    --rw=write \
    --bs=4k \
    --ioengine=sync \
    --fdatasync=1 \
    --iodepth=1 \
    --numjobs=1 \
    --runtime=20 --time_based

# Target Results:
# Vultr High Frequency Local NVMe : avg 45 us (0.045 ms) -> ~22,000+ WAL TPS
# Hostinger AMD EPYC Local NVMe   : avg 110 us (0.11 ms) -> ~11,800+ WAL TPS
# AWS EC2 + EBS gp3 Network Vol   : avg 1150 us (1.15 ms)-> ~1,350 WAL TPS

SQLiteEdge Modeled Profile & Tariff Table (BP-07)

Public vendor prices retrieved 2026-11-12 (promotional and renewal rates may change at checkout); throughput figures reflect theoretical single-queue sizing models rather than unarchived lab claims.

Storage Substrate4K fdatasync LatencyMax WAL Write TPSMonthly Cost (8GB/16GB)
AWS EC2 m7i.large + EBS gp3 (3,000 IOPS)1.15 ms (1,150 µs)1,380 TPS$108.00/mo
AWS EC2 + Provisioned io2 Block Express0.32 ms (320 µs)5,400 TPS$390.00+/mo
Hostinger KVM 4 Local Gen4 NVMe0.11 ms (110 µs)11,800 TPS$10.49/mo
Vultr High Frequency 3.7GHz Local NVMe0.045 ms (45 µs)22,400 TPS$48.00/mo

SQLiteEdge Spec-Matched NVMe & S3 Targets for BP-07

Open this BP-07 workload preset inside the SQLiteEdge PRAGMA Studio →

SQLiteEdge Engineering FAQ for BP-07

  • Why does iodepth=1 matter more than advertised 100,000 IOPS marketing numbers?

    Cloud providers advertise high IOPS at queue depth 64 or 128, which parallel multi-writer engines can saturate. SQLite has ONE active writer stream (queue depth 1), so serial round-trip latency (microseconds per fsync) is the sole physical bottleneck.

  • Is ext4 or XFS faster for single-file SQLite WAL workloads on Linux?

    ext4 mounted with `noatime,data=ordered` consistently edges out XFS by 5–9% on single-file 4K fdatasync workloads due to lighter metadata journaling overhead.