Fast and scalable metadata management across multiple metadata servers is crucial for distributed file systems to handle numerous files and directories. Client-side caching of frequently accessed metadata can mitigate server loads, but incurs significant overhead and complexity in maintaining cache consistency when the number of clients increases. We explore caching in programmable switches by serving file-system metadata requests from multiple clients on the switch data plane. Despite prior efforts on in-switch key-value caching, they fail to address the path dependencies specific to file-system semantics. We propose Fletch, an in-switch file-system metadata caching framework that leverages programmable switches to serve file-system metadata requests from multiple clients directly in the switch data plane. Unlike prior in-switch key-value caching approaches, Fletch addresses file-system-specific path dependencies under stringent switch resource constraints. We implement Fletch atop Hadoop HDFS and evaluate it on a Tofino-switch testbed using real-world file-system metadata workloads. Fletch achieves up to 181.6% higher throughput than vanilla HDFS and complements client-side caching with additional throughput gains of up to 139.6%. It also incurs low latencies and limited switch resource usage.
翻译:跨多个元数据服务器的快速可扩展元数据管理对于分布式文件系统处理海量文件和目录至关重要。客户端对频繁访问的元数据进行缓存可减轻服务器负载,但随着客户端数量增加,维护缓存一致性会带来显著开销和复杂性。我们探索在可编程交换机中实现缓存,通过在交换机数据平面上处理来自多个客户端的文件系统元数据请求。尽管先前已有关于交换机内键值缓存的研究,但这些方法未能解决文件系统语义特有的路径依赖问题。我们提出Fletch,一种交换机内文件系统元数据缓存框架,利用可编程交换机直接在交换机数据平面上为多客户端提供文件系统元数据服务。与先前的交换机内键值缓存方案不同,Fletch在严格的交换机资源约束下解决了文件系统特有的路径依赖问题。我们在Hadoop HDFS上实现了Fletch,并使用真实文件系统元数据工作负载在Tofino交换机测试平台上进行评估。Fletch相比原生HDFS实现了高达181.6%的吞吐量提升,并与客户端缓存互补,带来额外高达139.6%的吞吐量增益。同时,该系统具有低延迟和有限的交换机资源占用特点。