708/708
每个元数据后端均通过的已配置 xfstests 用例
246 / 9,134
Redis 与 TiKV 通过的 pjdfstest 文件数 / 断言数
1,166
workspace gate 通过的 Rust 测试
4 类套件
xfstests、pjdfstest、LTP 文件系统与 stress-ng
POSIX 正确性
验证文件系统契约,而不只验证正常路径。
PR 覆盖 SQLite、PostgreSQL、Redis、etcd 与 TiKV 的元数据语义。Compose runner 以 RustFS 对象存储运行 FUSE 测试,并为每次执行保留产物。
PATHS
命名空间与元数据
通过完整 POSIX 套件检查创建、删除、重命名、硬链接、时间戳、xattr、特殊 inode 与 setgid 继承。
LOCKS
并发语义
在事务型元数据后端上验证字节范围锁、lookup/stat、close-to-open 行为与写回敏感路径。
BACKENDS
跨后端证据
配置的 xfstests 与 LTP profile 都会在 SQLite、Redis、etcd、TiKV 加 RustFS 上运行。
当前正确性覆盖
| 套件 | 覆盖内容 | 记录结果 |
|---|---|---|
| xfstests | FUSE、元数据、锁、写回与对象存储行为 | SQLite、Redis、etcd、TiKV 均通过 708 / 708 个已配置用例 |
| pjdfstest | POSIX 路径、权限、链接、特殊节点、重命名、删除与时间戳 | Redis 与 TiKV:246 个文件 / 9,134 条断言 |
| LTP filesystem | Linux 文件系统场景与记录锁覆盖 | 四个后端均通过;buffered iogen01 保留为已记录的跳过项 |
| stress-ng smoke | 短时元数据与小写入压力 | 通过,且没有残留文件 |
运行 POSIX 验证套件
cargo test --workspace --lib --bins -- --test-threads=1
bash docker/compose-xfstests/run_redis_pjdfstest.sh
bash docker/compose-xfstests/run_redis_xfstests.sh
bash docker/compose-xfstests/run_redis_ltp.sh
bash docker/compose-xfstests/run_redis_stress_ng.sh --profile smoke已知且明确公开的限制
- generic/075 继续排除:buffered FUSE 在 truncate/extend 后的 mmap 可能暴露过期 page-cache 字节;该 mmap 形态无法在 direct I/O 下运行。
- 正常 buffered profile 继续跳过 LTP iogen01,因为仍存在 split-write/page-cache 一致性竞态;它被保留为诊断项,而不是被隐藏。
- open_by_handle_at、共享 mount 传播、部分 O_DIRECT sparse-hole 用例与长时间 fsstress soak 都在测试矩阵中显式分类。
性能测试方法
profile 是结果的一部分。
Redis + RustFS 对比快照使用同一主机、4 MiB fio block、buffered fio、关闭压缩和匹配的 writeback-throughput profile。写入同时报告前台接收速度和 writeback 队列完整排空后的吞吐。
元数据Redis
对象存储RustFS,S3 兼容
fio4 MiB block;io_uring;iodepth=1
Profile匹配的 writeback-throughput profile;明确披露 BrewFS 只读 direct I/O
已公开的 profile 快照:BrewFS / JuiceFS
| 负载 | BrewFS | JuiceFS | 倍率 |
|---|---|---|---|
| 匹配结果领先 | 15 / 24 | Baseline | 数据 10/14 · 元数据 5/10 |
| 混合 I/O(完整排空) | 218.60 MiB/s | 113.86 MiB/s | 1.92x |
| 前台混合 I/O | 495.54 MiB/s | 328.76 MiB/s | 1.51x |
| 随机读 | 1,726.10 MiB/s | 1,256.80 MiB/s | 1.37x |
| Readdir | 28,634.94 ops/s | 16,020.25 ops/s | 1.79x |
复现性能 profile
PERF_LOG_TO_CONSOLE=false PERF_FIO_SIZE=512m PERF_FIO_RUNTIME=20 \
bash docker/compose-xfstests/run_redis_perf.sh --s3 --writeback-throughput-profile
JUICEFS_META_BACKEND=redis PERF_LOG_TO_CONSOLE=false \
PERF_FIO_SIZE=512m PERF_FIO_RUNTIME=20 \
bash docker/compose-xfstests/run_juicefs_perf.sh --writeback-throughput-profile可信性能结论的规则
- 目标 workload 至少连续运行三次并报告中位数;非目标 fio 与元数据项目的回退应保持在 5% 以内。
- 不要将 warm-cache 结果直接归因于 Rust。缓存热度、FUSE profile、元数据往返和 dirty overlay 都是被测变量。
- commit-before-upload、direct-I/O read handle、write-open cache 等语义取舍必须标注为 opt-in profile,而非默认行为。
- 任何改变热路径文件系统行为的优化,都要重新运行 xfstests、pjdfstest、LTP filesystem 与 stress-ng。