arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.12815cs.NIcs.DC
收藏

COREC:面向低延迟网络的并发无阻塞单队列接收驱动程序

COREC: Concurrent Non-Blocking Single-Queue Receive Driver for Low Latency Networking

Marco Faltelli, Giacomo Belocchi, Francesco Quaglia, Giuseppe Bianchi

AI总结:

本文提出 COREC,一种基于 RMW 原子指令的并发无阻塞单队列接收驱动,允许多线程共享接收队列并改善尾延迟,评估显示最坏性能损失仅 2%–3%,且多类流量延迟显著降低。

摘要:

现有网络栈依靠多个接收队列来处理性能和可扩展性问题。然而,在软件层面,每个队列仅由单个线程处理,这阻碍了对同一队列的协同工作,并限制了尾延迟方面的性能。为克服这一限制,我们提出 COREC,这是并发无阻塞单队列接收驱动程序的首个软件实现。通过在多个线程之间共享单个队列,工作负载分配得到改善,从而为网络栈带来工作保持策略。在技术方面,COREC 不依赖会使线程操作串行化的传统临界区,而是借助 Read-Modify-Write(RMW,读-改-写)类原子机器指令,以无阻塞方式协调并发访问同一接收队列的线程。这些指令允许线程根据特定条件(例如线程所选目标值匹配)原子地访问和更新内存位置;它们还能使任何更新在内存层次结构中全局可见,从而绕过 CPU 存储缓冲区所造成的内存一致性干扰。大量评估结果表明,我们的方法偶尔可能导致的额外重排并不关键,对性能影响极小;即使在单个大型 TCP 流这一最坏情形下,性能损失也至多为 2%–3%。相反,在处理 UDP 流量、真实世界混合流量以及多个较短 TCP 流时,可获得显著的延迟收益。

英文摘要:

Existing network stacks tackle performance and scalability aspects by relying on multiple receive queues. However, at software level, each queue is processed by a single thread, which prevents simultaneous work on the same queue and limits performance in terms of tail latency. To overcome this limitation, we introduce COREC, the first software implementation of a concurrent non-blocking single-queue receive driver. By sharing a single queue among multiple threads, workload distribution is improved, leading to a work-conserving policy for network stacks. On the technical side, instead of relying on traditional critical sections - which would sequentialize the operations by threads - COREC coordinates the threads that concurrently access the same receive queue in non-blocking manner via atomic machine instructions from the Read-Modify-Write (RMW) class. These instructions allow threads to access and update memory locations atomically, based on specific conditions, such as the matching of a target value selected by the thread. Also, they enable making any update globally visible in the memory hierarchy, bypassing interference on memory consistency caused by the CPU store buffers. Extensive evaluation results demonstrate that the possible additional reordering, which our approach may occasionally cause, is non-critical and has minimal impact on performance, even in the worst-case scenario of a single large TCP flow, with performance impairments accounting to at most 2-3 percent. Conversely, substantial latency gains are achieved when handling UDP traffic, real-world traffic mix, and multiple shorter TCP flows.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑