arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.27686cs.NI
收藏

Libra:通过可编程的 selective 数据复制加速 Socket I/O

Libra: Accelerating Socket I/O via Programmable Selective Data Copying

Shanghai Jiao Tong University(上海交通大学);University of Connecticut(康涅狄格大学)

Kairui Zhou, Shengkai Lin, Wei Zhang, Shizhen Zhao

AI总结:

Libra 通过在操作系统层面实现 selective 数据复制,仅复制元数据到用户空间,保留数据在内核中转发,从而减少数据移动并保持兼容性,提升 I/O 性能。

摘要:

层7(L7)代理对于现代云原生系统至关重要,但其性能日益受到跨内核-用户边界复制整个负载的瓶颈限制。现有方法减少此开销但通常牺牲与未修改的 POSIX 应用程序的兼容性,引入新 API 或需要专用环境。我们证明,在传统操作系统抽象下,完全消除内核-用户复制同时保持标准套接字语义对于未修改的代理是根本不可能的。这导致一个实用洞察:在常见的 L7 工作负载中,代理仅检查少量元数据(例如 HTTP 头)用于路由,而转发大量负载未修改。基于此洞察,我们提出了 Libra,一个操作系统层面的 selective 复制框架,将仅元数据复制到用户空间,保留大量负载在内核中转发,从而在不破坏兼容性的情况下减少数据移动。Libra 使用 eBPF 识别协议特定的元数据边界,并在接收和发送路径中协调 selective 复制和负载重用,所有操作均不修改套接字 API。在 Linux 上实现,并与未修改的 Nginx 和 HAProxy 评估,Libra 提高明文吞吐量最高 4.2 倍,减少 P99 尾部延迟超过 90%。使用硬件卸载的 kTLS,它提升加密吞吐量 2.0 倍,减少尾部延迟 65%。

英文摘要:

Layer-7 (L7) proxies are critical to modern cloud-native systems, yet their performance is increasingly bottlenecked by copying entire payloads across the kernel-user boundary. Existing approaches reduce this overhead but typically sacrifice compatibility with unmodified POSIX applications, introduce new APIs, or require specialized environments. We show that, under conventional OS abstractions, fully eliminating kernel-user copies while preserving standard socket semantics for unmodified proxies is fundamentally impossible. This leads to a practical insight: in common L7 workloads, proxies inspect only small metadata (e.g., HTTP headers) for routing, while forwarding the bulk payload unchanged. Based on this insight, we present Libra, an OS-level selective-copy framework that copies only metadata to the user space and retains the bulk payload in the kernel for forwarding, reducing data movement without breaking compatibility. Libra uses eBPF to identify protocol-specific metadata boundaries and coordinate selective copy and payload reuse across receive and transmit paths, all without modifying the socket API. Implemented in Linux and evaluated with unmodified Nginx and HAProxy, Libra improves plaintext throughput by up to 4.2x and reduces P99 tail latency by over 90%. With hardware-offloaded kTLS, it boosts encrypted throughput by 2.0x and cuts tail latency by 65%.

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

↑