Packet processing on Linux can be slow due to its complex network stack. To solve this problem, there are two main solutions: eXpress Data Path (XDP) and Data Plane Development Kit (DPDK). XDP and the AF XDP socket offer full interoperability with the legacy system and is being adopted by major internet players like Open vSwitch or Facebook. While the performance evaluation of AF XDP against the legacy protocol stack in the kernel or against DPDK has been studied in the literature, the impact of the multiple socket parameters and the system configuration on its latency has been left aside. To address this, we conduct an experimental study to understand the XDP/AF XDP ecosystem and detect microseconds delays to better architect future latency-sensitive applications. Since the performance of AF XDP depends on multiple parameters found in different layers, finding the configuration minimizing its latency is a challenging task. We rely on a classification algorithm to group the performance results, allowing us to easily identify parameters with the biggest impact on performance at different loads. Last, but not least, we show that some configurations can significantly decrease the benefits of AF XDP, leading to undesirable behaviors, while other configurations are able to reduce such round trip delays to an impressive value of 6.5 $\mu$s in the best case, including the tracing overhead. In summary, AF XDP is a promising solution, and careful selection of both application and socket parameters can significantly improve performance.
翻译:由于Linux网络协议栈复杂,其上的数据包处理速度可能较慢。为解决此问题,主要有两种方案:快速数据路径(XDP)和数据平面开发套件(DPDK)。XDP与AF_XDP套接字提供了与遗留系统的完全互操作性,并被Open vSwitch或Facebook等主要互联网玩家所采用。尽管已有文献研究了AF_XDP相较于内核中遗留协议栈或DPDK的性能,但多个套接字参数及系统配置对其延迟的影响却被忽略。为弥补这一不足,我们开展实验研究以理解XDP/AF_XDP生态系统,并检测微秒级延迟,从而更好地设计未来对延迟敏感的应用。由于AF_XDP的性能取决于不同层中的多个参数,找到最小化延迟的配置是一项具有挑战性的任务。我们利用分类算法对性能结果进行分组,从而轻松识别在不同负载下对性能影响最大的参数。最后但同样重要的是,我们展示了某些配置会显著降低AF_XDP的优势,导致不良行为,而其他配置则能将往返延迟降至最佳情况下的6.5微秒(含追踪开销)。总之,AF_XDP是一种有前景的解决方案,且仔细选择应用和套接字参数能显著提升性能。