Serial execution removes the problem class, not the bottleneck
Serial execution makes serializability free by deleting interleaving, then charges every transaction the full latency of one core.
Running every transaction on one core removes locks, conflict detection, and aborts, because nothing else can touch the data while a transaction runs. Correctness becomes a property of the hardware schedule rather than something the database enforces. The cost arrives in the form of latency: each operation's duration is charged to every transaction queued behind it. Throughput therefore equals one divided by the time one transaction holds the core.
The mechanism starts with a queue. Client requests arrive as operations, and one thread drains the queue in order, executing each to completion before taking the next. Data lives entirely in memory, so a lookup is a hash-table probe or a tree walk with no disk read on the path. Ranges need an ordered structure such as a balanced tree, while point lookups use a hash index. Clients avoid multiple round trips by sending a stored procedure: the logic is preloaded into the database, and the client sends a product id and a quantity instead of a long script. Each transaction is then one short, uninterrupted run on the core, and nothing else in the system executes during that run.
The abstraction hides the disk, which returns the moment durability matters. Memory is fast but not durable, so each commit must reach a write-ahead log before it returns. Fsyncing once per transaction makes the disk the throughput ceiling, however fast the core is. Batching many transactions behind one fsync recovers throughput, at the price of each commit waiting for its batch. The specific failure: a stream of small writes already keeps one core busy. An analytical report joins the same queue as a single long scan of a large table. Nothing deadlocks and nothing aborts, yet every write waits behind the scan, so p99 latency grows to the length of the report.
Treat serial execution as a bet with three preconditions, and check each before committing. First, confirm the working set fits in memory on one node with room to grow, because a dataset that spills past RAM brings the disk back on every read. Second, confirm transactions are short and touch a single partition, so the queue stays a queue rather than a chain of distributed commits. Third, compute the ceiling as one divided by per-transaction time, using peak load and the durability setting you intend to run. If any answer is no, the design pays its costs without collecting its benefits. Keep stored procedures for the genuinely hot path, and decide explicitly whether you are buying durability or throughput, because the design forces that choice.
- cores per shard
- one shard per core
- transaction length
- microseconds
- cluster demo
- about 1 million ops/sec
- log flush
- one fsync per batch
Each shard owns its memory and I/O queue, so cores run independently.
Throughput is one divided by this figure, so each saved microsecond raises the ceiling.
A small ScyllaDB cluster reached this in a 2015 vendor demo, not a benchmark.
Many transactions share one disk flush, so batch size sets the commit wait.
Taking lock-free serial execution from one machine to many cores looks like a threading exercise. The naive first design is a shared buffer pool guarded by mutexes, which is what a general-purpose database usually does. It is easy to reason about and works at small scale.
The wall appears under load. Every core contends for the same cache lines, so adding cores stops adding throughput. Tail latency grows as well, because a request waits behind a lock held by an unrelated query. The shared structures become the bottleneck, and the fix is structural rather than tuning.
ScyllaDB answers with shard-per-core. Each core runs one shard with its own memory allocator and I/O queue, and work for another shard travels as a message rather than through shared memory. A 2015 vendor demo served a million operations per second on a small cluster.
The non-obvious lesson: serial execution does not mean single-threaded. The unit of concurrency becomes the core, and the cost you remove is the coherence traffic between cores that shared data structures generate. Each shard owns its data, so most operations never touch another core's cache lines.