Jiffy: A Fast, Memory Efficient, Wait-Free Multi-Producers Single-Consumer Queue

Dolev Adas, Roy Friedman
10/27/2020
3 citations
cs.DBcs.DCcs.DS

Official code: DolevAdas/Jiffy (46 stars, C++, MIT, last commit 2020-12-27).

Abstract

In applications such as sharded data processing systems, sharded in-memory key-value stores, data flow programming and load sharing applications, multiple concurrent data producers are feeding requests into the same data consumer. This can be naturally realized through concurrent queues, where each consumer pulls its tasks from its dedicated queue.

Show full abstract

For scalability, wait-free queues are often preferred over lock based structures. The vast majority of wait-free queue implementations, and even lock-free ones, support the multi-producer multi-consumer model. Yet, this comes at a premium, since implementing wait-free multi-producer multi-consumer queues requires utilizing complex helper data structures. The latter increases the memory consumption of such queues and limits their performance and scalability. Additionally, many such designs employ (hardware) cache unfriendly memory access patterns. In this work we study the implementation of wait-free multi-producer single-consumer queues. Specifically, we propose Jiffy, an efficient memory frugal novel wait-free multi-producer single-consumer queue and formally prove its correctness. We then compare the performance and memory requirements of Jiffy with other state of the art lock-free and wait-free queues. We show that indeed Jiffy can maintain good performance with up to 128 threads, delivers up to 50% better throughput than the next best construction we compared against, and consumes ~90% less memory.

View on arXivView PDF

Code Implementations(1)

DolevAdas/JiffyOfficial100%
MIT
464C++Sep 24, 20205 years agoMIT

Similar Papers

Cite this paper

@article{adas2020jiffy,
  title  = {Jiffy: A Fast, Memory Efficient, Wait-Free Multi-Producers Single-Consumer Queue},
  author = {Dolev Adas and Roy Friedman},
  year   = {2020},
  eprint = {2010.14189},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.14189}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2010.14189.svg)](https://codeofpaper.com/paper/2010.14189)

Discussion