feat(ragfs): add CachedFileSystem and Redis/Mooncake/Yuanrong cache providers#2520
feat(ragfs): add CachedFileSystem and Redis/Mooncake/Yuanrong cache providers#2520tuofang wants to merge 21 commits into
Conversation
add CachedFileSystem + CacheProvider trait and Mooncake/Yuanrong Provide
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
感谢在 Rust 文件系统中实现分布式缓存能力,这为我们的系统整体性能提供了巨大的帮助。但是能否增加使用说明文档和配置实例。如:
|
|
Findings P1 crates/ragfs/src/cache/wrapper.rs:139-217 P2 .cargo/config.toml:1-5 P2 crates/ragfs-cache-yuanrong/src/client.rs:16-76 与 crates/ragfs-cache-yuanrong-sys/native/yuanrong_bridge.cpp:24-27,170,185,211,224,238,276,351,391,415 Open Questions / Assumptions PR 标题里写了 Redis/Mooncake/Yuanrong cache providers,但我在这版 diff 里没有看到 Redis adapter 或 Redis 测试代码;如果 Redis 还没进这个 PR,标题和描述现在是 over-claim。 |
1、current_generation() 改为 provider-first。provider 有 generation 时永远以 provider 为准,commit |
add CachedFileSystem + CacheProvider trait and Mooncake/Yuanrong Provide
…ragfs-add-cache # Conflicts: # crates/ragfs-python/src/lib.rs # crates/ragfs/src/core/mountable.rs # openviking/utils/agfs_utils.py # tests/misc/test_config_validation.py
Related Discussion
add CachedFileSystem + CacheProvider trait and Redis/Mooncake/Yuanrong Provide
Summary
This PR adds the RAGFS cache provider architecture and introduces native cache provider adapters for Mooncake and Yuanrong.
Implemented functionality:
CacheProviderabstraction used byCachedFileSystem.remove_all/ directory rename subtree invalidationMooncakeProviderMooncakeClientMooncakeConfigYuanrongProviderYuanrongClientYuanrongConfigragfs-cache-yuanrong-sysFFI crateTesting
Mooncake validation:
1/1passed.1/1passed.8/8passed.5/5passed.18/18passed.111/111passed.1/1passed.Yuanrong validation:
6/6passed.3/3passed.5/5passed.4/4passed.1/1passed.Covered behavior:
Note: Yuanrong native validation used the currently available Docker image, whose installed
openyuanrong-datasystemversion is0.6.3压测
测试一种后端形态:
目标是在后端存储和向量库都固定为本地实现的前提下,对比 cache off / cache on(redis) 对 OpenViking 业务接口的端到端收益和额外开销。
规模:
content/read、fs/stat总共1600个文件
1. Workload 矩阵
warm_readcold_readwarm_readhot_coldread_writestat_lsinvalidationsearch_supplementwarm_read2. 执行摘要
cold_read、warm_read、hot_cold、read_write和stat_ls的聚合平均延迟均有改善。read_write中读请求显著改善,但写请求 P95 与 cache off 持平,平均写延迟略有增加。3. 主 Workload A/B 收益
4. OpenViking Prometheus 对比收益
5. 并发 Sweep