Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks
Ajay Singh, Nikos Metaxakis, Panagiota Fatourou
TL;DR
SEC (Sharded Elimination and Combining) introduces a blocking linearizable stack that integrates elimination and software combining using thread sharding. By partitioning threads into aggregators and further into batches, SEC achieves high parallelism with minimal CAS contention on the top pointer, using two lightweight counters per batch to implement elimination and coordination. The approach delivers significant throughput gains over previous stacks across NUMA-heavy, high-thread-count environments, particularly under high contention, and scales through multiple aggregators and batch-level combining. The combination of sharded elimination with batch-level combining offers a practical, generalizable technique for concurrent data structures beyond stacks, with demonstrated effectiveness on large multicore systems.
Abstract
We present a new blocking linearizable stack implementation which utilizes sharding and fetch&increment to achieve significantly better performance than all existing concurrent stacks. The proposed implementation is based on a novel elimination mechanism and a new combining approach that are efficiently blended to gain high performance. Our implementation results in enhanced parallelism and low contention when accessing the shared stack. Experiments show that the proposed stack implementation outperforms all existing concurrent stacks by up to 2X in most workloads. It is particularly efficient in systems supporting a large number of threads and in high contention scenarios.
