[Paper Review] MultiQueues: Simpler, Faster, and Better Relaxed Concurrent Priority Queues
MultiQueues proposes a simple, scalable relaxed concurrent priority queue using multiple sequential priority queues to reduce contention and improve performance. By distributing insertions randomly across $cp$ queues (with $c>1$) and selecting the minimum from two randomly chosen queues for deletion, it achieves higher throughput and better element quality than prior approaches, outperforming SprayLists by up to a factor of two in experiments.
Priority queues with parallel access are an attractive data structure for applications like prioritized online scheduling, discrete event simulation, or branch-and-bound. However, a classical priority queue constitutes a severe bottleneck in this context, leading to very small throughput. Hence, there has been significant interest in concurrent priority queues with a somewhat relaxed semantics where deleted elements only need to be close to the minimum. In this paper we present a very simple approach based on multiple sequential priority queues. It turns out to outperform previous more complicated data structures while at the same time improving the quality of the returned elements.
Motivation & Objective
- To address the performance bottleneck of centralized priority queues under high parallel contention in concurrent workloads.
- To design a relaxed priority queue that maintains high throughput while improving the quality of deleted elements (i.e., closer to the global minimum).
- To explore a simpler alternative to complex data structures like SkipLists or centralized designs, using multiple sequential priority queues as building blocks.
- To evaluate the trade-off between performance, scalability, and quality of results in relaxed concurrent priority queues.
- To enable practical deployment in systems requiring high-throughput priority scheduling, such as database systems and discrete event simulation.
Proposed method
- Use an array of $cp$ sequential priority queues, where $c>1$ and $p$ is the number of parallel threads, to distribute load and reduce contention.
- Assign insertions to randomly selected queues to ensure a representative sample of global elements across queues.
- For deleteMin, select the minimum element from the minima of two independently and randomly chosen queues to stabilize fluctuations in queue distribution.
- Employ wait-free locking for individual queue operations to avoid blocking and improve concurrency.
- Use a sorted side sequence $S$ to track and measure the rank error of deleted elements, enabling precise quality evaluation.
- Tune the parameter $c$ to balance performance, quality, and resource usage, with $c=2$ or $c=4$ showing optimal results in experiments.
Experimental results
Research questions
- RQ1Can a simple, multi-queue approach outperform complex, centralized relaxed priority queues in terms of both throughput and quality of results?
- RQ2How does random assignment of insertions and selection from two queues affect the distribution of rank errors in deleted elements?
- RQ3What is the impact of the $c$ parameter (number of queues relative to threads) on performance and quality in relaxed concurrent priority queues?
- RQ4Can a relaxed priority queue maintain high throughput while ensuring that deleted elements are consistently close to the global minimum?
- RQ5How does the proposed MultiQueue design scale across single-socket and multi-socket systems compared to existing solutions?
Key findings
- MultiQueues outperformed SprayLists by a factor of two or more in throughput on both single-socket and two-socket systems.
- The rank error distribution for MultiQueues was significantly better than SprayLists, with a maximum observed rank error of 1,522 compared to 1,740.
- For $p=56$, MultiQueues with $c=2$ ($112$ queues) showed a rank error distribution closely aligned with theoretical predictions and with shorter tails than SprayLists.
- At $p=256$, the performance advantage of MultiQueues grew, and even $c=4$ yielded better tail behavior than SprayLists.
- The quality of deleted elements was consistently higher, with lower mean and maximum rank errors, indicating better approximation to the global minimum.
- The method demonstrated excellent scalability on a single socket and reasonable scaling on a two-socket system, validating its practicality for real-world concurrent workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.