NBLFQ: a lock-free MPMC queue optimized for low contention
Résumé
The NEWMADELEINE communication library relies extensively on lockless queues for its internal data structures in order to operate well in a multi-threaded application. There is ongoing work to make it use interrupt-based network drivers, and thus its queues have to become truly lock-free and not only lockless.
In this paper we present NBLFQ, a lock-free MPMC bounded queue optimized for low contention. We show that 97 % of the queue operations in NEWMADELEINE are uncontended, hence the idea to design an algorithm optimized primarily for low contention, but that does not collapse under heavy load.
We present the algorithm that relies on a single CAS for enqueue and for dequeue, and proofs of its properties. We have implemented the algorithm, measured its performance on four different architectures, and compared it against a wide range of other lock-free queue algorithms. We have observed that the best performance at the network communication library level is obtained by our NBLFQ algorithm in almost all cases, with both single thread and massively multi-threaded communications.
Domaines
Informatique [cs]Origine | Fichiers produits par l'(les) auteur(s) |
---|