FIFO queues are a fundamental data structure used in a wide range of applications. Concurrent FIFO queues allow multiple execution threads to access the queue simultaneously. Maintaining strict FIFO semantics in concurrent queues leads to low throughput due to high contention at the head and tail of the queue. By relaxing the FIFO semantics to allow some reordering of elements, it becomes possible to achieve much higher scalability. This work presents two orthogonal designs for relaxed concurrent FIFO queues, one derived from the MultiQueue and the other based on ring buffers. We evaluate both designs extensively on various micro-benchmarks and a breadth-first search application on large graphs. Both designs outperform state-of-the-art relaxed and strict FIFO queues, achieving higher throughput and better scalability.
翻译:FIFO队列是一种广泛应用于多种场景的基础数据结构。并发FIFO队列允许多个执行线程同时访问队列。在并发队列中维持严格的FIFO语义会导致队列头部和尾部的高竞争,从而造成低吞吐量。通过放宽FIFO语义,允许元素在一定程度上重新排序,即可实现更高的可扩展性。本文提出了两种正交的宽松并发FIFO队列设计:一种源自MultiQueue,另一种基于环形缓冲区。我们在多种微基准测试及大规模图上的广度优先搜索应用中,对两种设计进行了全面评估。两种设计均优于当前最先进的宽松及严格FIFO队列,实现了更高的吞吐量和更好的可扩展性。