Sqlite on a ramdisk with compression still faster than on a NVMe SSD
Yes, absolutely. Running SQLite on a compressed RAM disk (like ZRAM on Linux or a compressed third-party RAM drive on Windows) will comfortably outpace an NVMe SSD in almost all scenarios. The mechanics behind why this holds true break down into three primary vectors: latency , bandwidth , and OS caching behaviors . 1. Latency: The Unbridgeable Gap The most critical factor for SQLite performance is transactional latency (especially for serial, unbatched INSERT or UPDATE operations). NVMe SSD: Even the fastest Gen 5 NVMe drives operate at a hardware latency floor of roughly 10 to 50 microseconds (\mu s). RAM Disk: Accessing system memory happens in nanoseconds—typically around 10 to 100 nanoseconds (ns). Because RAM is roughly 1,000× to 5,000× faster in pure latency than flash memory, SQLite doesn't have to wait for the flash controller to clear cells or handle physical page mapping. 2. Bandwidth vs. CPU Compression Overhead You might wonder if the CPU overhead of ...