Ali Rathore

Case study 04

A lockless hash table in a database core

Inside SAP HANA, where a single data structure tripled parallel query throughput.

Early in my career I worked inside the SAP HANA in-memory database core, on the layer where computer science stops being a metaphor. The team’s problem was contention: parallel queries serialized on a shared persistent hash table, and every lock acquired was throughput surrendered.

The fix was to remove the locks entirely. I engineered a lockless persistent hash table for the core engine: compare-and-swap progressions instead of mutexes, memory layouts designed for cache lines rather than for readability, correctness arguments that had to hold under every interleaving the hardware could produce. Parallel query throughput improved 200%.

The same years taught adjacent lessons in mechanical sympathy: SIMD vectorization for the hot paths, RDMA for moving data between nodes without burning CPU on the way. And one organizational lesson that outlasted the technical ones: I led HANA’s Hadoop integration across teams in four countries, which is where I learned that distributed systems problems and distributed team problems are the same problem wearing different clothes.

I include this work because it is the foundation under everything since. People who have fought false sharing at 3 a.m. design different platforms than people who have not.