arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.02750cs.OS
收藏

缓存为王:基于 eBPF 的智能页面淘汰

Cache is King: Smart Page Eviction with eBPF

Tal Zussman, Ioannis Zarkadas, Jeremy Carin, Andrew Cheng, Hubertus Franke, Jonas Pfefferle, Asaf Cidon

AI总结:

本文提出基于 eBPF 的 Linux 页面缓存框架 cachebpf,使应用无需修改内核即可定制淘汰策略,实验显示可提升高达 70% 吞吐量并降低 58% 尾延迟。

摘要:

页面缓存是操作系统的核心组成部分。它通过决定在内存中保留哪些页面来减少对存储的重复访问。因此,页面缓存对许多应用程序的性能有显著影响。然而,其“一刀切”的淘汰策略在许多工作负载下表现不佳。虽然系统社区已经在非操作系统场景(例如键值存储、CDN)中尝试了大量新的自适应淘汰策略,但由于修改内核代码的复杂性,在页面缓存中实现此类策略非常困难。为了解决这些不足,我们为 Linux 页面缓存设计了一个新颖的基于 eBPF 的框架,称为 $\ exttt{cachebpf}$,它允许开发人员在不修改内核的情况下定制页面缓存。$\ exttt{cachebpf}$ 使应用程序能够根据其特定需求定制页面缓存策略,同时确保不同应用程序的策略不会相互干扰,并保留页面缓存在不同进程之间共享内存的能力。我们通过使用 $\ exttt{cachebpf}$ 实现几种淘汰策略来展示其接口的灵活性。我们的评估表明,应用程序定制页面缓存以匹配其工作负载的独特属性确实是有益的,它们可以实现高达 70% 的吞吐量提升和 58% 的尾延迟降低。

英文摘要:

The page cache is a central part of an OS. It reduces repeated accesses to storage by deciding which pages to retain in memory. As a result, the page cache has a significant impact on the performance of many applications. However, its one-size-fits-all eviction policy performs poorly in many workloads. While the systems community has experimented with a plethora of new and adaptive eviction policies in non-OS settings (e.g., key-value stores, CDNs), it is very difficult to implement such policies in the page cache, due to the complexity of modifying kernel code. To address these shortcomings, we design a novel eBPF-based framework for the Linux page cache, called $\texttt{cachebpf}$, that allows developers to customize the page cache without modifying the kernel. $\texttt{cachebpf}$ enables applications to customize the page cache policy for their specific needs, while also ensuring that different applications' policies do not interfere with each other and preserving the page cache's ability to share memory across different processes. We demonstrate the flexibility of $\texttt{cachebpf}$'s interface by using it to implement several eviction policies. Our evaluation shows that it is indeed beneficial for applications to customize the page cache to match their workloads' unique properties, and that they can achieve up to 70% higher throughput and 58% lower tail latency.

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

↑