1. Why Legacy File Systems Collapse on AI Datasets
A single computer-vision or multimodal training job routinely opens millions of 2 KiB–100 KiB files across hundreds of worker threads. In traditional distributed file systems (NFSv3/v4, CephFS, Lustre), every single tiny file pays a heavy multi-hop tax:
- Round-Trip #1: Path traversal and
LOOKUP/GETATTRagainst a lock-contended Metadata Server. - Round-Trip #2: Layout negotiation and capability fetch.
- Round-Trip #3: Separate network RPC + 4 KiB disk I/O against a Data Node for just a few hundred bytes of JSON labels or bounding boxes.
Design Principle
Never spend a Storage Node network hop or an NVMe disk seek to read a file smaller than the metadata header describing it.
2. 64-Shard Lock-Free In-Memory MDS + NVMe Raft WAL
RustStorFS keeps the entire active InodeTable and DentryTree resident in DRAM,
partitioned across 64 independent lock-free shards backed by mimalloc.
Read operations (lookup, getattr, readdir, and
BatchGetAttr up to 1,024 inodes per RPC) complete entirely in RAM in
under 3.2 µs (micro-benchmarked at ~168–221 ns in-process).
Durability is guaranteed without stalling reads: mutating operations append to a CRC32C-framed NVMe
Write-Ahead Log (WalEngine) synchronized across a 3-node Raft Quorum (measured leader
failover: 143–147 ms, zero data loss).
3. Small-File Inlining: Collapsing 3 Hops into 1 RTT
Each Inode record in RustStorFS is a compact 256-byte structure. When a file fits within the inline threshold, its raw bytes are stored directly inside the Inode payload rather than allocating a 64 MiB DataNode chunk:
Client calls LOOKUP / GETATTR → MDS returns Inode + raw file bytes directly from RAM. Zero DataNode RPCs, zero NVMe fragmentation.
MDS returns 64 MiB chunk layout + signed capability token → Client streams directly from Storage Nodes via io_uring SQPOLL / RDMA.
4. Verified 1-Million-File `mdtest` & PyTorch Results
| Benchmark Operation | Scale | Measured Result | Target KPI |
|---|---|---|---|
| mdtest File Stat / Lookup | 1,000,000 files | 5,040,694 ops/s | ≥ 500,000 ops/s |
| mdtest Inlined Small-File Read | 1,000,000 files | 5,301,477 ops/s | ≥ 300,000 ops/s |
| mdtest File Creation (WAL) | 1,000,000 files | 541,306 ops/s | ≥ 100,000 ops/s |
| mdtest File Unlink | 1,000,000 files | 5,928,387 ops/s | ≥ 150,000 ops/s |
| PyTorch ImageNet DataLoader | Multi-worker PyO3 | > 600,000 spl/s | 99.56% AU (0.44% wait) |
Benchmark RustStorFS on your AI dataset.
Inspect the full 4-tier benchmark methodology or request a scoped POC build for your GPU cluster.