Postgres-grade Serializable at 20k+ ops/s — on a laptop. Don’t try this at home. | by Hugo Vantighem | May, 2026 | MediumSitemapOpen in appSign up<br>Sign in
Medium Logo
Get app<br>Write
Search
Sign up<br>Sign in
Postgres-grade Serializable at 20k+ ops/s — on a laptop. Don’t try this at home.
Hugo Vantighem
3 min read·<br>8 hours ago
Listen
Share
They didn’t know it was impossible, so they did it. — Mark Twain
In the software industry, we’ve been raised with a dogma: you must choose between Massive Performance (NoSQL, eventual consistency) and Domain Rigor (SQL, strong consistency, serializable).<br>We are told that locks, latencies, and ACID properties are the natural enemies of speed. That if you want to scale, you have to let go of your business invariants.<br>I decided to test another hypothesis. And I broke the myth.<br>The Result: 20 000+ Validated Transactions per Second<br>This isn’t a “fire and forget” ingestion log.<br>This isn’t a volatile cache experiment.<br>What you see here is Business Transaction Durability :<br>* Invariants validated: every business rule is checked before commit.<br>* State persisted: every change is durably written to disk.<br>* Strong Consistency: Serializable-level isolation.<br>At 20 000+ ops/s, we are not just talking about speed. We are talking about the ability to maintain absolute domain integrity under massive load.<br>And the kicker: this is running on a MacBook Air M3 — 8 cores, 16 GB of RAM, the same machine I write the code on. No 64-core server. No NVMe array. No datacenter rack. One laptop, fan barely audible, doing the work of a small cluster.<br>Why General-Purpose Databases hit a ceiling<br>Most databases are built for general cases. They treat every row the same way because they don’t know your business. This “Domain Ignorance” leads to generic row locks, MVCC bookkeeping, cross-table coordination, and massive overhead — costs you pay on every single transaction, whether your domain needs them or not.<br>Not magic — discipline<br>For the skeptics: this isn’t sorcery. It’s discipline applied to the right layer — designing the system so the hardware does exactly what it’s good at, and nothing else.<br>I’m not reinventing the storage wheel. The foundation is Pebble , the same proven LSM-tree engine that powers CockroachDB. But the engine is just the floor. The real lever is the orchestration of the domain logic on top of it — and that’s what Part 2 puts a name on.<br>A Note on the Benchmark Scope<br>I know what you’re thinking. ”20k+ ops/s? That must be an internal memory trick.”<br>It isn’t. To ensure these numbers reflect real-world usage , the benchmark covers the entire lifecycle of a business transaction:<br>1. Client-side serialization (the payload starts from the app).<br>2. Local communication (end-to-end roundtrip).<br>3. Server-side deserialization & parsing.<br>4. Business Invariants validation .<br>5. Disk persistence with full durability guarantees — fsync on every commit.<br>The workload: batch=1000, payload=1KB, single-node, single laptop. Here’s the run, with the system-level disk stats captured live during the bench<br>[23755.87 items/s] | items=1424000 | batch=1000 | payload=1KB | durability=FSYNC-ONPress enter or click to view image in full size
Live capture during the bench (batch=1000, 1KB, fsync ON). Disk on fire, CPU bored.Two things jump out of that stats panel — and together they’re the whole point:<br>- The disk is screaming. Sustained 100–200 MB/s with the ⚡ markers firing almost every second. This is real fsync’d traffic hitting the SSD, not a memory cache pretending to be durable. If you pulled the power cord mid-run, every committed transaction would still be there on reboot.<br>- The CPU is bored (~18% on an 8-core M3). The compute is idle while the disk pegs out — that asymmetry is the whole story.<br>And this isn’t the ceiling. With bigger batches the same laptop pushes further; even at batch=1, it doesn’t fall off a cliff. The full envelope is Part 2.<br>What’s Next?<br>This is just Part 1. In a few days, Part 2 finishes the picture and lands the real punchline: business rules aren’t a tax on performance — they’re the contract that lets the machine fly. And the whole thing runs on hardware your team could expense, not a cloud bill that needs board approval.<br>Stay tuned. The era of the “Impossible Trade-off” is over.
Software Architecture
Performance
Database
Backend
Distributed Systems
Written by Hugo Vantighem<br>0 followers<br>·1 following
Principal Software Engineer | Distributed Systems & Backend Architecture enthusiast | Building scalable, resilient systems with Go & PostgreSQL.
Help
Status
About
Careers
Press
Blog
Privacy
Rules
Terms
Text to speech