跪拜 Guibai
← All articles
Backend · Artificial Intelligence · Robotics

JuiceFS at Zhiqi Robotics: 99.96% cache hit rate and 99.92% fewer small files in embodied AI storage

By JuiceFS ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Shared cache hit rates above 99% and a hundredfold cut in small files make JuiceFS viable for robot training workloads that previously fought object stores and cross-node scheduling. The post documents specific failure modes and fixes, like separating background reclamation from business mounts and bypassing the control-plane VIP for MinIO requests, that apply to any large-scale Kubernetes + object storage environment.

Summary

Zhiqi Robotics, which builds an embodied intelligence data platform called Dayan for robot R&D, standardized on JuiceFS as a unified file access layer over MinIO object storage. The platform collects ROS bags, video, and trajectories from teleoperation, motion capture, and wearable skill suits, then processes them through cleaning, frame extraction, annotation, and retrieval before model training. The original object storage handled persistence but faltered on directory traversal, random reads, and the flood of small files from video frame extraction. With JuiceFS, edge collectors upload via the S3 Gateway, while Kubernetes pods mount the filesystem through CSI and read with POSIX interfaces.

Production numbers are strong: a 7-day median cache hit rate around 99.96%, hot read throughput about 3x that of s3fs, and no more training tickets about data retrieval speed. The architecture uses Redis for metadata, MinIO for persistent objects, and GPFS as a shared cache across nodes. A key move was pointing all Mount Pods' cache-dir to the same GPFS directory, so data blocks written by one node can be reused by others, avoiding repeated downloads across Kubernetes scheduling. The team reports five production practices: recovering from a GPFS shared cache failure where reads hung, cutting small file counts by 99.92% with FrameRecord packetization, isolating metadata backup from online mounts to fix checkpoint fsync timeouts, separating background reclamation from business mounts to survive deletion storms, and shortening the object request path by making MinIO endpoints directly resolvable via DNS.

Takeaways
— JuiceFS unifies S3 uploads and POSIX reads behind one filesystem, letting edge collectors use existing S3 SDKs while training containers mount via Kubernetes CSI.
— Production cache hit rate over a 7-day median reached about 99.96%, and hot read throughput was about 3x s3fs (1,206 MiB/s vs 406 MiB/s in fio tests), with 64-concurrent reads at about 8,082 MiB/s vs 2,425 MiB/s.
— GPFS shared cache uses a shared directory for all Mount Pods' cache-dir, so data blocks written by one node can be reused across nodes; cache is located by data block ID, not content dedup across clients.
— A GPFS metadata node running out of memory (mmfsd at ~228 GiB, SWAP exhausted) caused cache reads to hang while directory listings worked, because file attributes come from Redis but content reads need GPFS; cache hit rate dropped from 88.6% to 4.5% before recovery.
— Small file management reduced delivered files from 3,600 frames to 3 (one FrameRecord packet plus two index files), a 99.92% cut, and streaming packetization was about 27.6% faster than frame-by-frame disk writes in local NTFS tests.
— Checkpoint fsync timeouts were linked to a concurrent automatic metadata backup running HSCAN against Redis; the fix is to set backup-meta=0 on business mounts and schedule metadata backup separately during off-peak hours.
— Deletion storm handling separates business Mount Pods (using no-bgjob) from a dedicated Cleaner Mount Pod, with respective memory limits of 32 GiB and 16 GiB, because a single mount processed 112,180 and 128,593 recycle entries in two cleanup rounds.
— Network path optimization kept the original Endpoint domain and port, added forwarding ports on MinIO nodes, and switched DNS to resolve to 12 MinIO node addresses, bypassing the old VIP and kube-proxy; a 4 MiB request body previously went through three logical hops totaling about 12 MiB of logical data passing.
—
— 99.96% cache hit rate on shared GPFS caching proves that cross-node cache reuse works for real training workloads, not just benchmarks.
— The 99.92% reduction in small files by packetizing frames into a single data package with index files is a template for any pipeline that generates per-frame artifacts; most of those files are regenerable and should stay local.
— A cache hit rate drop to 4.5% during the GPFS failure shows that clients will not automatically fall back to origin for requests already stuck in cache I/O; recovery requires restarting the affected cache client.
— Blame for performance comparisons is clouded by different network hardware: GPFS used 200 Gbps InfiniBand while the s3fs baseline used 25 Gbps Ethernet, so the 3x throughput gap is not purely a file system win.
— Deletion storm cleanup can silently OOM a Mount Pod even when it shares a cache with many clients; isolating the background cleaner into a dedicated pod with its own memory limit is a straightforward insurance policy.
— The decision to evaluate bare-metal servers for object storage reflects a pattern where virtualization layer CPU contention and VIP network paths become the storage bottleneck.
— FrameRecord borrows FFRecord's sample aggregation idea, indicating that video frame data benefits from being packed like ML training samples rather than stored as individual files.
— The fsync timeout investigation points to background metadata export contending with online Redis operations; separating backup from online mounts is a clean architectural fix, but HSCAN could also come from directory traversal or reclamation, so root cause is not fully confirmed.
— The inclusion of exact diagnosis steps and metrics makes this a practical field guide, not a vendor pitch: rerunning stuck tasks restored training containers after the GPFS client restart, and cache hit rate recovered gradually from 4.5% to about 11.8%.
— After cutting over to direct MinIO endpoints, control-plane egress traffic dropped while MinIO continued serving reads and writes, showing that the old VIP path was doing redundant forwarding.
Concepts & terms
JuiceFS
An open-source POSIX file system built on object storage and a Redis metadata engine, often used in Kubernetes to provide a unified file access layer over S3-compatible object stores.
Shared cache (GPFS)
A storage tier that lets multiple JuiceFS clients reuse cached data blocks across nodes by pointing all cache-dir paths to a shared directory (here GPFS), avoiding repeated downloads when tasks reschedule.
FrameRecord
A data packaging format that groups consecutive video frames into a single packet with two index files, reducing millions of small image files to a few large objects while still allowing frame-level reads.
no-bgjob
A JuiceFS mount option that disables periodic background tasks such as recycle bin reclamation, letting business mounts skip background work and delegating cleanup to a dedicated Cleaner mount.
Recycle bin (JuiceFS)
A mechanism where deleted files move to hourly directories and their underlying data blocks are freed later by background tasks, making foreground deletes return quickly but creating background load when many files are removed.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗