论文标题

Jiffy:快速,内存效率,无需候补的多生产者单一排队队列

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

论文作者

Adas, Dolev, Friedman, Roy

论文摘要

在诸如碎片数据处理系统之类的应用程序中,碎片内存中的键值商店,数据流编程和加载共享应用程序,多个并发数据生产者正在将请求馈送到同一数据消费者中。这可以通过并发队列自然地实现,每个消费者都可以从专用队列中拉出其任务。为了可伸缩,通常优选的无候补队列比基于锁定的结构首选。 绝大多数无候补的队列实现,甚至无锁的实现,都支持多生产者多消费者模型。然而,这是高级的,因为实施了无候补的多生产者多生产者队列需要利用复杂的辅助数据结构。后者增加了这种队列的记忆消耗,并限制了其性能和可扩展性。此外,许多此类设计采用(硬件)缓存不友好的内存访问模式。 在这项工作中,我们研究了无候补的多生产者单一消费者队列的实施。具体而言,我们提出了吉菲(Jiffy),这是一种有效的记忆节俭小说的无等待多生产者单一消费者队列,并正式证明其正确性。然后,我们将Jiffy的性能和内存要求与其他无锁状态和无候补队列进行比较。我们表明,吉菲(Jiffy)确实可以通过多达128个线程保持良好的性能,比您比较的下一个最佳结构要多达50%的吞吐量,并且消耗约90%的内存。

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. 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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源