<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JuiceFS Blog</title><link>https://www.juicefs.com/en/blog/</link><description>Latest news from JuiceFS</description><atom:link href="http://juicefs.com/en/blog/latest/feed/" rel="self"/><language>en</language><lastBuildDate>Thu, 30 Jul 2026 09:02:00 +0000</lastBuildDate><item><title>5.5× Faster Small-File Writes: Tuhu Built a Unified AI Storage Platform with JuiceFS + Ceph RADOS</title><link>https://www.juicefs.com/en/blog/user-stories/unify-ai-storage-platform-juicefs-ceph-rados</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;TL;DR:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Tuhu leverages JuiceFS, TiKV, and Ceph RADOS to unify storage for AI training, AI inference, and analytics, supporting over 100 million files while achieving up to &lt;/em&gt;&lt;em&gt;5.5× faster small-file writes&lt;/em&gt;&lt;em&gt; and &lt;/em&gt;&lt;em&gt;3.2× faster small-file reads&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.tuhu.cn/us/home/tuhuaboutus?click=firstMenu"&gt;Tuhu&lt;/a&gt; (9690.HK) is an integrated online and offline automotive service platform. By the end of 2025, we had grown to 162.3 million registered users and operated 8,008 service centers across China. As our business continued to expand, our infrastructure had to support increasingly diverse data management and compute workloads. Over the years, multiple storage systems—including NFS, Alluxio, MinIO, and SeaweedFS—had been deployed independently to meet different application requirements. While each solution addressed a specific use case, the overall storage architecture became fragmented, making data movement expensive and operations increasingly difficult.&lt;/p&gt;
&lt;p&gt;When evaluating a unified storage architecture, we built a unified &lt;a href="https://www.ibm.com/think/topics/ai-storage"&gt;AI storage&lt;/a&gt; platform based on &lt;strong&gt;JuiceFS + TiKV + Ceph object storage cluster (RADOS)&lt;/strong&gt;, considering our existing private cloud infrastructure and Ceph deployment.&lt;/p&gt;
&lt;p&gt;Today, this platform serves &lt;a href="https://www.akamai.com/glossary/what-is-ai-training"&gt;AI training&lt;/a&gt;, &lt;a href="https://www.ibm.com/think/topics/ai-inference"&gt;AI inference&lt;/a&gt;, and big data processing workloads through a single storage infrastructure. It currently manages over 100 million files. In low-concurrency benchmark tests, &lt;strong&gt;it achieved up to a 5.5x improvement in small-file sequential write performance and up to a 3.2x improvement in small-file read performance&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this article, we’ll explain how we designed and deployed our unified AI storage platform on top of its existing Ceph infrastructure. We’ll also share several production optimization practices, including Ceph RADOS data paths, erasure-coded pools, write amplification reduction for small files, and stability improvements for containerized deployments.&lt;/p&gt;
&lt;h2&gt;From multiple storage systems to a unified storage foundation&lt;/h2&gt;
&lt;p&gt;In the early stages of our company's growth, storage infrastructure was built independently for different applications to maximize development speed and satisfy immediate application requirements. As the platform evolved, this approach gradually resulted in multiple storage systems coexisting in production.&lt;/p&gt;
&lt;p&gt;The rapid adoption of cloud-native computing, large-scale AI training, and AI inference exposed the limitations of this architecture. Problems related to architectural consistency, data mobility, operational complexity, and storage performance became increasingly apparent.&lt;/p&gt;
&lt;p&gt;We identified four major challenges.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;High operational complexity:&lt;/strong&gt; Production environments relied on numerous storage solutions, including NFS, Alluxio, MinIO, Ceph, SeaweedFS, and various cloud block storage services. Each system had its own deployment model, access protocol, operational workflow, and troubleshooting methodology. As storage clusters continued to grow, day-to-day maintenance, capacity planning, and version upgrades became increasingly difficult.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.ibm.com/think/topics/data-silos"&gt;&lt;strong&gt;Data silos&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; Different storage systems exposed different interfaces and lacked a unified data access layer. AI training pipelines typically require POSIX-compliant file semantics, while surrounding tools for data processing, model management, backup, and archiving often depend on object storage APIs. Because these storage systems could not naturally share the same data, datasets frequently had to be copied or synchronized between platforms. This increased operational overhead, storage consumption, and workflow complexity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rising storage costs:&lt;/strong&gt; As business continued to grow, both the number of files and total storage capacity increased rapidly. Meanwhile, infrastructure costs—including hardware procurement, datacenter resources, and storage operations—continued to rise. Improving storage utilization while maintaining performance and reliability became a key objective for the infrastructure team.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Higher performance requirements from AI workloads:&lt;/strong&gt; AI training, AI inference, disaggregated storage and compute, and big data analytics placed higher demands on the underlying storage system's concurrency, throughput, access latency, and stability. In particular, large-scale small-file access, multi-node concurrent reads, model file loading, and online inference services required the storage system not only to provide stable capacity support but also to deliver predictable performance under high-concurrency conditions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a result, the existing architecture based on multiple independent storage systems could no longer support long-term application growth. We decided to consolidate fragmented storage resources into a unified storage foundation that would simplify operations while enabling seamless data sharing across different compute environments.&lt;/p&gt;
&lt;p&gt;The new storage platform was designed around two major capability areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Block storage for infrastructure and virtualization workloads&lt;/strong&gt;: This capability provided reliable, high-performance storage for virtual machine images, cloud disks, and traditional infrastructure services.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Unified data access for &lt;a href="https://cloud.google.com/learn/what-is-cloud-native"&gt;cloud-native&lt;/a&gt; workloads&lt;/strong&gt;, including Kubernetes applications, traditional microservices, big data analytics, AI training, AI inference, and emerging middleware such as vector databases. Among these, AI training and inference posed more concentrated challenges in terms of file semantics, object interfaces, data throughput, small-file performance, and multi-node concurrent access.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, building a unified cloud storage foundation involved both block storage capability for virtualized environments and data access capability for AI and cloud-native workloads. The following section will focus on the latter—how to build a unified data access foundation based on JuiceFS to support AI training, AI inference, and big data processing.&lt;/p&gt;
&lt;h2&gt;Building a unified AI storage platform with JuiceFS&lt;/h2&gt;
&lt;p&gt;When designing a unified storage platform, we evaluated several architectural approaches based on our existing private cloud infrastructure, storage investments, and workload characteristics.&lt;/p&gt;
&lt;p&gt;Our primary goals were to support large-scale data access, enable disaggregated storage and compute, provide multiple access protocols, and deliver high reliability without introducing unnecessary operational complexity.&lt;/p&gt;
&lt;p&gt;Rather than building a new distributed storage system from scratch, we chose a modular architecture based on &lt;strong&gt;JuiceFS, TiKV, and Ceph RADOS&lt;/strong&gt;. This approach allowed us to leverage our existing Ceph infrastructure while introducing a unified file system capable of serving AI training, inference, and big data processing workloads through a single storage platform.&lt;/p&gt;
&lt;p&gt;A key design principle of this architecture is the separation of metadata and user data.&lt;/p&gt;
&lt;p&gt;JuiceFS provides the unified file system layer, while the metadata engine and Ceph RADOS independently handle metadata management and data storage. At the storage layer, Ceph distributes data and manages failure domains using the CRUSH algorithm, providing a decentralized and highly reliable storage backend.&lt;/p&gt;
&lt;p&gt;The architecture also adopts a &lt;strong&gt;lightweight client&lt;/strong&gt; model.&lt;/p&gt;
&lt;p&gt;JuiceFS clients are responsible for file system semantics, metadata operations, cache management, and request scheduling. Once data is written to Ceph RADOS, data durability—whether implemented through replication or erasure coding—is handled entirely by the storage cluster.&lt;/p&gt;
&lt;p&gt;This division of responsibilities keeps compute nodes lightweight, minimizes interference with AI training workloads, and fully utilizes the reliability and scalability already provided by the existing Ceph deployment.&lt;/p&gt;
&lt;p&gt;For our private cloud environment, this modular approach significantly reduced engineering and operational overhead compared with developing and maintaining an integrated distributed storage system. At the same time, it provides unified access to AI training, AI inference, and big data workloads through a common storage platform.&lt;/p&gt;
&lt;h3&gt;Unified AI storage architecture&lt;/h3&gt;
&lt;p&gt;Our unified AI storage platform consists of four logical layers.&lt;/p&gt;
&lt;h4&gt;Workload layer&lt;/h4&gt;
&lt;p&gt;At the top are the application workloads, including virtual machines, Kubernetes-based containerized applications, traditional microservices, AI training, AI inference, and Apache Spark jobs.&lt;/p&gt;
&lt;h4&gt;Cache layer&lt;/h4&gt;
&lt;p&gt;The cache layer consists of two components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DataCache Pool:&lt;/strong&gt; It accelerates repeated access to training datasets, model files, and other hot data, reducing load on the storage backend.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;KVCache Pool&lt;/strong&gt;: It’s designed for &lt;a href="https://en.wikipedia.org/wiki/Large_language_model"&gt;large language model&lt;/a&gt; (LLM) inference. It caches context data across multiple storage tiers, reducing latency and improving the responsiveness of online inference services.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Tuhu unified cloud storage architecture&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Tuhu unified cloud storage architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h4&gt;Storage protocol layer&lt;/h4&gt;
&lt;p&gt;JuiceFS provides a unified data access entry point here. AI training jobs access data via POSIX FUSE or CSI Driver; big data Spark jobs access data through the JuiceFS Hadoop Java SDK; and object storage toolchains access the same data via &lt;a href="https://juicefs.com/docs/community/guide/gateway"&gt;JuiceFS S3 Gateway&lt;/a&gt;. This approach unifies file storage, object storage, and big data access interfaces around a single underlying data set, reducing data movement and redundant storage across systems.&lt;/p&gt;
&lt;p&gt;It should be noted that block storage scenarios, such as VM cloud disks, are primarily handled by Ceph RBD, which is part of the overall cloud storage system's block storage capability. The focus of this article is the file, object, and big data access foundation built on JuiceFS. While both share the underlying Ceph storage resources, they differ in access semantics and service targets.&lt;/p&gt;
&lt;h4&gt;Storage engine layer&lt;/h4&gt;
&lt;p&gt;JuiceFS uses a &lt;a href="https://juicefs.com/docs/community/architecture/"&gt;metadata-data decoupled architecture&lt;/a&gt;. For file systems with hundreds of millions of files, metadata capabilities directly impact path resolution, directory traversal, file attribute queries, small-file access, and concurrent job startup performance. TiKV provides distributed transactions, strong consistency, high availability, and horizontal scalability, offering stable metadata support for large-scale file systems. We built a five-node TiKV cluster for the metadata layer.&lt;/p&gt;
&lt;p&gt;For the data layer, we use Ceph RADOS as the underlying data storage engine for JuiceFS. Ceph RADOS reuses existing private cloud storage resources, reducing duplicate infrastructure costs. In addition, by creating an erasure-coded pool for physical data storage, we improve physical disk capacity utilization while maintaining reliability, mitigating cost pressures from data growth.&lt;/p&gt;
&lt;p&gt;In this architecture, data communication follows two paths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The metadata path between clients and TiKV, handling path lookups, directory structures, file attributes, and state information&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The data read/write path between clients and Ceph RADOS, handling actual data block access&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Through librados, JuiceFS interacts directly with the underlying Ceph RADOS. Compared to traditional gateway-based storage architectures, this reduces multi-layer forwarding overhead, allowing clients to access the storage cluster more directly after metadata interactions and shortening the data access path.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS architecture at Tuhu&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS architecture at Tuhu&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h2&gt;Production deployment and optimization practices&lt;/h2&gt;
&lt;h3&gt;Critical scenario deployment and storage consolidation&lt;/h3&gt;
&lt;p&gt;In LLM application scenarios, our company has dedicated self-built compute clusters for model inference services such as MiniMax. Meanwhile, custom models developed by internal application lines have gradually been migrated to JuiceFS after passing production validation. As a result, core LLM inference and training applications have begun to unify onto the new file storage foundation, with the original NFS clusters and Alluxio storage clusters entering phased decommissioning.&lt;/p&gt;
&lt;p&gt;In core middleware and backup scenarios, including large-scale ClickHouse deployments, multiple core middleware systems and full production backup tasks have also been migrated to JuiceFS. As the unified file foundation has proven its capacity, stability, and access efficiency, MinIO and SeaweedFS have also entered decommissioning, reducing the operational complexity of maintaining multiple parallel storage systems.&lt;/p&gt;
&lt;h3&gt;Cache acceleration for AI training and inference&lt;/h3&gt;
&lt;p&gt;For AI training scenarios, training data typically has a "write once, read many" pattern. We use JuiceFS Community Edition's local data caching capability to cache hot training data on compute nodes. This reduces backend storage pressure and improves multi-node concurrent read efficiency.&lt;/p&gt;
&lt;p&gt;For LLM inference scenarios, models serving online requests or performing iterative token generation are sensitive to context data loading latency and throughput. With limited single-node GPU memory and memory capacity, we use a multi-level caching mechanism to cache context data across multiple levels, improving online inference response efficiency.&lt;/p&gt;
&lt;h3&gt;Benchmarking and small I/O optimization&lt;/h3&gt;
&lt;p&gt;After deploying the unified storage platform, we focused on evaluating its performance under small-file workloads.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;juicefs bench&lt;/code&gt; and fio, we benchmarked small-file operations and random I/O to compare the new JuiceFS + Ceph RADOS architecture with the previous JuiceFS + MinIO deployment.&lt;/p&gt;
&lt;p&gt;To minimize the impact of caching, all local caches were disabled during testing, allowing I/O requests to be served directly by the storage backend. It's worth noting that these benchmarks were intended to validate the architecture rather than measure peak cluster performance. The tests were conducted with only four client threads under low concurrency.&lt;/p&gt;
&lt;p&gt;Even under low-concurrency test conditions, the new architecture demonstrated substantial performance improvements.&lt;/p&gt;
&lt;p&gt;The two tables below show test results for JuiceFS + MinIO:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Item&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Throughput&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Large file write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;3,377.65 MiB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;1.21 s/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Large file read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;4,248.77 MiB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;0.96 s/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Small file write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;147.2 files/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;27.17&lt;/strong&gt; ms/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Small file read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;1,176.8 files/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;3.40&lt;/strong&gt; ms/file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Item&lt;/th&gt;
&lt;th style="text-align: left;"&gt;IOPS&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Throughput (MiB/s)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Random read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;57,504&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left;"&gt;1,483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Random write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;1,194&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left;"&gt;1,521&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The two tables below show test results for JuiceFS + Ceph RADOS:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Item&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Throughput&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Large file write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;4,984.12 MiB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;0.82 s/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Large file read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;4,817.87 MiB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;0.85 s/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Small file write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;817.0 files/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;4.90&lt;/strong&gt; ms/file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Small file read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;3,776.4 files/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;1.06&lt;/strong&gt; ms/file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Item&lt;/th&gt;
&lt;th style="text-align: left;"&gt;IOPS&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Throughput (MiB/s)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Random read&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;77,984&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left;"&gt;3,394&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Random write&lt;/td&gt;
&lt;td style="text-align: left;"&gt;&lt;strong&gt;3,836&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left;"&gt;4,120&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Test result highlights:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Small-file write throughput improved by up to &lt;strong&gt;5.5x&lt;/strong&gt;, with significantly lower latency for individual file writes.&lt;/li&gt;
&lt;li&gt;Small-file read throughput improved by up to &lt;strong&gt;3.2x&lt;/strong&gt;, delivering higher read throughput and lower per-file read latency.&lt;/li&gt;
&lt;li&gt;Random I/O performance also improved. Both throughput and IOPS increased, with random-write IOPS improving by more than &lt;strong&gt;3x&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From an architectural perspective, the JuiceFS + MinIO solution requires S3 interface and object storage gateway overhead, while the JuiceFS + Ceph RADOS solution uses librados for more direct interaction with the underlying storage cluster. This reduces gateway forwarding overhead. As a result, &lt;strong&gt;Ceph RADOS shows more significant performance advantages in scenarios sensitive to access paths, such as small-file writes and random writes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;However, in random small-file read tests, since local caching was disabled, data still needed to be retrieved from physical disks in real time. Therefore, read performance did not show the same order-of-magnitude improvement as writes, but still achieved a stable ~1.4x improvement overall.&lt;/p&gt;
&lt;h3&gt;Small-file space amplification and write amplification optimization&lt;/h3&gt;
&lt;p&gt;In erasure coding (EC) mode, traditional EC algorithms require alignment with stripe units. In a 6+3 configuration, even writing a 10-byte tiny file requires filling 6 data chunks to 4 KB each plus 3 coding chunks, resulting in 36 KB of physical storage—causing severe write amplification and thousands of times space waste.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Before:after write amplification optimization&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Before/after write amplification optimization&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;To address this, we introduced &lt;a href="https://ceph.io/en/news/blog/2025/tentacle-fastec-performance-updates/"&gt;Ceph's Fast EC feature&lt;/a&gt; to optimize small-object writes.&lt;/p&gt;
&lt;p&gt;On one hand, Fast EC alleviates small-file space amplification. When enabled, small objects are no longer forced to fill entire stripes. For a 10-byte file, the logical size remains 10 bytes, while physical space occupies the first stripe; with a 4 KB minimum allocation unit and parity data, physical footprint is reduced to 16 KB.&lt;/p&gt;
&lt;p&gt;On the other hand, Fast EC also improves read/write efficiency in small I/O scenarios. Reads no longer require fetching full stripes; writes can use &lt;a href="https://ceph.io/en/news/blog/2025/tentacle-fastec-performance-updates/#parity-delta-writes"&gt;parity delta writes&lt;/a&gt; (PDW) to reduce unnecessary network interactions and I/O overhead, improving overall small-file read/write performance.&lt;/p&gt;
&lt;h3&gt;JuiceFS Mount Pod stability optimization&lt;/h3&gt;
&lt;p&gt;In containerized environments, AI training applications occasionally encountered bad file descriptor errors, which severely impacted training efficiency. Investigation revealed that these errors were related to Mount Pod out-of-memory (OOM) conditions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Periodic OOM due to metadata backups:&lt;/strong&gt; When the cluster reached tens of millions or hundreds of millions of files, JuiceFS' default hourly metadata backups generated large backup files. Since these backup tasks were randomly assigned to clients in the cluster, and the underlying RADOS architecture imposes size limits on individual object writes (for example, 128 MB), backup tasks could fail repeatedly in large-scale file system scenarios, causing Mount Pod memory usage to grow continuously and eventually trigger OOM.&lt;/p&gt;
&lt;p&gt;To address this, we disabled automatic backup on Mount Pods, preventing online clients from performing automatic backups. Instead, dedicated scheduled tasks handle metadata backups centrally, avoiding additional backup pressure on application clients.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;周期性 OOM 客户端内存占用&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Periodic OOM memory usage&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;strong&gt;Occasional OOM due to page cache growth:&lt;/strong&gt; During frequent reads of large amounts of local cache, the Linux kernel page cache continued to grow. In such cases, even if the container's actual memory usage was only about 1.1GB, Kubernetes OOM decisions based on &lt;code&gt;working_set_bytes&lt;/code&gt;—which includes page cache—could trigger OOM kills when the metric rose to high levels (for example, 33.5 GB), causing occasional client disconnections.&lt;/p&gt;
&lt;p&gt;To address this, we increased &lt;code&gt;limits.memory&lt;/code&gt; based on historical monitoring data. Then, we physically isolated cache resources, ensuring that different PVCs did not share the same local cache directory. For nodes with limited memory (such as CPU nodes), we capped local cache capacity (data cache size) within a reasonable range (for example, 10 GB to 50 GB) and enabled cache reclamation once the limit was reached. This prevents uncontrolled growth of the kernel page cache inside the container.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;偶发性 OOM 客户端内存占用&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Occasional OOM memory usage&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Through these optimizations, Mount Pod stability improved significantly in large-scale file system and high-frequency cache access scenarios. This provides a solid foundation for onboarding more AI training and inference workloads to the unified file foundation.&lt;/p&gt;
&lt;h2&gt;Future plans&lt;/h2&gt;
&lt;p&gt;We plan to focus on three aspects for the continued evolution of the AI cloud storage infrastructure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unified management from private cloud to &lt;a href="https://cloud.google.com/learn/what-is-hybrid-cloud"&gt;hybrid cloud&lt;/a&gt;:&lt;/strong&gt; As AI training jobs are scheduled across both private and public clouds, the storage foundation needs stronger cross-environment data management capabilities. Building on the existing private Ceph RADOS architecture, we’ll continue exploring JuiceFS' integration with public cloud object storage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By pushing cross-cloud data synchronization, data distribution, and access path management down to the storage layer as much as possible, we can reduce the application's awareness of differences between cloud environments, providing more consistent mount paths and access experiences. This will improve training job migration efficiency across different compute environments and reduce data management complexity in multi-cloud settings.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Promoting lakehouse integration to reduce cross-system data movement:&lt;/strong&gt; Previously, data movement between offline HDFS big data clusters and algorithm storage clusters relied on synchronization tools, increasing pipeline complexity, data redundancy, sync latency, and management costs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We plan to further adopt and refine the JuiceFS Hadoop Java SDK so that Spark jobs in the algorithm layer can directly read and write the underlying unified storage pool. This will allow big data computing, algorithm training, and data archiving to operate around a single storage foundation, reducing cross-system data replication and redundant storage, further breaking down data silos, and advancing storage-compute separation and lakehouse integration.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Building tiered storage to accelerate LLM inference&lt;/strong&gt;: As LLM inference services scale, a single storage medium can no longer simultaneously meet cost, capacity, and latency requirements. We plan to build capabilities in data tiering and KVCache tiering.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;For data tiering:&lt;/strong&gt; JuiceFS' current data tiering feature is primarily designed for public cloud object storage. For private Ceph RADOS environments, we plan to collaborate with the community to explore mounting multiple Ceph storage pools of different performance tiers (for example, NVMe Pool and HDD Pool) under the same JuiceFS file system, allowing data with different access frequencies to reside on appropriate storage tiers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;For KVCache tiering:&lt;/strong&gt; As LLM inference evolves toward prefill/decode (PD) separation in distributed architectures, relying solely on single-node GPU memory to hold context data faces capacity and cost bottlenecks. Building on the unified storage foundation, we’ll gradually explore a four-tier KVCache architecture composed of HBM (GPU memory), DRAM, local SSD, and shared storage, providing more flexible context data management and access acceleration for large-scale AI inference clusters.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Thu, 30 Jul 2026 09:02:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/user-stories/unify-ai-storage-platform-juicefs-ceph-rados</guid></item><item><title>Amazon S3 Files: How It Works, Performance Boundaries, and a Comparison with JuiceFS</title><link>https://www.juicefs.com/en/blog/engineering/amazon-s3-files-vs-juicefs</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;AWS announced &lt;a href="https://aws.amazon.com/s3/features/files/"&gt;Amazon S3 Files&lt;/a&gt; to let you mount an S3 bucket as a high‑performance shared file system on compute nodes without moving any data.  &lt;/p&gt;
&lt;p&gt;This isn't the industry's first attempt to make S3 accessible as a file system. From the early days of s3fs, to AWS' later release of &lt;a href="https://github.com/awslabs/mountpoint-s3"&gt;Mountpoint for Amazon S3&lt;/a&gt;, and now S3 Files, the path to "using S3 like a file system" has been many years in the making. The key difference is that earlier solutions mostly operated at the access layer, while S3 Files finally wraps shared access, full file system semantics, and a managed high‑performance layer into a native offering.  &lt;/p&gt;
&lt;p&gt;This makes S3 Files a new option worth analyzing on its own. For workloads that need file‑style access to existing S3 data, it provides a native, lightweight solution. But in more complex scenarios such as AI model training or big data analytics, its actual performance still needs to be evaluated based on its underlying implementation and runtime behavior.&lt;/p&gt;
&lt;p&gt;In this article, we’ll analyze S3 Files’ implementation, performance boundaries, and how it differs from JuiceFS.&lt;/p&gt;
&lt;h2&gt;S3 Files: an S3 native file system with EFS as the high‑performance layer&lt;/h2&gt;
&lt;p&gt;S3 Files uses Amazon Elastic File System (EFS) as a managed high‑performance storage layer to handle low‑latency data and metadata. On top of that, it provides full file system semantics for S3, including consistency, file locking, and POSIX permissions.&lt;br&gt;
Think of it this way: AWS adds an EFS-based file system access layer on top of object storage, so that data previously accessible only through object APIs can be used directly by compute nodes as directories, files, and mount points. Changes between the file system and S3 are synchronized automatically by the service in the background.&lt;br&gt;
With this architecture, S3 Files does not migrate the entire dataset. Instead, it only places a portion of the current working set into the high‑performance layer on demand, while the “source of truth” for the data remains in S3.&lt;/p&gt;
&lt;h2&gt;How S3 Files works: mount, import, and sync&lt;/h2&gt;
&lt;p&gt;For S3 Files, mounting is only the beginning. What really matters is the data path after mounting: how the scope is determined, what gets imported on first access, which requests go to the high‑performance layer, and how writes are synced back to S3. These mechanisms directly determine the performance boundaries and cost structure discussed later.&lt;br&gt;
The figure below shows &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files.html#s3-files-how-it-works"&gt;S3 Files mount architecture&lt;/a&gt;:&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;S3 Files mount architecture&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;S3 Files mount architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Taking an EC2 instance mounting an existing S3 bucket as an example, the real questions are not about the mount command itself, but about what happens after mounting: how data is imported, accessed, and synced. Here are the key technical details.&lt;/p&gt;
&lt;h3&gt;Scope: import the entire bucket or a specific prefix&lt;/h3&gt;
&lt;p&gt;In S3, files are organized using &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html"&gt;prefixes&lt;/a&gt;. You can think of them as similar to “subdirectories” or “sub-buckets” within a bucket, but they are not actual directories. S3 Files can mount an entire S3 bucket (i.e., &lt;code&gt;s3://my-bucket/&lt;/code&gt;) or restrict the scope to a specific prefix (i.e., only &lt;code&gt;s3://my-bucket/data/ml/&lt;/code&gt;). This is especially important for huge S3 buckets containing millions or even hundreds of millions of objects, because a broader scope adds more metadata sync overhead and potentially more operational complexity.&lt;br&gt;
When using S3 Files on a compute node, AWS provides a custom mount client &lt;code&gt;amazon-efs-utils&lt;/code&gt;. When mounting, you use the file system ID assigned by AWS for the S3 Files instance, not the bucket name.&lt;br&gt;
You can create a local mount directory and mount it using the dedicated &lt;code&gt;s3files&lt;/code&gt; file system type as shown below:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;sudo yum -y install amazon-efs-utils
sudo mkdir /mnt/s3files
sudo mount -t s3files file-system-id:/ /mnt/s3files
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When mounting, you can specify a subdirectory (or actually a prefix) in the mount path (for example, &lt;code&gt;file-system-id:/data/ml/&lt;/code&gt;). However, this only affects the local mount point, as the underlying metadata sync still applies to the entire bucket, and other mount points could inadvertently access other subdirectories. Very often in practice, a better approach is to limit the scope to a specific prefix when creating the S3 Files instance, rather than using the entire bucket and trying to restrict access afterward.&lt;/p&gt;
&lt;h3&gt;First access: import triggers and size thresholds&lt;/h3&gt;
&lt;p&gt;S3 Files does not immediately move the entire dataset into the high‑performance layer after mounting. Data import is triggered by access events. The default mode is &lt;code&gt;trigger=ON_DIRECTORY_FIRST_ACCESS&lt;/code&gt;: when you first access a directory, the system imports the metadata of files under that directory and asynchronously moves the data of small files that meet the criteria into the EFS high‑performance layer.  &lt;/p&gt;
&lt;p&gt;If configured as &lt;code&gt;trigger=ON_FILE_ACCESS&lt;/code&gt;, the first directory traversal only imports metadata; data enters the high‑performance layer only when a file is actually read for the first time. This saves space and import cost, but first‑read latency is higher.  &lt;/p&gt;
&lt;p&gt;The most critical control parameter here is &lt;code&gt;sizeLessThan&lt;/code&gt;, which takes a value in bytes. By default, only files smaller than 128 KiB (i.e., &lt;code&gt;sizeLessThan=131072&lt;/code&gt;) are moved into the high‑performance layer during import. Larger files only have their metadata imported; their content is still retrieved mainly from S3. In other words, S3 Files optimizes primarily for small files and low‑latency access, not for warming up all data into the high‑performance layer. For AI training datasets that consist mainly of 10 MB‑level images or video files, this is crucial: even after a directory traversal, those large files may not actually enter the high‑performance layer under default settings.&lt;/p&gt;
&lt;h3&gt;Sync intervals and conflict resolution&lt;/h3&gt;
&lt;p&gt;S3 Files automatically maintains bidirectional sync between the file system and S3 in the background. When data in S3 changes, the file system view updates accordingly. Writes from compute nodes first land in the EFS high‑performance layer and then are batch‑synced back to S3 asynchronously. By default, the system aggregates modifications for a period before writing back.  &lt;/p&gt;
&lt;p&gt;The conflict resolution principle is clear: S3 is always the source of truth. If a file system modification hasn’t yet been synced back and the corresponding object has been updated by another application in S3, the system uses the latest version from S3 and moves the conflicting file to a &lt;code&gt;.s3files-lost+found-*&lt;/code&gt; directory.&lt;/p&gt;
&lt;h2&gt;Performance boundaries and cost structure of S3 Files&lt;/h2&gt;
&lt;p&gt;The previous section explained how S3 Files works. This section discusses the resulting performance boundaries and cost structure. High‑performance layer occupancy, large‑file read path, write flow, and the amplification effects of partial updates and directory operations are the four most important aspects to evaluate.&lt;/p&gt;
&lt;h3&gt;Occupancy, eviction, and cost of the EFS high‑performance layer&lt;/h3&gt;
&lt;p&gt;S3 Files does not use capacity‑based LRU eviction. Instead, it uses access‑time‑based lifecycle management. By default, data that has been synced to S3 and not read for 30 days is evicted from the EFS high‑performance layer. This period is controlled by &lt;code&gt;daysAfterLastAccess&lt;/code&gt; (configurable from 1 to 365 days).  &lt;/p&gt;
&lt;p&gt;This means the cost depends on how much data needs to reside in EFS and for how long. If your working set is large and stays active for a long time, costs will rise accordingly.&lt;/p&gt;
&lt;h3&gt;Large‑file direct reads and random reads: essentially client passthrough&lt;/h3&gt;
&lt;p&gt;S3 Files does not route all large‑file reads through the EFS high‑performance layer. With the default &lt;code&gt;sizeLessThan&lt;/code&gt; of 128 KiB, only files below that threshold have their data moved into the high‑performance layer during import. For files already synced to S3, reads of 128 KiB or larger are streamed directly from S3.  &lt;/p&gt;
&lt;p&gt;In other words, S3 Files focuses on optimizing small‑file access and low latency, not on keeping large‑file reads in the high‑performance layer.  &lt;/p&gt;
&lt;p&gt;This direct‑read path requires that the compute resources themselves have permission to read the source bucket. AWS documentation explicitly requires roles to have &lt;code&gt;s3:GetObject&lt;/code&gt; and &lt;code&gt;s3:GetObjectVersion&lt;/code&gt; permissions; otherwise, the client cannot read directly from S3.&lt;/p&gt;
&lt;h3&gt;Cost of sequential writes: large‑scale writes introduce additional flow costs&lt;/h3&gt;
&lt;p&gt;The write path of S3 Files is not directly to S3. All writes first go into the EFS high‑performance layer and then are asynchronously synced back to S3.  &lt;/p&gt;
&lt;p&gt;This means that if your workload continuously generates large amounts of result data – for example, sequentially writing hundreds of terabytes of training outputs or analysis results – that data will incur two extra costs when flowing through S3 Files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data flow cost: Writes go into the high‑performance layer, then are later synced to S3. Compared to writing directly to S3, this path has an additional intermediate flow overhead.  &lt;/li&gt;
&lt;li&gt;Short‑term residency cost: After data is synced, it’s not immediately evicted from the high‑performance layer. It stays until the eviction condition is met. So temporary data from large writes may occupy EFS capacity for some time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the current AWS US East (N. Virginia) regional pricing as an example: writing to EFS is about $0.06/GB, and reading it back for sync to S3 is about $0.03/GB. For the data flow alone, each 1 TB written adds roughly $90 in extra cost. If that data continues to reside in EFS after sync, further high‑performance layer storage costs will apply.  &lt;/p&gt;
&lt;p&gt;This is why S3 Files is better suited for reading existing data than for sustaining large‑scale, continuous result writing.&lt;/p&gt;
&lt;h3&gt;Partial updates and directory operations: amplification due to the object model&lt;/h3&gt;
&lt;p&gt;S3 Files does not chunk data at the file system level. It tries to maintain a direct mapping between files and S3 objects. The drawback: when you perform a small random write or append to a large file – from the application’s perspective a tiny update – the backend sync back to S3 can easily amplify into a full object write and versioning overhead.  &lt;/p&gt;
&lt;p&gt;For example, a user appends a 100 KB image key to a 100 GB LMDB file through S3 Files. The application sees a small write. But this modification is not immediately written back to S3. It’s aggregated for up to  60 seconds and then synced to the bucket. Unlike block storage, which would only update a single block, this type of update is more likely to be amplified into an object write, sync latency, and version storage costs. The larger the file and the more frequent the modifications, the more serious this issue becomes.  &lt;/p&gt;
&lt;p&gt;Directory renaming is similarly constrained by S3’s flat namespace. S3 does not have native directory metadata. Therefore, when you perform &lt;code&gt;rename&lt;/code&gt; or &lt;code&gt;mv&lt;/code&gt;, S3 Files cannot just update a single metadata entry. Instead, it must write new objects for every file under the directory and delete the old ones. For a directory with tens of millions of objects, this significantly prolongs sync time and increases S3 request costs. Until the sync completes, the file system view and the S3 view may be temporarily inconsistent.  &lt;/p&gt;
&lt;p&gt;Overall, S3 Files’ strengths are native access, zero data migration, and good compatibility with existing S3 assets. The drawback, however, is that once the workload shifts to large-file reads, continuous writes, frequent partial updates, or operations on large directories, both performance and cost are amplified more quickly. For this reason, S3 Files is better suited for lightweight shared access scenarios, while in heavy workloads such as training, data production, and large-scale analytics, its drawbacks tend to emerge earlier.&lt;/p&gt;
&lt;h2&gt;JuiceFS vs. S3 Files: two different architectural philosophies&lt;/h2&gt;
&lt;p&gt;As we saw earlier, many of S3 Files’ boundaries are not accidental; they are typical of solutions that try to map files directly to S3 objects. Whether it’s the early s3fs, Mountpoint for Amazon S3 (which focuses on high‑throughput reads), or today’s S3 Files, all of them try to maintain a direct mapping between files and S3 objects in exchange for transparent access to existing S3 data.  &lt;/p&gt;
&lt;p&gt;The advantage of this approach is transparency and low‑effort adoption. The cost has inherent limitations due to the S3 object model. That’s why directory operations tend to devolve into per‑object requests, and partial updates on large files easily amplify into write amplification, sync delays, and extra costs.  &lt;/p&gt;
&lt;p&gt;This is precisely why the difference between JuiceFS and these solutions is not a matter of a single feature or metric, but a fundamental divergence in architectural philosophy. JuiceFS is not an access layer that “mounts S3 as a file system”; it’s a cloud‑native distributed file system built on top of object storage. It adopts a decoupled metadata and data architecture: file data is stored in the underlying object storage, while metadata is independently managed by a high‑performance key‑value store. This makes JuiceFS much better suited for heavier production workloads such as training, analytics, and data production.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;1JuiceFS 架构图.drawio&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS Community Edition&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;To help you compare these two architectures, here is a comprehensive table comparing JuiceFS and S3 Files:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Comparison basis&lt;/th&gt;
&lt;th style="text-align: left;"&gt;JuiceFS&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Amazon S3 Files&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Architecture&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Metadata and data decoupled; files are chunked and written to object storage&lt;/td&gt;
&lt;td style="text-align: left;"&gt;EFS‑based proxy; data is not chunked; 1:1 mapping based on file size (&amp;lt; 128 KB by default)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Core cost&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Open source software; costs from object storage, metadata engine, and cache resources&lt;/td&gt;
&lt;td style="text-align: left;"&gt;In addition to S3 storage, pay for EFS storage ($ 0.30/GB) plus data sync fees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Read/Write amplification (random writes)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Very low in many cases. Because of chunking, a partial random write typically updates only the affected block, not the whole file&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Can be very high in data production scenarios. Random modification of a large file leads to rewriting and retransmitting the entire object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Tiering strategy&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Based on capacity and access heat; hot data is automatically warmed up into local disk/memory cache on compute nodes&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Based on file size and access time. Small files (&amp;lt; 128 KB) are cached in EFS; large files bypass EFS and read/write directly to S3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Small‑file performance&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Relies on a fully in‑memory metadata engine (like Redis or TiKV); well suited for many small files and metadata operations&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Depends on EFS performance and the NFS protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Large‑file throughput&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Can use local NVMe / memory cache to boost throughput&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Depends on EFS gateway or S3 direct performance; large‑scale parallel throughput is tied to capacity quotas&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Cache consistency&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Strong consistency (close‑to‑open) enforced by the independent metadata service&lt;/td&gt;
&lt;td style="text-align: left;"&gt;NFS close‑to‑open. But when concurrent modifications conflict between S3 and the file system, local EFS data is discarded into lost+found and S3 is forced as the source of truth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;POSIX compatibility&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Nearly 100% compatible. Supports hard links, atomic rename, and full lock semantics&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Subset of NFSv4.1/4.2. Does not support hard links or atomic rename&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Permission management&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Supports standard POSIX permissions, ACLs, extended ACLs, and more&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Supports standard POSIX permissions, ACLs, extended ACLs, and more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Encryption and security&lt;/td&gt;
&lt;td style="text-align: left;"&gt;In‑transit encryption and at‑rest encryption&lt;/td&gt;
&lt;td style="text-align: left;"&gt;In‑transit TLS encryption and at‑rest SSE‑KMS encryption&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;AI‑specific optimizations&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Deeply optimized for AI‑common formats (such as LMDB and Safetensors) with mmap reads and local data warm-up&lt;/td&gt;
&lt;td style="text-align: left;"&gt;No AI‑specific optimizations; relies on basic streaming reads&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;There is no silver bullet. The right choice depends on your specific scenario.  &lt;/p&gt;
&lt;p&gt;The launch of S3 Files fills a gap in the AWS official ecosystem: seamless, zero‑migration native conversion of S3 into a file system. Its design philosophy is clear: 100% format transparency with the S3 object ecosystem, with targeted optimizations for small‑file (&amp;lt;128 KB) read/write performance in AI scenarios.&lt;/p&gt;
&lt;h3&gt;When to choose S3 Files&lt;/h3&gt;
&lt;p&gt;If your core need is to allow legacy applications, shell scripts, or traditional software to access existing S3 data as files without changing your architecture, or if you need a general shared file space that is primarily used for read‑only, small‑file, sequential workloads, then S3 Files is the more natural choice. Its native managed service, plug‑and‑play, and zero data migration can significantly lower the barrier to entry (though you may need to pay high EFS storage and sync costs for that convenience).&lt;/p&gt;
&lt;h3&gt;When to choose JuiceFS&lt;/h3&gt;
&lt;p&gt;If your workloads involve AI model training, data production, high‑performance computing (HPC), or big data analytics – facing tens of millions of small files, random reads/writes of terabyte‑scale large files, or demanding higher mmap performance, cache hit rates, and overall throughput – then JuiceFS is the better fit. Compared to S3 Files, JuiceFS’ data chunking, independent metadata engine, and more flexible caching system make it better suited for heavy‑workload, long‑running production and AI training/inference file system scenarios.  &lt;/p&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Thu, 23 Jul 2026 06:35:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/engineering/amazon-s3-files-vs-juicefs</guid></item><item><title>JuiceFS 1.4: Lower Costs, Faster Metadata, and Better Control for Massive Data Management</title><link>https://www.juicefs.com/en/blog/release-notes/juicefs-1-4-tiered-storage-faster-metadata</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;a href="https://github.com/juicedata/juicefs/releases/tag/v1.4.0"&gt;JuiceFS Community Edition 1.4&lt;/a&gt; is released. It’s the fifth major release since the open source edition was introduced in 2021 and is now the new Long-Term Support (LTS) version. We’ll continue to maintain both v1.4 and v1.3, while v1.2 has reached end of maintenance.&lt;/p&gt;
&lt;p&gt;JuiceFS has now surpassed &lt;strong&gt;14.2k &lt;a href="https://github.com/juicedata/juicefs"&gt;GitHub&lt;/a&gt; stars&lt;/strong&gt;. According to anonymous usage statistics reported by users, the total amount of data managed by JuiceFS Community Edition has exceeded &lt;strong&gt;1.4 EB&lt;/strong&gt;, representing more than &lt;strong&gt;700× growth&lt;/strong&gt; since 2022.&lt;/p&gt;
&lt;p&gt;As JuiceFS is increasingly adopted for large-scale data management, high-concurrency workloads, and multi-user shared environments, long-standing challenges such as storage cost optimization, metadata performance, and resource governance have become more prominent. These are the primary focus areas of the 1.4 release.&lt;/p&gt;
&lt;p&gt;In this post, we'll walk through the key improvements in JuiceFS 1.4, including tiered storage, faster metadata operations, enhanced resource management, more reliable data synchronization, metadata change tracking, and broader platform compatibility.&lt;/p&gt;
&lt;h2&gt;Lower storage costs with file- and directory-level tiered storage&lt;/h2&gt;
&lt;p&gt;As file systems continue to grow, different datasets naturally diverge in access frequency, performance requirements, and retention periods. Using a single storage type uniformly makes it difficult to simultaneously meet the performance needs of frequently accessed data and the cost-control requirements of infrequently accessed data. &lt;a href="https://en.wikipedia.org/wiki/Object_storage"&gt;Object storage&lt;/a&gt; typically offers different storage classes based on access patterns, including hot data, warm (infrequent access) data, and cold (archival) data storage.  &lt;/p&gt;
&lt;p&gt;JuiceFS has supported setting object storage types via &lt;code&gt;--storage-class&lt;/code&gt; since v1.1, but the configuration granularity was mainly at the file system default or mount point level. &lt;strong&gt;JuiceFS 1.4 integrates storage class into the file system semantics, supporting storage tier settings on a per-file or per-directory basis.&lt;/strong&gt; Directory-level configurations can be inherited by subsequently created files and subdirectories. This facilitates tiered management by project, dataset, or application directory.  &lt;/p&gt;
&lt;p&gt;The storage tiers can be configured flexibly according to the object storage vendor being used. When writing new data, JuiceFS writes it to the corresponding object storage type based on the configuration of the file or its parent directory. For existing data, you can also adjust the metadata configuration and leverage the data migration capabilities on the object storage side to move it to a new storage tier. This capability is suitable for scenarios such as AI training datasets, log archiving, backup data, historical experiment data, and offline analysis results. For archive storage, it’s still necessary to evaluate retrieval latency and fees. For more implementation details, usage methods, and future evolution, see &lt;a href="https://juicefs.com/en/blog/engineering/juicefs-tiered-storage"&gt;A Deep Dive into JuiceFS 1.4 Tiered Storage&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Faster metadata operations: batch delete, batch clone, and hotspot read optimization&lt;/h2&gt;
&lt;p&gt;In workloads involving massive numbers of small files, large directories, or high-concurrency access, metadata operations often become the primary performance bottleneck.  &lt;/p&gt;
&lt;p&gt;JuiceFS 1.4 addresses write transaction overhead and hotspot read overhead in metadata operations with optimizations including batch delete, batch clone, and &lt;a href="https://redis.io/docs/latest/develop/clients/client-side-caching/"&gt;Redis client-side caching&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Batch delete and clone: reducing transaction overhead&lt;/h3&gt;
&lt;p&gt;Previously, deleting a large number of files required the system to process them one by one, sequentially updating directory entries, inodes, space statistics, trash, and quota metadata. JuiceFS 1.4 consolidates the deletion of multiple non-directory files within the same directory into a batch transaction, reducing the repetitive overhead of per-file operations. This is applicable to scenarios like large directory cleanup, temporary data reclamation, training sample cleanup, and log directory deletion.&lt;/p&gt;
&lt;p&gt;Batch cloning targets directory replication and snapshot scenarios. &lt;a href="https://juicefs.com/docs/community/guide/clone/"&gt;&lt;code&gt;juicefs clone&lt;/code&gt;&lt;/a&gt; does not copy the underlying data blocks but creates new file records at the metadata layer and reuses the source file's data block references. JuiceFS 1.4 further reduces the metadata transactions generated by per-file cloning by processing clones of multiple files within the same directory in batch. This is ideal for AI dataset version management, experiment environment preparation, and large-scale directory snapshots.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;deletion&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Throughput improvements for batch delete&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;clone&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Throughput improvements for batch delete&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h3&gt;Redis client-side caching: reducing hotspot metadata read overhead&lt;/h3&gt;
&lt;p&gt;In high-concurrency reads, path resolution, directory entry lookups, and file attribute queries generate a large number of repeated requests. When Redis is used as the metadata engine, these requests require round trips between the client and Redis. This may impact access latency and increase Redis load.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JuiceFS 1.4 caches hot inode attributes and directory entries locally on the client side. When cached, it can reduce repeated queries to Redis.&lt;/strong&gt; When related metadata changes, the local state is updated through a cache invalidation mechanism. It's important to note that this capability caches metadata, not file content.  &lt;/p&gt;
&lt;p&gt;It’s particularly beneficial for read-heavy workloads with stable hot paths, such as AI training data loading, large-scale container startup, and multi-task concurrent reading. For more implementation details, see &lt;a href="https://juicefs.com/en/blog/engineering/improve-metadata-operation-performance"&gt;Faster Metadata Operations with Batch Unlink, Batch Clone, and Redis Client-Side Caching&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Improved resource management: user quotas and trash usage statistics&lt;/h2&gt;
&lt;p&gt;In distributed storage environments, storage resources are often shared among multiple users, teams, and projects.&lt;/p&gt;
&lt;p&gt;Without effective governance, accidental writes or abnormal workloads from a single user can quickly consume large amounts of storage space or inodes. This affects both system stability and operating costs. Quota management is a critical means of establishing predictable resource boundaries in shared environments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JuiceFS Community Edition 1.4 introduces &lt;a href="https://juicefs.com/docs/community/guide/quota/#user-and-group-quota"&gt;user and group quotas&lt;/a&gt;, allowing administrators to monitor, configure, and enforce resource limits based on identities.&lt;/strong&gt;  &lt;/p&gt;
&lt;p&gt;Resource governance is now extended beyond file system and directory quotas to include user- and group-level quotas, making it especially suitable for shared clusters and AI training platforms.  &lt;/p&gt;
&lt;p&gt;To reduce metadata overhead in multi-client environments, JuiceFS uses asynchronous accounting so that usage statistics converge gradually over time. For details, see &lt;a href="https://juicefs.com/en/blog/engineering/quota-design-in-distributed-architecture"&gt;Quota Design in Distributed Architectures: Implementation and Use Cases in JuiceFS.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Supported quota types include:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Quota type&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Scope&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Design goal&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Typical use case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Total file system quota&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Entire file system&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Prevents overall resource runaway&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Cost budget control, capacity limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Subdirectory quota&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Directory subtree&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Blocks abnormal write behavior&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Prevents misoperations, small‑file storms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;User quota&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Per user&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Isolates impact between different applications&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Multi‑tenant data management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;User group quota&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Project or department&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Cost allocation and team limits&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Shared environment for AI projects&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;JuiceFS 1.4 also improves trash space visibility.  &lt;/p&gt;
&lt;p&gt;Deleted files may remain in the trash for a retention period, making it difficult to understand why storage space has not yet been reclaimed. The enhanced &lt;code&gt;summary&lt;/code&gt; tool now reports trash usage, helping administrators identify storage consumption and make informed cleanup, retention, or expansion decisions.&lt;/p&gt;
&lt;h2&gt;Expanded capabilities: sync, backup, and change tracking&lt;/h2&gt;
&lt;h3&gt;More reliable large-scale sync&lt;/h3&gt;
&lt;p&gt;Large-scale migration, cross-cloud sync, backup, and archival workloads often face interruptions, security requirements, and bandwidth contention.  &lt;/p&gt;
&lt;p&gt;JuiceFS 1.4 significantly enhances &lt;a href="https://juicefs.com/docs/community/guide/sync/"&gt;&lt;code&gt;juicefs sync&lt;/code&gt;&lt;/a&gt; with three major capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Resumable sync:&lt;/strong&gt; It reduces recovery costs after task interruptions. During synchronization, JuiceFS records the task progress. If the task exits abnormally or is manually interrupted, it can resume from the saved state, reducing repeated scanning and processing. This capability is suitable for migration and backup scenarios with a large number of objects, long task durations, or unstable cross-cloud links.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data encryption and decryption:&lt;/strong&gt; In cross-cloud backup and archiving scenarios, client-side encryption is a common compliance requirement. &lt;strong&gt;JuiceFS 1.4 supports completing encrypted writes, decryption recovery, or re-encryption within the sync pipeline&lt;/strong&gt;, reducing reliance on external encryption tools. This capability is suitable for off-site backup, sensitive data migration, key rotation, and compliance auditing. However, it requires careful management of key storage and recovery processes.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global traffic control:&lt;/strong&gt; It provides bandwidth constraints for concurrent multiple sync tasks. Compared to per-process rate limiting, version 1.4 can centrally manage the overall bandwidth usage of multiple sync tasks, reducing the impact of sync tasks on online application and other network activities. This is suitable for cross-cloud transfers, multi-task concurrent backups, data center migrations, and shared outbound link scenarios. For implementation details, see &lt;a href="https://juicefs.com/en/blog/engineering/resumable-sync-encryption-bandwidth-control"&gt;JuiceFS Sync for PB-Scale Data Transfers: Resumable Sync, Encryption, and Bandwidth Control&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;checkpoint&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Checkpoint save, restore, and cleanup workflow&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h3&gt;Changelog: metadata changes become traceable&lt;/h3&gt;
&lt;p&gt;JuiceFS Community Edition 1.4 introduces a &lt;a href="https://juicefs.com/docs/community/administration/changelog/"&gt;metadata changelog&lt;/a&gt; capability, which records metadata change events across the file system.  &lt;/p&gt;
&lt;p&gt;Previously, troubleshooting relied primarily on client-side access logs, which only reflected operations performed through individual mount points. In multi-client deployments, reconstructing a complete sequence of events was often difficult.  &lt;/p&gt;
&lt;p&gt;A changelog records metadata operations—including file creation, deletion, attribute updates, and renames—directly at the metadata layer, providing a unified source for troubleshooting, auditing, and incremental processing.&lt;br&gt;
Administrators can now quickly identify accidental deletions, unexpected renames, permission changes, and metadata modifications without collecting logs from every client.  &lt;/p&gt;
&lt;p&gt;When issues like accidental deletion, abnormal renaming, or unexpected permission or attribute changes occur, administrators can review the relevant change records based on the changelog. This reduces dependence on single-client logs and shortens the troubleshooting path. It also provides a more unified source of metadata changes for operational auditing.  &lt;/p&gt;
&lt;p&gt;In backup, migration, and recovery scenarios, the changelog can serve as a reference for incremental processing. For large-scale file systems, numerous changes may occur between two full backups or migration tasks. By recording the metadata changes during this period, the changelog can provide input for subsequent incremental backups, migrations, or recovery processes, reducing reliance on full scans.&lt;/p&gt;
&lt;h2&gt;Better support across different environments&lt;/h2&gt;
&lt;p&gt;JuiceFS Community Edition 1.4 further improves compatibility across diverse deployment environments.  &lt;/p&gt;
&lt;p&gt;On Windows clients, the release improves cross-platform consistency and stability, including user mapping, permission mapping, and file access behavior, reducing compatibility issues when Linux and Windows clients access the same file system.  &lt;/p&gt;
&lt;p&gt;For the Java SDK and the Hadoop ecosystem, &lt;strong&gt;JuiceFS 1.4 adds Kerberos authentication, completing support for Hadoop secure mode&lt;/strong&gt;.  &lt;/p&gt;
&lt;p&gt;JuiceFS 1.3 already introduced Apache Ranger integration for authorization and access control. Together, Kerberos authenticates who the user is, while Ranger determines what the user can access, providing a more complete security model for enterprise big data platforms.  &lt;/p&gt;
&lt;p&gt;On the storage backend side, JuiceFS 1.4 also adds support for SMB/CIFS-based storage. This makes it easier to integrate with existing NAS or file-sharing infrastructure.&lt;/p&gt;
&lt;h2&gt;Continued growth in scale and AI adoption&lt;/h2&gt;
&lt;p&gt;According to anonymous usage statistics, JuiceFS Community Edition now powers nearly 70,000 file systems managing over 1.4 EB of data, with deployment scale continuing to grow.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;count and total data volume&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS Community Edition file system count and total data volume&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Over the past year, AI applications have continued to expand from model training to inference services, agents, and multi-cloud scheduling, placing higher demands on data storage. These changes are also reflected in the use cases shared by community users, covering areas such as &lt;a href="https://en.wikipedia.org/wiki/Large_language_model"&gt;large language models&lt;/a&gt;, autonomous driving, quantitative investment, and computing platforms. We thank these users for sharing their real-world practices, providing valuable references for more teams building AI data infrastructure.&lt;br&gt;
New user stories:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI training and large language models&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/artificial-intelligence-model-training-unified-storage-solution"&gt;INTSIG Built Unified Storage Based on JuiceFS to Support Petabyte-Scale AI Training&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/artificial-intelligence-storage-large-language-model-multimodal"&gt;StepFun Built an Efficient and Cost-Effective LLM Storage Platform with JuiceFS&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/artificial-intelligence-big-data-cloud-native-storage"&gt;JuiceFS at Xiaomi: Unified Storage for AI, Big Data, and Cloud‑Native Workloads&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;AIGC&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/multi-cloud-storage-artificial-intelligence-training"&gt;Why Gaoding Technology Chose JuiceFS for AI Storage in a Multi-Cloud Architecture&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/aigc-storage-glusterfs-cephfs-vs-juicefs"&gt;From GlusterFS to JuiceFS: Lightillusions Achieved 2.5x Faster 3D AIGC Data Processing&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Autonomous driving and robotics&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/multi-cloud-storage-autonomous-driving"&gt;Zelos Tech Manages Hundreds of Millions of Files for Autonomous Driving with JuiceFS&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/multi-cloud-store-massive-small-files"&gt;How D-Robotics Manages Massive Small Files in a Multi-Cloud Environment with JuiceFS&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Inference and AI agents&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/ai-storage-model-distribution-cross-cloud-inference"&gt;How Gongjiyun Keeps Model Distribution Fast Enough for Cross-Cloud Elastic Inference&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/multi-cloud-storage-ai-agent"&gt;42x Faster Writes &amp;amp; 85% Throughput Gain: JuiceFS for Multi-Cloud AI Agents&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Quant investment&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/quantitative-storage-artificial-intelligence-solution"&gt;JuiceFS+MinIO: Ariste AI Achieved 3x Faster I/O and Cut Storage Costs by 40%+&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Big data&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://juicefs.com/en/blog/user-stories/juicefs-vs-alluxio-ai-storage-naver"&gt;NAVER, Korea's No.1 Search Engine, Chose JuiceFS over Alluxio for AI Storage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Development of JuiceFS 1.4 spanned nearly a year. During the release cycle, the community reported &lt;strong&gt;366 issues&lt;/strong&gt;, merged &lt;strong&gt;515 pull requests&lt;/strong&gt;, and welcomed contributions from &lt;strong&gt;59 contributors&lt;/strong&gt;. We sincerely thank everyone who reported issues, contributed code, improved documentation, and helped evolve JuiceFS for increasingly demanding production environments. Your participation drives the rapid growth of JuiceFS.&lt;/p&gt;
&lt;p&gt;Download and try JuiceFS 1.4 &lt;a href="https://github.com/juicedata/juicefs/releases/tag/v1.4.0"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Tue, 14 Jul 2026 08:42:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/release-notes/juicefs-1-4-tiered-storage-faster-metadata</guid></item><item><title>JuiceFS Sync for PB-Scale Data Transfers: Resumable Sync, Encryption, and Bandwidth Control</title><link>https://www.juicefs.com/en/blog/engineering/resumable-sync-encryption-bandwidth-control</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;In scenarios such as data migration, cross-cloud synchronization, and object storage backup, &lt;a href="https://juicefs.com/docs/community/guide/sync/"&gt;&lt;code&gt;juicefs sync&lt;/code&gt;&lt;/a&gt; is commonly used to transfer large volumes of data. When datasets grow to the TB- or PB-scale, with millions or even billions of objects, a single synchronization task may run for hours or even days.&lt;/p&gt;
&lt;p&gt;As these long-running jobs progress, several common challenges tend to emerge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After network interruptions, process crashes, or node restarts, tasks often struggle to resume from a consistent state and may need to rescan or reprocess data.  &lt;/li&gt;
&lt;li&gt;Backup workflows may expose plaintext data and face compliance or security requirements.  &lt;/li&gt;
&lt;li&gt;When multiple sync jobs run concurrently, bandwidth contention becomes significant, while the overall transfer process lacks effective global control.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To address these challenges, &lt;a href="https://github.com/juicedata/juicefs/releases/tag/v1.4.0"&gt;JuiceFS 1.4&lt;/a&gt; introduces three major enhancements to &lt;code&gt;sync&lt;/code&gt;: resumable sync, data encryption/decryption, and global traffic control.&lt;/p&gt;
&lt;p&gt;In this article, we’ll explain the use cases, implementation details, and configuration methods for each feature.&lt;/p&gt;
&lt;h2&gt;Resumable sync&lt;/h2&gt;
&lt;p&gt;In earlier versions, if a synchronization task failed or was interrupted, rerunning &lt;code&gt;juicefs sync&lt;/code&gt; required rescanning both the source and destination before determining which objects had already been synchronized and which still needed to be copied.&lt;/p&gt;
&lt;p&gt;For workloads involving hundreds of millions of objects or large files, the scan itself could incur substantial time and object-storage request costs.&lt;/p&gt;
&lt;p&gt;To address this issue, JuiceFS 1.4 introduces a &lt;a href="https://juicefs.com/docs/community/guide/sync/#checkpoint"&gt;&lt;strong&gt;resumable sync&lt;/strong&gt;&lt;/a&gt; mechanism for &lt;code&gt;sync&lt;/code&gt;. When enabled, synchronization progress is periodically saved to the destination. If the task is interrupted, rerunning the same command automatically locates and loads the matching checkpoint and resumes from the last unfinished position, avoiding a full restart.&lt;/p&gt;
&lt;h3&gt;How it works&lt;/h3&gt;
&lt;p&gt;When resumable sync is enabled, &lt;code&gt;sync&lt;/code&gt; stores a JSON state file on the destination side:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;.juicefs-sync-checkpoint.&amp;lt;hash&amp;gt;.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;hash&amp;gt;&lt;/code&gt; value is derived from the source, destination, and key synchronization parameters. This ensures that a task only loads checkpoints created for itself, preventing accidental reuse across different jobs.&lt;br&gt;
The workflow is shown below:&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Checkpoint 的流程&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Resumable sync workflow&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Checkpoint save, restore, and cleanup workflow in &lt;code&gt;juicefs sync&lt;/code&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When &lt;code&gt;sync&lt;/code&gt; starts, it first looks for a checkpoint matching the current task.  &lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If a matching checkpoint is found, execution resumes from the saved state. Otherwise, synchronization starts normally with a fresh scan. &lt;code&gt;sync&lt;/code&gt; traverses multiple prefixes concurrently, maintaining independent state for each prefix, including:  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether traversal is complete  &lt;/li&gt;
&lt;li&gt;The last scanned position  &lt;/li&gt;
&lt;li&gt;Pending objects to synchronize  &lt;/li&gt;
&lt;li&gt;Failed objects  &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When restoring from a checkpoint:  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pending and failed objects recorded in the checkpoint are re-added to the task queue.  &lt;/li&gt;
&lt;li&gt;Prefixes that were not fully traversed resume scanning from their saved positions.  &lt;/li&gt;
&lt;li&gt;Fully traversed prefixes only continue processing unfinished objects recorded in the checkpoint.  &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;During execution, progress is saved asynchronously at a configurable interval, which defaults to every &lt;strong&gt;10 seconds&lt;/strong&gt;.  &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After successful completion, the checkpoint file is automatically removed. If the task fails or is interrupted, the checkpoint is retained for resumption on the next execution of the same command.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;集群模式&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Checkpoint architecture in cluster mode&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;In cluster mode, only a single checkpoint exists and is maintained centrally by Manager.&lt;br&gt;
Workers do not directly read or write checkpoint files on the destination. Instead, they:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pull tasks from Manager  &lt;/li&gt;
&lt;li&gt;Execute synchronization  &lt;/li&gt;
&lt;li&gt;Report results back to Manager&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Manager aggregates completed objects, failed objects, statistics, and multipart-upload state into the global checkpoint.&lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# Enable resumable sync.
juicefs sync --enable-checkpoint SRC DST

# Customize checkpoint save interval (default: 10s).
juicefs sync --enable-checkpoint --checkpoint-interval 30s SRC DST

# Ignore existing checkpoints and restart from scratch.
juicefs sync --enable-checkpoint --checkpoint-force-reset SRC DST
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Data encryption and decryption&lt;/h2&gt;
&lt;p&gt;For cross-cloud backup and archival workflows, client-side encryption is often required to satisfy compliance requirements such as data sovereignty, encryption at rest, and secure migration of sensitive data.&lt;/p&gt;
&lt;p&gt;Previously, &lt;code&gt;juicefs sync&lt;/code&gt; did not provide built-in encryption capabilities. Users who wanted to write encrypted data to the destination typically had to use external tools for additional processing.&lt;/p&gt;
&lt;p&gt;In JuiceFS 1.4, &lt;a href="https://juicefs.com/docs/community/guide/sync/#encryption-and-decryption"&gt;streaming encryption and decryption&lt;/a&gt; are integrated directly into the synchronization pipeline, enabling three common workflows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Encrypt-on-write:&lt;/strong&gt; Encrypt plaintext data before writing it to the destination, suitable for encrypted backup and archiving.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decrypt-on-read:&lt;/strong&gt; Read encrypted data from the source and write decrypted data to the destination, suitable for data recovery or plaintext migration.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Re-encryption:&lt;/strong&gt; Decrypts source data with an old key and re-encrypts it with a new key before writing to the destination, suitable for key rotation or cryptographic algorithm migration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Chunk-based streaming encryption&lt;/h3&gt;
&lt;p&gt;To support object storage Range GET operations while avoiding excessive memory usage for large files all at once, &lt;code&gt;sync&lt;/code&gt; uses a fixed-size 1 MiB chunk-based streaming encryption scheme.&lt;/p&gt;
&lt;p&gt;A file is first divided into plaintext chunks:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;[chunk 1: 1 MiB][chunk 2: 1 MiB] ... [chunk N: ≤1 MiB]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Each plaintext chunk is encrypted independently.&lt;/p&gt;
&lt;p&gt;Each encrypted chunk consists of a 4-byte header and the ciphertext data, where the 4-byte header stores the actual ciphertext length (&lt;code&gt;ct_len&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;Each encrypted block: [4B ct_len][ciphertext + padding]&lt;/p&gt;
&lt;p&gt;Encrypted file: [encrypted chunk 1][encrypted chunk 2] ... [encrypted chunk N]&lt;/p&gt;
&lt;p&gt;The encrypted block size is determined by the plaintext chunk size plus encryption overhead: &lt;code&gt;plainChunkSize + overhead&lt;/code&gt;. The &lt;code&gt;plainChunkSize&lt;/code&gt; is fixed at 1 MiB, and the &lt;code&gt;overhead&lt;/code&gt; depends on the encryption algorithm and key type used.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;分块流式加密&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Chunk-based streaming encryption architecture in juicefs sync&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;This design allows random reads to retrieve only the required encrypted chunk rather than downloading the entire file. Because encrypted objects contain additional headers, padding, and encryption metadata, the destination object is typically larger than the original plaintext file.&lt;/p&gt;
&lt;h3&gt;Supported algorithms&lt;/h3&gt;
&lt;p&gt;The table below shows the supported algorithms:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Option&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Symmetric cipher&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Key encapsulation&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Typical use case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;aes256gcm-rsa (default)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;AES-256-GCM&lt;/td&gt;
&lt;td style="text-align: left;"&gt;RSA&lt;/td&gt;
&lt;td style="text-align: left;"&gt;General-purpose workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;chacha20-rsa&lt;/td&gt;
&lt;td style="text-align: left;"&gt;ChaCha20-Poly1305&lt;/td&gt;
&lt;td style="text-align: left;"&gt;RSA&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Environments without efficient AES hardware acceleration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;sm4gcm&lt;/td&gt;
&lt;td style="text-align: left;"&gt;SM4-GCM&lt;/td&gt;
&lt;td style="text-align: left;"&gt;SM2&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Scenarios requiring Chinese commercial cryptography standards&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;p&gt;The following examples use RSA keys.&lt;/p&gt;
&lt;p&gt;Generate a key pair:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# Generate an RSA private key (the public key is derived automatically).
openssl genrsa -out private.pem 2048

# Generate a password-protected private key.
openssl genrsa -aes256 -out private.pem 2048
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Scenario 1: Encrypt and write to destination&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;juicefs sync /local/data s3://mybucket/backup 
    --encrypt-rsa-key /path/to/private.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Scenario 2: Decrypt and read from source for data recovery or plaintext migration&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;juicefs sync s3://mybucket/backup /local/data 
    --decrypt-rsa-key /path/to/private.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Scenario 3: Re-encrypt for key rotation or algorithm migration&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# Decrypt data encrypted with the old key and re-encrypt with the new key to new storage.
juicefs sync s3://old-bucket/encrypted s3://new-bucket/re-encrypted 
    --decrypt-rsa-key /path/to/old-private.pem 
    --encrypt-rsa-key /path/to/new-private.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If the private key is password-protected, the password can be provided via environment variables:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# For encryption scenarios, use JFS_ENCRYPT_RSA_PASSPHRASE.
export JFS_ENCRYPT_RSA_PASSPHRASE=&amp;quot;your-passphrase&amp;quot;
juicefs sync /local/data s3://mybucket/backup --encrypt-rsa-key private.pem

# For decryption scenarios, use JFS_DECRYPT_RSA_PASSPHRASE.
export JFS_DECRYPT_RSA_PASSPHRASE=&amp;quot;your-passphrase&amp;quot;
juicefs sync s3://mybucket/backup /local/data --decrypt-rsa-key private.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Encrypted data is stored using a JuiceFS-specific format and can only be decrypted through &lt;code&gt;juicefs sync&lt;/code&gt; with the corresponding key.  &lt;/li&gt;
&lt;li&gt;Back up encryption keys carefully. Once a private key is lost, encrypted data cannot be recovered.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Global traffic control&lt;/h2&gt;
&lt;p&gt;In earlier versions, &lt;code&gt;juicefs sync&lt;/code&gt; already supported per-process rate limiting via &lt;a href="https://juicefs.com/docs/community/guide/sync/#global-traffic-control"&gt;&lt;code&gt;--bwlimit&lt;/code&gt;&lt;/a&gt;. However, when multiple sync processes run concurrently—such as multiple Workers in a distributed sync, or multiple independent sync tasks sharing the same egress link—per-process limiting cannot constrain total bandwidth usage. The egress link may still be saturated, affecting other application traffic.&lt;/p&gt;
&lt;p&gt;JuiceFS 1.4 introduces the &lt;code&gt;--traffic-control-url&lt;/code&gt; parameter. Multiple sync processes can connect to the same external traffic control service, which allocates bandwidth quotas uniformly, enabling cross-process, cross-task global rate limiting.&lt;/p&gt;
&lt;h3&gt;How it works&lt;/h3&gt;
&lt;p&gt;Global traffic control uses a &lt;strong&gt;token bucket model&lt;/strong&gt;. Before transmitting data, each sync process requests byte credits from the same traffic-control service.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;全局流量&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Global traffic-control workflow in juicefs sync&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Each process periodically requests a certain number of bytes (credit) before data transfer.&lt;/p&gt;
&lt;p&gt;The traffic-control service determines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How many bytes to grant  &lt;/li&gt;
&lt;li&gt;How long the granted quota remains valid&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When credits are exhausted, the process requests additional credits.&lt;/p&gt;
&lt;p&gt;If a quota is about to expire before being fully consumed, the unused portion is returned to the service in advance.&lt;/p&gt;
&lt;p&gt;The service exposes a simple HTTP API for granting and reclaiming quotas. This must be implemented by the user or integrated with an existing service:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;POST /traffic-control
Content-Type: application/json

Request:
{&amp;quot;bytes&amp;quot;: 1048576}
  bytes &amp;gt; 0: Request byte credits.
  bytes &amp;lt; 0: Return unused credits.


Response:
{&amp;quot;granted&amp;quot;: 524288, &amp;quot;expired&amp;quot;: 1000}
  granted: Number of bytes granted this time.
  expired: Credit validity period (milliseconds).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;During synchronization, &lt;code&gt;sync&lt;/code&gt; requests quotas from the traffic control service before transmitting data. If no credits are available, transmission blocks until new credits are obtained. In this way, multiple sync tasks can share a single global bandwidth limit, preventing the total traffic from becoming uncontrolled even when individual tasks have their own limits.&lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# Deploy a traffic-control service first.
# (Example: listen on port 8080 and cap total bandwidth at 100 Mbps)
# (Service implementation is user-defined; JuiceFS only calls the API)

# Multiple sync processes share the same control service.
juicefs sync SRC1 DST1 --traffic-control-url http://127.0.0.1:8080/traffic-control &amp;amp;
juicefs sync SRC2 DST2 --traffic-control-url http://127.0.0.1:8080/traffic-control &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;--traffic-control-url&lt;/code&gt; can be combined with &lt;code&gt;--bwlimit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The two mechanisms are independent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--bwlimit&lt;/code&gt; limits the bandwidth of a single sync process.  &lt;/li&gt;
&lt;li&gt;&lt;code&gt;--traffic-control-url&lt;/code&gt; limits aggregate bandwidth across multiple processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-shell"&gt;# Per-process limit: 50 Mbps. All processes combined respect the service-side cap.
juicefs sync SRC DST 
    --bwlimit 50 
    --traffic-control-url http://controller:8080/traffic-control
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;JuiceFS 1.4 enhancements to &lt;code&gt;sync&lt;/code&gt; include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Resumable sync&lt;/strong&gt; reduces recovery costs after task interruptions.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encryption and decryption&lt;/strong&gt; improve the security of backups and archival data.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global traffic control&lt;/strong&gt; enables multiple synchronization tasks to share bandwidth in a coordinated manner.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For scenarios such as data migration, cross-cloud sync, object storage backup, and encrypted archiving, users can combine these capabilities flexibly based on task scale, network environment, and security requirements.&lt;/p&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 08 Jul 2026 09:42:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/engineering/resumable-sync-encryption-bandwidth-control</guid></item><item><title>42x Faster Writes &amp; 85% Throughput Gain: JuiceFS for Multi-Cloud AI Agents</title><link>https://www.juicefs.com/en/blog/user-stories/multi-cloud-storage-ai-agent</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Xingchen Zhengtu Technology Co., Ltd. is a startup focused on AI search and multi‑modal artificial intelligence generated content (AIGC) applications for e‑commerce. Our products include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://gensmo.com"&gt;Gensmo&lt;/a&gt;, which focuses on fashion and provides virtual try‑on, style recommendations, and product search.  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://zooclaw.ai"&gt;ZooClaw&lt;/a&gt;, which offers AI agent services for a wider range of daily and work scenarios.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this article, we’ll share our thinking and experience in unified storage selection, architecture design, and performance tuning. We’ve been running JuiceFS in production for more than a year. It manages over 100 million files. Our application runs across Oracle Cloud, DigitalOcean, and Google Cloud Platform (GCP). JuiceFS has become the unified storage layer supporting model training, inference, data processing, and online agents.&lt;/p&gt;
&lt;h2&gt;Unified storage requirements and design approach&lt;/h2&gt;
&lt;h3&gt;Four scenarios, four I/O profiles&lt;/h3&gt;
&lt;p&gt;So far, we have four main storage scenarios that support Gensmo and ZooClaw.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Application-types-Xingchen-Zhengtu&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Application types at Xingchen Zhengtu Technology&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;strong&gt;Scenario 1: Model training&lt;/strong&gt;&lt;br&gt;
We build our own models, including &lt;a href="https://gensmo.com/"&gt;Gensmo's Try‑on model&lt;/a&gt; and video generation models. They show try‑on results, 360‑degree model actions, or special effects to B2B and B2C customers. Model training involves large‑file sequential writes and checkpoint saving. Storage requirements: high capacity and high‑performance sequential I/O.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 2: Model inference&lt;/strong&gt;&lt;br&gt;
Inference services primarily need high‑concurrency sequential reads. Data is loaded into local cache to increase hit rates.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 3: Data processing&lt;/strong&gt;&lt;br&gt;
We crawl product, clothing, and review data from overseas independent e‑commerce sites. This data is used for model training and application operations analysis. This scenario involves many small files (a few hundred kilobytes per image). High IOPS and concurrency are challenges.&lt;br&gt;
To optimize data processing, we use Ray Data to process datasets in parallel and consolidate large volumes of small files into reusable Parquet datasets ranging from tens to hundreds of gigabytes. These datasets serve as a shared data foundation that can be reused across downstream workloads such as embedding generation, retrieval, recommendation, training, and inference. This greatly reduces pressure on the file system and serves both training and inference needs.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 4: Online agents&lt;/strong&gt;&lt;br&gt;
Online &lt;a href="https://www.ibm.com/think/topics/ai-agents"&gt;agents&lt;/a&gt; are different from the offline scenarios above. There are still many small files, but these files are generated by online services. Each agent only reads and writes its own data. No cross‑agent distributed processing is required. The storage system must support high concurrency and fast response. It does not need cross‑agent data coordination.  &lt;/p&gt;
&lt;p&gt;In summary, these four scenarios have two types of storage requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Offline training, inference, and data processing need high throughput, high concurrency, and caching.  &lt;/li&gt;
&lt;li&gt;Online agents care more about low latency, data isolation, and stability.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After clarifying these application needs, a natural question arises: do we need a multi‑cloud architecture? From the very beginning of platform construction, our answer was yes.&lt;/p&gt;
&lt;h3&gt;Cloud neutrality is not a concept; it’s bargaining power&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;The goal of cloud neutrality is not technical purity. It’s to meet the core needs of the infrastructure team: keeping compute resources and workloads portable, and maintaining bargaining power with different cloud providers.&lt;/strong&gt;  &lt;/p&gt;
&lt;p&gt;For overseas business, if compute and storage are locked into a single cloud provider for a long time, the ability to flexibly adjust compute resources becomes limited as the application grows or prices change. This is especially true in AI, where GPU resource prices and availability fluctuate greatly. A resource that is cheap today may become expensive or scarce later. The compute scale needed after application growth may also exceed what the original cloud provider can offer.  &lt;/p&gt;
&lt;p&gt;Therefore, we want to decouple the storage layer from any specific cloud vendor. Data should stay cloud‑neutral. This way, training, inference, or online agent workloads can move to a cloud that better meets cost and performance requirements. There is no need to copy or reconfigure data repeatedly.&lt;/p&gt;
&lt;h3&gt;POSIX: The foundation of a unified storage experience&lt;/h3&gt;
&lt;p&gt;Another critical question in platform construction was: how do we give our engineering team a consistent operational experience across multiple clouds and multiple object storage backends?  &lt;/p&gt;
&lt;p&gt;For a single application scenario, using object storage directly is enough. But when training, inference, data processing, and online agents share the same data system, the development and operations cost of different object storage interfaces grows quickly. Therefore, we wanted a unified abstraction on top of the underlying storage. &lt;a href="https://en.wikipedia.org/wiki/POSIX#:~:text=The%20Portable%20Operating%20System%20Interface,maintaining%20compatibility%20between%20operating%20systems."&gt;&lt;strong&gt;POSIX&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;file system semantics are the best fit for this.&lt;/strong&gt;  &lt;/p&gt;
&lt;p&gt;With JuiceFS, we map underlying object storage (whether it’s GCS, S3, or R2) into a POSIX file system and mount it as a local path. From local development to production, the engineering team always sees the same file system interface and access path. They don't need to care about which cloud or which object storage holds the data.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In short, an ideal cloud storage experience lets engineers not feel the multi‑cloud environment at all. They always see a local path.&lt;/strong&gt; This was a major reason we later chose JuiceFS.&lt;/p&gt;
&lt;h2&gt;Selection: From GCS Fuse and S3 Fuse to JuiceFS&lt;/h2&gt;
&lt;p&gt;Because offline and online scenarios have very different needs, our storage selection took two different paths.&lt;/p&gt;
&lt;h3&gt;Offline: Choosing JuiceFS from the start&lt;/h3&gt;
&lt;p&gt;For offline scenarios, we faced a multi‑cloud environment and high-throughput requirements. Therefore, before building the system, our team evaluated mainstream solutions and compared them against our critical needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Self‑built parallel file systems:&lt;/strong&gt; Highest performance, but high cost, hardware‑locked, limited cross‑cloud capability.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud‑managed parallel file systems:&lt;/strong&gt; Convenient, but locks you into a single cloud, still expensive.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plain FUSE:&lt;/strong&gt; Low cost, but insufficient POSIX semantics and performance.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache orchestration layers:&lt;/strong&gt; Needs underlying storage and adds operational complexity.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Solution&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Cloud-neutral&lt;/th&gt;
&lt;th style="text-align: left;"&gt;POSIX semantics&lt;/th&gt;
&lt;th style="text-align: left;"&gt;High throughput&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Distributed cache&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Cost/Operations&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Self-built parallel file system (for example, Lustre)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;❌ Hardware-dependent&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Partial&lt;/td&gt;
&lt;td style="text-align: left;"&gt;High cost, operationally intensive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Cloud‑managed parallel file system (for example, Filestore)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;❌ Locked to a single cloud&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;High cost, lower operational overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Object storage + FUSE (S3FS / GCS Fuse)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;⚠️ Cloud-dependent&lt;/td&gt;
&lt;td style="text-align: left;"&gt;❌&lt;/td&gt;
&lt;td style="text-align: left;"&gt;❌&lt;/td&gt;
&lt;td style="text-align: left;"&gt;❌&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Low cost, lightweight operations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Cache orchestration layer (Alluxio/Fluid)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Requires an underlying storage layer, operationally complex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;JuiceFS&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅ Backend of your choice&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅ Full&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅&lt;/td&gt;
&lt;td style="text-align: left;"&gt;✅ Built-in&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Object storage cost with CSI integration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Compared with the alternatives, JuiceFS was the only solution that simultaneously met our core requirements: &lt;strong&gt;cloud neutrality, full POSIX compatibility, built-in distributed caching, and object storage as the backend&lt;/strong&gt;. Every other option fell short in at least one of these areas. As a result, for our offline workloads, choosing JuiceFS was a straightforward decision from the very beginning.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Agent: Migrating from GCS Fuse to JuiceFS&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Our early infrastructure was primarily deployed on Google Cloud, where Google Cloud Storage (GCS) was mounted into GKE Pods using GCS Fuse. In practice, however, we found that this architecture could not meet the reliability, performance, and cloud-neutrality requirements of our online agent workloads.&lt;/p&gt;
&lt;p&gt;The biggest problem was data loss under SIGKILL. GCS Fuse uses an asynchronous writeback mechanism. After an application's write call returns success, data may still sit in a local buffer and not be truly written to GCS. If a Pod is terminated by an OOM kill or a SIGKILL signal, data that appears to have been written successfully may be permanently lost. In an agent workload, this directly causes session data loss.  &lt;/p&gt;
&lt;p&gt;The second issue was inadequate small-file performance and incomplete POSIX semantics. An agent's working directory typically contains numerous small files with frequent append operations. GCS Fuse introduces high latency for operations such as &lt;code&gt;open&lt;/code&gt; and &lt;code&gt;stat&lt;/code&gt;, while providing incomplete support for POSIX features such as &lt;code&gt;rename&lt;/code&gt;, &lt;code&gt;flock&lt;/code&gt;, and &lt;code&gt;symlink&lt;/code&gt;. As a result, it falls short of the stability requirements for online services.  &lt;/p&gt;
&lt;p&gt;The third issue was cloud lock-in and limited stability under high concurrency. GCS Fuse is tightly coupled to the GCP ecosystem, making it incompatible with our cloud-neutral infrastructure strategy. In addition, its stability under highly concurrent agent workloads proved insufficient.&lt;/p&gt;
&lt;p&gt;These limitations ultimately led us to migrate our online agent workloads to JuiceFS.&lt;/p&gt;
&lt;p&gt;JuiceFS addresses the data loss problem through its write path and independent metadata engine. It &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;separates data from metadata&lt;/a&gt;: data chunks are first uploaded to object storage, and only after the corresponding metadata is atomically committed to the independent metadata engine is the write considered successful. In other words, a successful write truly means the data has been durably persisted, so a SIGKILL cannot cause the loss of already acknowledged data.&lt;/p&gt;
&lt;p&gt;More fundamentally, GCS Fuse exposes object storage through a file system interface, whereas JuiceFS builds a true file system on top of object storage. Its independent metadata engine, together with full POSIX compatibility, cloud neutrality, built-in distributed caching, and a mature ecosystem of tools, makes JuiceFS a much better fit for online agent workloads that demand reliability, consistency, and high-concurrency access.  &lt;/p&gt;
&lt;p&gt;Today, our online agent platform runs stably in production. JuiceFS has become the unified storage foundation for multiple workloads across the company.&lt;/p&gt;
&lt;h2&gt;A new architecture: Deploying JuiceFS across multiple clouds&lt;/h2&gt;
&lt;h3&gt;Offline workloads: Compute mobility across clouds with unified metadata + R2&lt;/h3&gt;
&lt;p&gt;To meet the requirements of cloud neutrality, compute mobility, and high throughput for offline workloads, we designed the following architecture:  &lt;/p&gt;
&lt;p&gt;We chose Cloudflare R2 as the underlying object storage backend. Because R2 is independent of any cloud provider and does not charge for egress traffic, it’s well suited for high-throughput training workloads spanning multiple clouds. By comparison, while services such as GCS and Amazon S3 offer low storage costs, their egress fees can be substantial, significantly increasing the cost of offline training. For example, storing 1 TB of data in GCS costs roughly $20 per month, while egress charges can range from $20 to $140.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Offline-storage-architecture&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Offline storage architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;On top of R2, we deployed &lt;a href="https://juicefs.com/docs/cloud/"&gt;JuiceFS Enterprise Edition&lt;/a&gt; to provide a unified file system across multiple clouds. Whether compute resources are running on Oracle Cloud or DigitalOcean, training, inference, and data processing jobs all access the same file system through a consistent namespace. This allows engineers to work without worrying about the underlying cloud infrastructure.&lt;/p&gt;
&lt;p&gt;Our compute layer consists of H100 GPUs on Oracle Cloud and H200 GPUs on DigitalOcean, running a unified training and inference platform based on Slurm and KubeRay. Each GPU node contributes its local NVMe SSD to JuiceFS' distributed cache, forming a shared cache pool across the cluster. Datasets are fetched from R2 on first access, while subsequent reads are served almost entirely from the distributed cache, effectively masking the latency of cross-cloud data access.&lt;/p&gt;
&lt;p&gt;The entire infrastructure is managed as code using Terraform. Networks, storage, training jobs, Ray clusters, and inference services can all be provisioned automatically. As long as a cloud provider supports Kubernetes, compute resources and workloads can be deployed seamlessly, enabling rapid cross-cloud scaling and flexible resource allocation.&lt;/p&gt;
&lt;h3&gt;Online workloads: Prioritizing low latency with in-cloud metadata&lt;/h3&gt;
&lt;p&gt;For online agent workloads, using ZooClaw as an example, our primary objective is to provide a unified storage foundation for a large number of agents while supporting centralized management, directory isolation, and usage-based billing. Unlike offline workloads, the online environment prioritizes low latency, efficient small-file writes, and high-concurrency access. &lt;a href="https://www.virtana.com/glossary/what-is-cross-cloud/"&gt;Cross-cloud&lt;/a&gt; storage paths inevitably introduce additional I/O latency, making them unsuitable for latency-sensitive online services. Therefore, we keep the object storage, metadata service, and application Pods within the same cloud whenever possible.&lt;/p&gt;
&lt;p&gt;Our current online deployment runs entirely on GCP. GCS serves as the object storage backend, while the metadata layer is provided by an independent three-node Raft cluster deployed within a private GCP VPC. This keeps object storage, metadata service, and application Pods within the same cloud. It reduces access latency and improves IOPS for small‑file write‑intensive scenarios.  &lt;/p&gt;
&lt;p&gt;On Kubernetes, we mount a single RWX PersistentVolumeClaim (PVC) through JuiceFS CSI. Each bot Pod accesses its own isolated directory through a dedicated &lt;code&gt;subPath&lt;/code&gt;, while access is restricted by environment-specific tokens, providing file system-level isolation. From each agent's perspective, it sees only its own local working directory. From the platform's perspective, however, all data resides in a single unified storage system, simplifying centralized management and billing.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Online-storage-architecture&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Online storage architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;If GCP resources or costs become unsuitable in the future, this architecture can still be migrated. We use Terraform and Kubernetes orchestration. We can spin up the same compute and storage structure on another cloud and then synchronize the metadata and data over. Online agent workloads can naturally be switched bot by bot, user by user, or tenant by tenant. There is no need for a one‑time full migration.&lt;/p&gt;
&lt;p&gt;Looking back at both deployment models, their objectives are fundamentally different. Offline workloads emphasize cross-cloud data sharing, compute mobility, and high throughput, while online agent workloads prioritize low latency and high concurrency, without sacrificing the flexibility to migrate when needed. Rather than adopting a one-size-fits-all backend, we tailored the JuiceFS deployment to the requirements of each workload. This approach preserves a unified data management model and developer experience while allowing each scenario to use the most appropriate metadata and object storage architecture.&lt;/p&gt;
&lt;h2&gt;Optimization practice: Distributed cache, writeback, and S3 Gateway&lt;/h2&gt;
&lt;p&gt;After establishing a unified storage architecture, we continued to optimize performance and fine-tune access strategies for different workloads.&lt;/p&gt;
&lt;h3&gt;One cache, two optimization strategies&lt;/h3&gt;
&lt;p&gt;Distributed caching is one of the most important capabilities of JuiceFS, directly affecting IOPS, throughput, and access latency. Although both our offline and online deployments rely on distributed caching, their goals and optimization strategies differ significantly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For offline workloads, the primary objective is to support high-throughput training and data processing while enabling cross-cloud data sharing and compute mobility&lt;/strong&gt;. To achieve this, we cache as much data from Cloudflare R2 as possible on local storage. Training, inference, and data processing jobs run on H100 and H200 GPU nodes equipped with NVMe SSDs. Each node contributes roughly 50 TB of local cache, allowing a cluster of more than a dozen nodes to provide several hundred terabytes of distributed cache capacity.  &lt;/p&gt;
&lt;p&gt;The first access to a dataset requires fetching data from R2, which is slow. Once the initial read completes, however, subsequent training, data processing, and inference workloads are served almost entirely from the distributed cache, delivering I/O performance close to that of local NVMe storage. Since offline workloads write large checkpoint and model weight files—often hundreds of gigabytes or even several terabytes in size—data integrity is critical. Therefore, we typically leave writeback disabled to ensure that writes are durably persisted before being acknowledged.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For online agent workloads, the priorities are low-latency, high-concurrency access to small files while maintaining data isolation for each agent.&lt;/strong&gt; Here, the cache is primarily used to accelerate small-file writes and access. Each agent Pod mounts the same RWX PVC and accesses its own isolated directory using a dedicated &lt;code&gt;subPath&lt;/code&gt;. The cache expiration time is set to 3,600 seconds to maximize cache hits for frequently accessed files.&lt;br&gt;
Because each agent typically accesses only its own directory, the cache strategy does not require strong cross‑agent consistency. Data is only eventually consistent with object storage during necessary offline analysis or operations debugging.  &lt;/p&gt;
&lt;p&gt;In online scenarios, to further improve small file write and high concurrency performance, we can use writeback together with caching. Writeback trades a controlled amount of data safety risk for higher write throughput. This means that for multiple agents running on the same node, if one agent fails during writing, only that single agent's output, such as a presentation, an image, or a temporary document, is affected. That data can be regenerated. With writeback, online agents get a significant performance boost for high‑concurrency small file writes, while the overall system remains stable and data isolation is preserved.&lt;/p&gt;
&lt;h3&gt;One copy of data, multiple interfaces&lt;/h3&gt;
&lt;p&gt;In our architecture, &lt;a href="https://juicefs.com/docs/community/guide/gateway/"&gt;JuiceFS S3 Gateway&lt;/a&gt; serves as the data distribution layer, exposing data stored in JuiceFS through a standard S3-compatible interface.&lt;/p&gt;
&lt;p&gt;In agent workloads, whether the data consists of configuration files or generated artifacts such as presentations, images, or videos, everything is ultimately stored in the same JuiceFS file system. However, these files often need to be shared with external users through URLs, making POSIX mounts unsuitable for external access.&lt;/p&gt;
&lt;p&gt;To address this, we expose the same data directly through JuiceFS S3 Gateway. Internal services continue to access files through the POSIX interface, while external applications retrieve exactly the same data through standard S3 or HTTP APIs, eliminating the need for duplicate copies.&lt;/p&gt;
&lt;p&gt;To further improve security and performance, we place Cloudflare Workers and a CDN in front of the S3 Gateway. Incoming requests first pass through a worker for path validation and access control before being forwarded to the gateway. CDN edge caching and ETag validation further reduce origin fetches.&lt;/p&gt;
&lt;p&gt;This design provides two major benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple layers of isolation ensure data security, including JuiceFS directory isolation, S3 Gateway access controls, and code-level validation implemented in Cloudflare workers.  &lt;/li&gt;
&lt;li&gt;CDN caching reduces cross-region access latency and significantly improves download performance for large files such as videos and images. For users around the world, this means that even when the data resides in a GCP region in the eastern United States, content can still be served efficiently from the nearest CDN edge location.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From an architectural perspective, internal training, inference, and agent services access data through the POSIX file system, while external distribution is handled through the S3 Gateway. A single copy of the data can support multiple access methods without any additional replication.&lt;/p&gt;
&lt;h2&gt;Performance results&lt;/h2&gt;
&lt;h3&gt;Offline workloads: ~4× higher sequential write throughput, 7–8 GB/s cached read performance&lt;/h3&gt;
&lt;p&gt;For our offline workloads, we conducted benchmark tests on sequential read and write performance. The results before and after optimization are summarized below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;sequential writes&lt;/strong&gt;, a single process achieved approximately 700 MB/s when writing model outputs or checkpoints. By leveraging parallel writes across multiple processes and multiple nodes, throughput exceeded 1 GB/s, providing sufficient performance for large-scale training workloads.  &lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;sequential reads&lt;/strong&gt;, after aggregating numerous small files into larger files during data processing and loading them into the distributed cache, cached sequential read throughput reached &lt;strong&gt;6.7–7.8 GB/s&lt;/strong&gt;, approaching the performance of local NVMe storage. Inference workloads can also load checkpoints directly from the local cache, eliminating the need to copy data across nodes.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Benchmark (JuiceFS on R2, offline)&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Baseline&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Optimized (distributed cache + tuning)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Sequential writes (large blocks)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;~231 MB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;~714 MB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Sequential writes (20–50 GB datasets)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;~256–265 MB/s&lt;/td&gt;
&lt;td style="text-align: left;"&gt;840 MB/s–1.1 GB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Sequential reads (cache hit)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;—&lt;/td&gt;
&lt;td style="text-align: left;"&gt;6.7–7.8 GB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Sequential reads (cold read from R2)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;—&lt;/td&gt;
&lt;td style="text-align: left;"&gt;~427 MB/s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Beyond performance improvements, distributed caching also streamlined our engineering workflows. Training, inference, and data processing all share the same file path, eliminating the need to copy checkpoints between nodes or services. Newly generated model weights can be loaded directly by inference services, reducing data movement while shortening the path from model training to deployment.&lt;/p&gt;
&lt;h3&gt;Online workloads: ~42× faster small-file writes and ~85% higher large-file throughput&lt;/h3&gt;
&lt;p&gt;Our initial deployment placed the metadata service on OCI while using Cloudflare R2 as the object storage backend. Since the online services ran on GCP, every metadata request had to traverse the public Internet, resulting in a metadata round-trip time (RTT) of approximately &lt;strong&gt;12.7 ms&lt;/strong&gt;. Small-file throughput was limited to around &lt;strong&gt;24 files/s&lt;/strong&gt;, and occasional &lt;strong&gt;30-second PUT timeouts&lt;/strong&gt; from R2 could even affect bot stability.&lt;/p&gt;
&lt;p&gt;We introduced two major optimizations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We enabled &lt;strong&gt;writeback&lt;/strong&gt; and tuned the cache TTL, improving large-file write throughput by approximately &lt;strong&gt;85%&lt;/strong&gt;.  &lt;/li&gt;
&lt;li&gt;We migrated both the metadata service and object storage into GCP. The metadata layer now runs as a three-node Raft cluster within a private VPC, while the object storage backend was migrated to GCS and paired with local NVMe caching.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After these optimizations, metadata RTT dropped to approximately &lt;strong&gt;5.8 ms&lt;/strong&gt;, while small-file throughput increased to around &lt;strong&gt;1,000 files/s&lt;/strong&gt;, representing an overall performance improvement of roughly &lt;strong&gt;42×&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;After more than a year of production use, JuiceFS has become the core storage layer of Xingchen Zhengtu Technology's infrastructure. Today, it reliably supports more than &lt;strong&gt;100 million files&lt;/strong&gt; across &lt;strong&gt;three cloud providers&lt;/strong&gt; and multiple application scenarios. More importantly, it has unified the storage architecture for training, inference, data processing, and online agent workloads.&lt;/p&gt;
&lt;p&gt;For a startup serving a global market, infrastructure must be both flexible and easy to operate so that engineering efforts can remain focused on product innovation. Our unified storage platform provides a consistent interface for applications and developers, while allowing the underlying infrastructure to be optimized for different workloads. Offline workloads prioritize compute mobility and cost optimization, whereas online workloads focus on low latency and high concurrency while retaining the flexibility to migrate when necessary.&lt;/p&gt;
&lt;p&gt;This design keeps a consistent upper‑layer experience, while making compute cost negotiable and resources portable. It sets a solid foundation for future expansion to more clouds and regions.&lt;br&gt;
If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 01 Jul 2026 09:59:51 +0000</pubDate><guid>https://www.juicefs.com/en/blog/user-stories/multi-cloud-storage-ai-agent</guid></item><item><title>Monitoring JuiceFS with Better Stack</title><link>https://www.juicefs.com/en/blog/usage-tips/monitor-juicefs-better-stack</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;After deployment, &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;JuiceFS&lt;/a&gt; feels like a local drive, but underneath it's a sophisticated distributed system. This perfectly reflects one of its core design principles: distributed systems are complex, but from a user's perspective, they should be simple to use.&lt;/p&gt;
&lt;p&gt;Even so, that simplicity on the surface doesn't negate the need for deep visibility. For any critical storage system, gaining real-time visibility into its operations is crucial to prevent subtle performance degradations from escalating into significant incidents.&lt;/p&gt;
&lt;p&gt;Fortunately, JuiceFS exposes a suite of monitoring metrics, including throughput, IOPS, latency, data size, and many more, in the widely adopted Prometheus format, making it ready for modern monitoring stacks. Traditionally, you would probably pair Prometheus with Grafana to collect these metrics and visualize them. This is indeed a powerful combination. However, deploying, managing, and maintaining these systems yourself adds operational overhead again. Ironically, you may want to monitor them too, and trust me, you would rather not create yet another monitoring stack just to monitor your Prometheus and Grafana combo.&lt;/p&gt;
&lt;p&gt;That's where &lt;a href="https://betterstack.com/"&gt;Better Stack&lt;/a&gt; comes in. It is a fully managed SaaS observability platform that combines user-friendly dashboards, tracing, logging, error tracking, incident management, automatic alerting, and even &lt;strong&gt;AI-powered SRE&lt;/strong&gt;, all for a predictable, cost-effective price. With Better Stack, you get the power of the best-in-class tools out of the box without the operational overhead.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Better Stack&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Better Stack&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;In this post, we'll guide you through setting up a comprehensive monitoring system for JuiceFS using Better Stack, from metric ingestion to intelligent alerting, so you can ensure your file system remains healthy and performant.&lt;/p&gt;
&lt;h2&gt;Preparing the JuiceFS file system&lt;/h2&gt;
&lt;p&gt;Before diving into setting up Better Stack for monitoring, you'll need an existing JuiceFS file system that is actively publishing metrics. &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;JuiceFS Community Edition&lt;/a&gt; and &lt;a href="https://juicefs.com/docs/cloud/"&gt;JuiceFS Enterprise Edition&lt;/a&gt; (our cloud service is based on JuiceFS Enterprise Edition) both expose real-time status metrics in Prometheus format, but they do it in slightly different ways.&lt;/p&gt;
&lt;p&gt;For the JuiceFS Community Edition, after mounting the file system, JuiceFS automatically exposes metrics via &lt;code&gt;http://localhost:9567/metrics&lt;/code&gt; by default on the mounting host where the JuiceFS client is running. You can customize this port using the &lt;code&gt;--metrics&lt;/code&gt; option if needed.&lt;/p&gt;
&lt;p&gt;On the other hand, for JuiceFS Enterprise Edition &amp;amp; Cloud Service, metrics are exposed through the console via dedicated API endpoints. You'll need to replace &lt;code&gt;VOLUME_NAME&lt;/code&gt; with your file system name and &lt;code&gt;API_TOKEN&lt;/code&gt; with your API token. In this case, both Prometheus and JSON formats are available for metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Prometheus: &lt;code&gt;https://juicefs.com/api/vol/VOLUME_NAME/metrics?token=API_TOKEN&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;JSON: &lt;code&gt;https://juicefs.com/api/volume/VOLUME_NAME/status?token=YOUR_TOKEN&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A quick but important note: &lt;strong&gt;metrics are only generated when the file system is mounted&lt;/strong&gt;. So before proceeding, ensure your JuiceFS file system is properly mounted and accessible. In this guide, we will use the JuiceFS Cloud Service, as it's the simplest to get started. If you haven't set up JuiceFS yet, please refer to the &lt;a href="https://juicefs.com/docs/cloud/getting_started"&gt;documentation&lt;/a&gt; for detailed instructions. Once you have created the first file system, URLs for the metrics mentioned above would be available under its &lt;strong&gt;Monitor&lt;/strong&gt; tab.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS file system metrics APIs&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS file system metrics APIs in the Monitor tab&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h2&gt;Setting up a metrics source in Better Stack&lt;/h2&gt;
&lt;p&gt;With your JuiceFS file system up and running (don't forget to mount the file system to a host machine) and publishing metrics, the next step is to configure Better Stack to start ingesting that data.&lt;/p&gt;
&lt;p&gt;First, if you haven't already, register for a Better Stack account. The process is seamless. Using a work email is recommended, and the platform provides clear guidance to help you set up your account and organization.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Logging into Better Stack&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Logging into Better Stack&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Once you're logged in, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In the left-hand navigation panel, head to &lt;strong&gt;Telemetry&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Under the &lt;strong&gt;Sources&lt;/strong&gt; section, click &lt;strong&gt;Connect source&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Give your telemetry data source a descriptive name, such as "jfs-better-stack" or "juicefs-production", to easily identify it later.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Configuring telemetry data source Configuring telemetry data source&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Configuring telemetry data source&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Now, you'll configure how Better Stack should collect your metrics. In the collector settings:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Under &lt;strong&gt;Metrics&lt;/strong&gt;, choose the &lt;strong&gt;Prometheus scrape&lt;/strong&gt; option and click &lt;strong&gt;Connect source&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;strong&gt;URLs to scrape&lt;/strong&gt; section, input the JuiceFS metrics endpoint as described above.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Configuring URLs to scrape&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Configuring URLs to scrape&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Note that if you are not using the JuiceFS Cloud Service and your JuiceFS endpoint is behind a firewall, you'll need to allow traffic from Better Stack's scrape servers. The list of IP addresses to add to the allowlist is available in their documentation and from &lt;a href="https://telemetry.betterstack.com/prometheus-scrape-ips.txt"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After saving the configuration, Better Stack will begin scraping the endpoint. Your JuiceFS metrics should be received within a few seconds.&lt;/p&gt;
&lt;h2&gt;Creating a dashboard with AI SRE&lt;/h2&gt;
&lt;p&gt;With your JuiceFS metrics flowing into Better Stack, it's time to visualize them. You could build a dashboard manually, but Better Stack provides a smarter and more efficient way to do it by using &lt;strong&gt;AI SRE&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;What is AI SRE?&lt;/h3&gt;
&lt;p&gt;AI SRE (Site Reliability Engineering) is Better Stack's chat-based site reliability assistant. It's an autonomous AI agent that can read your telemetry data, analyze incidents, build dashboards, and even write code to fix errors. Instead of waiting for humans to manually set up charts and queries, AI SRE can generate comprehensive dashboards for you based on a prompt.&lt;/p&gt;
&lt;p&gt;It's notable that AI SRE is a paid feature. If you're on the free plan, you can still create dashboards manually using the drag-and-drop chart builder.&lt;/p&gt;
&lt;h3&gt;Creating a JuiceFS monitoring dashboard with a single prompt&lt;/h3&gt;
&lt;p&gt;Once your metrics source is ready, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;From the left panel, head to &lt;strong&gt;Telemetry&lt;/strong&gt; and then &lt;strong&gt;Metrics&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Create dashboard&lt;/strong&gt; and select the &lt;strong&gt;Create with AI&lt;/strong&gt; option.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the prompt field, give AI SRE a clear description of what you need. For example: "Create me a dashboard to track ALL JuiceFS metrics, such as latency, data size, etc."&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Also make sure to select the metrics &lt;strong&gt;Source&lt;/strong&gt; you created earlier (for example, "jfs-better-stack") so that AI SRE has the proper context and data to work with.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Creating a dashboard with AI SRE&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Creating a dashboard with AI SRE&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Give the platform a few minutes for the dashboard to be created. AI SRE will analyze your JuiceFS metrics and automatically generate a complete set of charts and panels for the important performance indicators such as throughput, IOPS, latency, and storage utilization. For my first time trying this, it just worked like a charm as shown below.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;AI SRE&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Charts and panels generated by AI SRE&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;AI SRE is a powerful feature that does so much more than create dashboards. It can analyze incidents, perform root cause analysis, suggest fixes, and even open pull requests. We've only scratched the surface in this post. This is your first step toward a smarter, AI-assisted observability workflow. After building your dashboard, you can further customize it by adding panels, editing queries, or setting alerts directly from the graphs.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this post, we have walked through how to build a complete observability system for JuiceFS with Better Stack. We started by setting up the JuiceFS file system and getting its Prometheus-formatted metrics, then created a metrics source in Better Stack to ingest the data. We examined rapid creation of a full dashboard with AI SRE.&lt;/p&gt;
&lt;p&gt;We hope this guide helps you gain better visibility into your JuiceFS deployment. If you have any questions or run into issues, we'd love to hear from you. Join the JuiceFS community on &lt;a href="https://github.com/juicedata/juicefs"&gt;GitHub&lt;/a&gt; or &lt;a href="http://go.juicefs.com/discord"&gt;Discord&lt;/a&gt;. And don't forget to check out Better Stack's &lt;a href="https://betterstack.com/docs/getting-started/welcome/"&gt;documentation&lt;/a&gt; and their &lt;a href="https://www.youtube.com/@betterstack"&gt;amazing YouTube channel&lt;/a&gt; for practical insights about distributed file storage, observability, AI, and more.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-HTML block-HTML"&gt;&amp;lt;iframe width=&amp;quot;560&amp;quot; height=&amp;quot;315&amp;quot; src=&amp;quot;https://www.youtube.com/embed/ZoBEQWxosGg?si=lLE0N5zw4-9T2sC9&amp;quot; title=&amp;quot;YouTube video player&amp;quot; frameborder=&amp;quot;0&amp;quot; allow=&amp;quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&amp;quot; referrerpolicy=&amp;quot;strict-origin-when-cross-origin&amp;quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/div&gt;</description><pubDate>Thu, 25 Jun 2026 06:57:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/usage-tips/monitor-juicefs-better-stack</guid></item><item><title>JuiceFS 1.4: Faster Metadata Operations with Batch Unlink, Batch Clone, and Redis Client-Side Caching</title><link>https://www.juicefs.com/en/blog/engineering/improve-metadata-operation-performance</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;In large-scale file access scenarios such as AI training and dataset management, metadata often becomes the first performance bottleneck as file counts and concurrency grow. Whether you're deleting millions of small files, cloning large datasets, or traversing directories under heavy concurrency, metadata performance directly impacts application efficiency.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://juicefs.com/docs/community/introduction"&gt;JuiceFS Community Edition&lt;/a&gt; 1.4 introduces three major metadata optimizations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Batch unlink&lt;/strong&gt; for large-scale file deletion  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Batch clone&lt;/strong&gt; for metadata cloning  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redis client-side caching&lt;/strong&gt; for hot metadata reads&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These improvements reduce transaction commits, network round trips, and redundant metadata lookups. In tests on a flat directory containing 100,000 files, batch unlink improved performance by up to &lt;strong&gt;93×&lt;/strong&gt;, while batch clone achieved up to &lt;strong&gt;24×&lt;/strong&gt; speedup.&lt;/p&gt;
&lt;p&gt;In this article, we’ll explain the motivation, design, and performance benefits behind these optimizations.&lt;/p&gt;
&lt;h2&gt;Deletion: From one‑by‑one to batched transactions&lt;/h2&gt;
&lt;p&gt;Under &lt;a href="https://juicefs.com/docs/community/architecture"&gt;JuiceFS' metadata-data separation architecture&lt;/a&gt;, deleting a file involves much more than removing a directory entry. The system must also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update inode reference counts  &lt;/li&gt;
&lt;li&gt;Reclaim inode and space resources  &lt;/li&gt;
&lt;li&gt;Process trash entries  &lt;/li&gt;
&lt;li&gt;Update quota statistics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These operations must typically be completed within the same transaction.&lt;/p&gt;
&lt;p&gt;When a directory contains hundreds of thousands or even millions of files, the traditional file-by-file deletion approach used by &lt;code&gt;rm -rf&lt;/code&gt; quickly becomes a bottleneck. Each &lt;code&gt;unlink&lt;/code&gt; request goes through the &lt;a href="https://www.kernel.org/doc/html/next/filesystems/fuse.html"&gt;FUSE protocol&lt;/a&gt;, switches between kernel and user space, and triggers a separate metadata transaction.&lt;/p&gt;
&lt;p&gt;As the number of files grows, the overhead from system calls, context switches, network round trips, and transaction commits accumulates rapidly.&lt;/p&gt;
&lt;p&gt;To mitigate this issue, JuiceFS previously introduced the &lt;code&gt;juicefs rmr&lt;/code&gt; command. Unlike &lt;code&gt;rm -rf&lt;/code&gt;, &lt;code&gt;rmr&lt;/code&gt; bypasses the FUSE layer and sends deletion requests directly to the client. It also supports multi-threaded deletion (50 threads by default), significantly improving throughput.&lt;/p&gt;
&lt;p&gt;However, each file deletion still requires its own metadata transaction. Deleting 100,000 files still means executing 100,000 transactions.&lt;/p&gt;
&lt;p&gt;Batch unlink takes optimization one step further by merging many independent deletion operations within the same directory into a single batch transaction, further removing network overhead.&lt;/p&gt;
&lt;h3&gt;Core design&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;The key is to turn many small transactions into fewer large ones. JuiceFS adds a batch unlink interface at the metadata engine layer. It allows the client to delete multiple non‑directory files under the same directory in one call.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When recursively clearing a directory, JuiceFS reduces deletion overhead in two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Different subdirectories are handled concurrently with multi‑threaded deletion.  &lt;/li&gt;
&lt;li&gt;Inside each directory, normal files and symlinks are grouped into batches and sent to &lt;code&gt;BatchUnlink&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This merges many unlink operations into fewer batch transactions at the metadata level.&lt;br&gt;
It's important to note that &lt;code&gt;BatchUnlink&lt;/code&gt; does not directly delete directories. Directory removal still follows the standard recursive workflow: empty the subdirectory first, and then delete the subdirectory itself.  Therefore, &lt;code&gt;BatchUnlink&lt;/code&gt; only applies to regular files and symbolic links within the same directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This restriction preserves correct recursive deletion semantics while avoiding consistency risks to the directory tree structure.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS delete operations&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Optimization path of JuiceFS delete operations&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h3&gt;Implementation across metadata engines&lt;/h3&gt;
&lt;p&gt;JuiceFS uses different batching strategies depending on the &lt;a href="https://juicefs.com/docs/community/databases_for_metadata/"&gt;metadata backend&lt;/a&gt; to minimize transaction commits and network round trips.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQL backends (MySQL, PostgreSQL, etc.):&lt;/strong&gt; Previously, each file deletion required its own sequence of &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, and &lt;code&gt;UPDATE&lt;/code&gt; statements. With &lt;code&gt;BatchUnlink&lt;/code&gt;, the system:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fetches all edge records for the target entries in a single batch query.  &lt;/li&gt;
&lt;li&gt;Retrieves the relevant inode attributes in a single locked batch query.  &lt;/li&gt;
&lt;li&gt;Executes edge deletions, inode state updates (decrementing nlink or marking for cleanup), and delfile entry insertions — all within one transaction.  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Instead of executing one transaction per file, the entire batch can now be completed in a single transaction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Redis backend:&lt;/strong&gt; &lt;strong&gt;The optimization uses Redis pipelines and transactions.&lt;/strong&gt; Where individual deletions previously required separate command round trips, &lt;code&gt;BatchUnlink&lt;/code&gt; collects all &lt;code&gt;HDEL&lt;/code&gt; (dentry removal), &lt;code&gt;ZADD&lt;/code&gt; (enqueue for cleanup), &lt;code&gt;SET&lt;/code&gt; (inode attribute update), and &lt;code&gt;INCRBY&lt;/code&gt; (counter update) commands for multiple files into a single pipeline, executed atomically within one &lt;code&gt;MULTI&lt;/code&gt;/&lt;code&gt;EXEC&lt;/code&gt; transaction. To avoid blocking Redis' single-threaded event loop for too long, batch size is capped at 250 entries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TiKV backend:&lt;/strong&gt; &lt;code&gt;BatchUnlink&lt;/code&gt; consolidates multiple deletions into a single transaction, using TiKV's batch write capability to reduce network round trips and transaction overhead. &lt;strong&gt;For distributed key-value backends, this kind of batching allows the backend's concurrent write capacity to be more fully utilized.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The figure below shows benchmark results on a flat directory of 100,000 files using &lt;code&gt;juicefs rmr --threads 16&lt;/code&gt;. &lt;code&gt;BatchUnlink&lt;/code&gt; delivers meaningful improvements across all metadata backends, with TiKV and Redis showing the largest gains.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;deletion&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Throughput improvement for batch deletion across metadata backends&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h2&gt;Clone: From one‑by‑one copy to batched references&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://juicefs.com/docs/community/guide/clone/"&gt;&lt;code&gt;juicefs clone&lt;/code&gt;&lt;/a&gt; creates fast copies of files or directories for training dataset version management, experiment snapshots, and large-scale directory duplication. Its efficiency comes from the fact that cloning doesn't immediately copy the underlying data blocks. Instead, it creates new file records at the metadata layer and reuses the source file's existing block references. New data blocks are only allocated when the clone is actually written to. This avoids the time and storage overhead of a full copy.&lt;/p&gt;
&lt;p&gt;For large directory clones, the same problem as deletion arises: processing files one by one generates a large number of short transactions and network round trips. &lt;strong&gt;The core idea behind batch clone is to merge the clone operations for multiple files in the same directory into a single batch transaction.&lt;/strong&gt; When recursively cloning a directory, the system reads directory entries in batches as a stream. For each batch, all non-directory entries are collected and cloned together in one operation.&lt;/p&gt;
&lt;p&gt;One key implementation detail is &lt;strong&gt;inode pre-allocation&lt;/strong&gt;: before entering the transaction, the system uses &lt;code&gt;nextInode&lt;/code&gt; to pre-allocate target inodes for all entries to be cloned. This avoids lock contention from repeatedly requesting inodes inside the transaction. Once inside the transaction, the system batch-queries all source file attributes (with row locks), builds all the insertion data for target nodes, edges, chunks, symlinks, and xattrs, and then inserts everything in a single batch.&lt;/p&gt;
&lt;p&gt;Batch clone uses each backend's native batch write capabilities in a similar way to batch unlink. The per-backend implementation details won't be repeated here.&lt;/p&gt;
&lt;p&gt;The performance gains vary across backends depending on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Transaction models  &lt;/li&gt;
&lt;li&gt;Network communication overhead  &lt;/li&gt;
&lt;li&gt;Batch insertion efficiency for metadata records such as nodes, edges, and chunk references&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Results on a flat directory of 100,000 files are shown below. MySQL sees the largest improvement at approximately 24x; Redis at approximately 5x; TiKV at approximately 2x.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;clone&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Throughput improvement for batch clone across metadata backends&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h2&gt;Redis client-side caching: Keeping hot metadata local&lt;/h2&gt;
&lt;p&gt;In high-concurrency metadata workloads such as AI training dataset access and large-scale container startup, network round trips between JuiceFS clients and Redis often become a major performance bottleneck.&lt;/p&gt;
&lt;p&gt;Consider the following operation:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-bash"&gt;open(&amp;quot;/mnt/jfs/dataset/images/cat.jpg&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Before the file can be opened, the Linux Virtual File System (VFS) must resolve every component in the path:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Look up &lt;code&gt;dataset&lt;/code&gt;.  &lt;/li&gt;
&lt;li&gt;Look up &lt;code&gt;images&lt;/code&gt;.  &lt;/li&gt;
&lt;li&gt;Look up &lt;code&gt;cat.jpg&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;VFS&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;VFS path resolution&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;If the &lt;code&gt;images&lt;/code&gt; directory contains hundreds of thousands of files and training jobs perform random access across the dataset, each lookup requires a &lt;code&gt;GET&lt;/code&gt; request to Redis.&lt;br&gt;
Under heavy concurrency, this results in large numbers of network round trips and increased Redis CPU utilization. &lt;strong&gt;Even though a single Redis query takes only a few dozen microseconds, network latency pushes each lookup to hundreds of microseconds or even milliseconds. When thousands of training processes are accessing files simultaneously, this overhead becomes significant.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;How it works: Redis 6.0 client-side caching&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://redis.io/docs/latest/develop/reference/client-side-caching/"&gt;Redis 6.0 introduced &lt;strong&gt;client-side caching&lt;/strong&gt;&lt;/a&gt;, which allows clients to cache hot keys locally and receive invalidation notifications whenever those keys are modified.&lt;/p&gt;
&lt;p&gt;Based on this capability, JuiceFS caches two categories of metadata in client memory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Inode attribute cache.&lt;/strong&gt; Keyed by inode number, this stores the complete attribute data for a file, such as type, size, permissions, and timestamps. The caching is implemented transparently through hook mechanisms in the Redis driver layer. On query, it first checks the local cache; on hit, it returns immediately without any network request. On modification, it automatically invalidates the corresponding cache. Application logic requires no awareness of the cache.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Directory entry cache.&lt;/strong&gt; Keyed by "parent inode + path separator + filename," this caches the results of directory lookups. Unlike the inode attribute cache, the lookup logic for entry cache is embedded directly in the directory lookup path rather than being intercepted transparently at the driver layer. When entries for a directory are invalidated, all related cache entries under that directory are cleared using prefix matching. This allows path resolution and repeated access to hot entries in the same directory to be served from local memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Introducing client-side caching creates a consistency challenge in multi-mount scenarios.&lt;/strong&gt; When multiple clients share the same JuiceFS file system, an operation on one client — creating, deleting, renaming, or updating attributes of a file or directory — can invalidate cached inode attributes or directory entries on other clients. Without an effective invalidation mechanism, subsequent reads could hit stale metadata, causing the directory entries or file attributes seen by one client to diverge from the actual state in the backend.&lt;/p&gt;
&lt;p&gt;To address this, JuiceFS introduces a &lt;a href="https://redis.io/docs/latest/commands/client-tracking/"&gt;&lt;strong&gt;Tracking and Broadcast Invalidation&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;(BCAST)&lt;/strong&gt; model on top of Redis' client-side caching mechanism. After connecting to Redis, each client declares the metadata key prefixes it wants to track. When those keys are modified, Redis sends invalidation notifications to the relevant clients. On receiving a notification, the client clears the corresponding inode attribute cache or entry cache entries, so that subsequent accesses fetch fresh data from the metadata engine.&lt;/p&gt;
&lt;p&gt;In addition, at client initialization, JuiceFS warms up metadata for the root directory of the mount point. Since these files are typically the most frequently accessed, benchmarks show this warm-up significantly improves overall access performance.&lt;/p&gt;
&lt;p&gt;Through this mechanism, hot metadata can be reused locally. When the metadata changes, the related caches are evicted in time, reducing the risk of stale metadata.&lt;/p&gt;
&lt;h3&gt;When to use it&lt;/h3&gt;
&lt;p&gt;Redis client‑side caching works best in read‑heavy, write‑light scenarios with repeated access to hot metadata. AI training dataset loading is a good example: the dataset is usually read‑only during training, and tasks repeatedly access the same directories and files, so inode attribute cache and entry cache hit often, reducing redundant lookups and remote metadata queries.&lt;/p&gt;
&lt;p&gt;The benefit is even more obvious when there is higher network latency between the client and the Redis metadata engine, such as in cross-availability-zone deployments.&lt;/p&gt;
&lt;p&gt;Redis 6.0 or later is required to use this feature. The default cache expiration time is 1 minute, which provides a safety net in case of network interruptions or connection anomalies where invalidation notifications may not arrive, preventing stale entries from persisting indefinitely. For workloads with stricter consistency requirements, the expiration time can be shortened or client-side caching can be disabled entirely to reduce the risk of reading stale metadata.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;These three optimizations each target a different path through the metadata layer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Batch unlink&lt;/strong&gt; merges multiple independent unlink operations within the same directory into a single batch transaction.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Batch clone&lt;/strong&gt; merges multiple independent clone operations within the same directory into a single batch transaction.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redis client-side caching&lt;/strong&gt; keeps hot metadata in client memory, bringing read latency from network-level down to memory-level, with broadcast invalidation to maintain consistency across multiple clients.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;BatchUnlink&lt;/code&gt; and &lt;code&gt;BatchClone&lt;/code&gt; are internal interfaces. Users do not call them directly. Just use the right commands: &lt;code&gt;juicefs rmr&lt;/code&gt; for deleting large directories, &lt;code&gt;juicefs clone&lt;/code&gt; for copying directories. The optimization will be applied automatically.&lt;/p&gt;
&lt;p&gt;One thing worth noting: both batch operations work by merging regular files within the same directory into a single batch transaction. Subdirectories are handled recursively by concurrent goroutines. The larger the directory, the greater the benefit.&lt;/p&gt;
&lt;p&gt;Batch operations mainly merge ordinary files under the same directory into one batch transaction. Subdirectories are handled recursively by concurrent goroutines. The larger the directory, the bigger the benefit.  &lt;/p&gt;
&lt;p&gt;All optimizations above are available in JuiceFS Community Edition 1.4. Upgrade the client to get the performance gains.  &lt;/p&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Thu, 18 Jun 2026 06:10:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/engineering/improve-metadata-operation-performance</guid></item><item><title>How Gongjiyun Keeps Model Distribution Fast Enough for Cross-Cloud Elastic Inference</title><link>https://www.juicefs.com/en/blog/user-stories/ai-storage-model-distribution-cross-cloud-inference</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Founded in 2023 at Tsinghua University, &lt;a href="https://www.techinasia.com/companies/gongjiyun"&gt;Gongjiyun&lt;/a&gt; provides compute platforms and Model as a Service (MaaS) for artificial intelligence generated content (AIGC) enterprises and research institutions. We aim to alleviate the mismatch between elastic compute demand and supply. By aggregating idle IDC resources and edge resources, the platform offers containerized services, delivering rapidly schedulable compute for volatile workloads such as AI inference, video rendering, data processing, and data synthesis.&lt;/p&gt;
&lt;p&gt;In cross-cloud elastic inference scenarios, compute tasks can be scheduled to different regions, cloud environments, and clusters, but model files and application data are large and cannot be migrated as quickly as compute resources. Especially in online inference, the model repository is read‑heavy and frequently accessed – storage access performance directly affects service startup, elastic scaling, and request latency.&lt;/p&gt;
&lt;p&gt;To address this, we built an &lt;strong&gt;object storage acceleration&lt;/strong&gt; solution on top of &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;JuiceFS&lt;/a&gt;, integrating users’ existing object storage into elastic inference clusters. Through a unified namespace, metadata import, FUSE mount, distributed cache, and data warm-up, it improves access efficiency for model repositories across clouds and clusters. In a case study with a leading text‑to‑image model community, the solution supports a tens‑of‑TB model repository, dynamic loading of checkpoints and low-rank adaptations (LoRAs), and elastic scaling of hundreds of GPUs at peak, while keeping additional latency within the customer’s acceptance range.&lt;/p&gt;
&lt;p&gt;In this post, we'll walk through why storage — not compute — is the real bottleneck in cross-cloud elastic inference, how we evaluated and chose JuiceFS, and the step-by-step optimizations that brought latency from +10s down to under 2s in production.&lt;/p&gt;
&lt;h2&gt;Elastic demand is widespread, but supply is hard to match&lt;/h2&gt;
&lt;p&gt;As AI applications grow rapidly, compute demand continues to increase, but resource usage patterns differ across scenarios. &lt;strong&gt;Compared to training, which has stable resource needs, &lt;a href="https://www.ibm.com/think/topics/ai-inference"&gt;AI inference&lt;/a&gt;, data processing, and data synthesis are often more volatile&lt;/strong&gt;: office applications may see higher traffic during the day, entertainment apps during evenings or weekends, and project‑based data processing may consume large amounts of compute in short bursts then idle. For small teams or exploratory applications, elastic compute also helps them better evaluate the relationship between per‑request cost and application value.&lt;/p&gt;
&lt;p&gt;On the supply side, compute infrastructure is capital‑intensive. Resource providers are not incapable of offering elastic services, but they prefer long‑term dedicated leases to recover costs and reduce risk. As a result, low price, stability, and elasticity are difficult to achieve together:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dedicated leases are low‑cost and stable but lack elasticity.&lt;/li&gt;
&lt;li&gt;Spot resources are cheap and elastic but uncertain.&lt;/li&gt;
&lt;li&gt;On‑demand resources are elastic and stable but expensive.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In China, this contradiction is further reflected by a market dominated by dedicated leases, with elastic supply accounting for a small share.&lt;/p&gt;
&lt;p&gt;We aim to resolve this mismatch between elastic demand and supply. &lt;strong&gt;By aggregating idle IDC and edge resources, the platform offers containerized services, providing rapidly schedulable compute for AI inference, video rendering, data processing, and data synthesis.&lt;/strong&gt; At lower resource costs, we help users quickly spin up tasks during peaks, schedule them across clusters, and handle elastic demand, while enabling resource providers to improve utilization and monetize idle capacity beyond dedicated leases.&lt;/p&gt;
&lt;h2&gt;Compute can be scheduled: How does storage keep up?&lt;/h2&gt;
&lt;p&gt;As elastic compute platforms evolve, compute resource scheduling is easy. Container images can be synchronized across clusters via registries and distribution networks, tasks can be launched in different resource pools by schedulers, and traffic can be distributed via unified ingress and traffic management.&lt;/p&gt;
&lt;p&gt;But model and data files are typically large, making cross‑cloud, cross‑cluster migration costly and slow, unable to match the sub‑second startup and release of compute. Therefore, &lt;strong&gt;in cross‑cloud elastic inference architectures, the real limitation on system elasticity is often not compute scheduling, but the efficiency of data and model distribution&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Different application scenarios have different storage requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.ibm.com/think/topics/model-training"&gt;&lt;strong&gt;Model training&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, development, and debugging:&lt;/strong&gt; These involve complex read‑write needs, including code repositories, model files, experiment results, and intermediate state. They also require high environment stability; users cannot tolerate state loss from frequent host switching. Thus, the platform typically provides long‑term stable compute resources and runtime environments, and storage needs can be met by existing stable storage systems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data processing:&lt;/strong&gt; This can be split further. If a single processing job has high application value and can cover cross‑cloud network transfer costs, you can build a pipeline that continuously pulls data from S3 or other object storage, processes it in the compute cluster, and writes back streaming. The system does not need large local storage. If the data scale is larger or per‑job value is low, local storage acts as a one‑time cache. Data flows through and does not need to be persisted.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What is truly more challenging is the online inference scenario&lt;/strong&gt;. Online inference services cannot tolerate downtime. However, the resources used by an elastic computing platform may come from idle resource pools. These resources could be preempted. Once resources in a certain data center or cluster become unavailable, the platform must be able to migrate tasks to other providers or other clusters in time. This means not only computing tasks must be migrated. Model files and related storage access capabilities must also be migrated at the same time&lt;/p&gt;
&lt;p&gt;Online inference has higher requirements for service continuity and cross-cluster migration capabilities, but its storage access pattern is also more clear. Compared to training, development, and debugging scenarios, inference workloads are typically read heavy. The core needs focus on efficient model loading, reading model weights, and accessing the model repository. For large models and online applications, model loading speed directly affects service startup time, elastic scaling efficiency, and request response stability. Therefore, inference scenarios are not suitable for simply adopting traditional read-write hybrid storage architectures. Instead, they are better suited for specialized optimizations around model distribution, read only access, and cache acceleration.&lt;/p&gt;
&lt;p&gt;In addition, an elastic computing platform usually does not host a user's complete application system. The user's primary cloud account, application database, model management system, and even some fixed computing resources often already exist in other clouds or on premises. For the platform to integrate with the user's application, it must be compatible with the user's existing model repository and model management processes. It cannot require the user to fully migrate the entire system.&lt;/p&gt;
&lt;p&gt;Therefore, &lt;strong&gt;to support cross-cloud elastic inference, we need more than just compute scheduling capabilities. We need a cross-cloud high-performance storage and model distribution solution tailored for model inference scenarios&lt;/strong&gt;. This solution must support hosting a large model repository and high-performance reading, it must adapt to the user's existing model management system. And it must provide stable data access capabilities when resources are migrated across clouds and clusters.&lt;/p&gt;
&lt;h2&gt;Why JuiceFS: Unified cross-cloud access, strongly consistent metadata, and high-performance cache&lt;/h2&gt;
&lt;p&gt;Facing cross-cloud elastic inference scenarios, the storage system needs to meet several conditions at the same time:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It must provide a unified access point across different clouds and clusters. It must support shared read-write access and unified metadata management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It must be compatible with the user's existing &lt;a href="https://en.wikipedia.org/wiki/Object_storage"&gt;object storage&lt;/a&gt; and model repository to avoid data migration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It needs low operational complexity and good read performance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When evaluating storage options, we considered Ceph:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ceph is mature. It’s suitable for building unified storage within a single data center or a stable resource domain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;However, in cross cloud elastic inference scenarios, Ceph requires high network stability and operational skills. The overall integration cost is higher. So we did not choose it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We also evaluated Alluxio. However, in a &lt;a href="https://en.wikipedia.org/wiki/Multicloud"&gt;multi-cloud&lt;/a&gt; environment, multiple clusters need to access the same underlying object storage data concurrently. The workload is not purely read only; there are also occasional writes. This scenario requires strong data consistency. Therefore, Alluxio was not chosen for production.&lt;/p&gt;
&lt;p&gt;We finally chose JuiceFS mainly because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It uses object storage as the database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It provides a unified namespace and consistent file system view through an independent metadata service. This allows multiple clusters to access the same model data as a file system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This architecture is suitable for cross-cloud and cross-cluster model distribution and shared reading.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It’s also compatible with the user's existing object storage and model repository, reducing data migration and application integration costs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The decision to further adopt &lt;a href="https://juicefs.com/docs/cloud/"&gt;JuiceFS Enterprise Edition&lt;/a&gt; was mainly due to its &lt;strong&gt;distributed caching capabilities and managed metadata service&lt;/strong&gt;. In this scenario, the value of JuiceFS is not just providing a file system interface. It combines object storage, unified namespace, metadata management, and cache acceleration into a storage access layer that is better suited for cross-cloud elastic inference.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS 架构图（第四版）-第 2 页-winfsp (2)&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS Enterprise Edition architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h2&gt;Practical: Object storage acceleration based on JuiceFS&lt;/h2&gt;
&lt;p&gt;Based on JuiceFS, the platform encapsulates an object storage acceleration product. This product connects the user's existing object storage to the elastic inference cluster. It provides the storage as a high-performance file system for the application. The overall process is as follows.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a file system.&lt;/strong&gt; The user provides object storage access credentials, for example, AK/SK for S3-compatible storage. The credential permissions can be configured as read only or read-write based on application needs. The platform creates a corresponding JuiceFS file system based on that object storage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Import metadata.&lt;/strong&gt; The platform uses the JuiceFS import feature to scan the metadata of files in object storage. Then, it imports that metadata into the JuiceFS metadata service. In this way, the model files originally stored by the user in object storage can be accessed as file system directories in JuiceFS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a cache group.&lt;/strong&gt; Within each cluster that may host workloads, the platform sets up a JuiceFS cache group. This forms a distributed cache group. Before running a task, the platform can warm-up model files. It caches hot data in the target cluster in advance. This reduces the time needed to pull data from remote object storage when the inference service starts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Mount to application Pods.&lt;/strong&gt; When the user's application runs, the platform uses the FUSE client to mount the JuiceFS file system into the application Pod. For the application, model files appear as local file system paths. Therefore, the original model reading logic usually does not need modification.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enable node local cache.&lt;/strong&gt; Besides the cluster level cache group, the node where the FUSE client runs can also provide local cache. This improves repeated read and model loading performance. It further reduces direct access to remote object storage.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This object storage acceleration product essentially productizes the JuiceFS metadata import, distributed cache, data warm-up, and FUSE mounting process. It allows the user's existing object storage to serve cross-cloud inference tasks in a way that feels closer to a local file system.&lt;/p&gt;
&lt;p&gt;In addition, the JuiceFS cache group is independent from the file system access point. This characteristic, on one hand, adds management complexity on the platform side, because the platform needs to manage the relationships among the file system, cache groups, mount points, and task scheduling. On the other hand, it provides a foundation for cache isolation, independent scheduling, and fine-grained management based on clusters, users, or application scenarios in the future.&lt;/p&gt;
&lt;h2&gt;Production case study: A leading text-to-image model community&lt;/h2&gt;
&lt;h3&gt;Scenario, challenges, and acceptance criteria&lt;/h3&gt;
&lt;p&gt;One of the most representative cases in this object storage acceleration solution involves a leading Chinese text-to-image model community hosting tens of terabytes of model data, including large checkpoint base models and a larger number of smaller LoRA models. In practice, inference jobs typically load a checkpoint first, then load one or more LoRA models to perform combined inference.&lt;/p&gt;
&lt;p&gt;The company already operated compute infrastructure at scale — several thousand GPUs — but its workload, serving creative design and production use cases, exhibited significant variability. &lt;strong&gt;Overall average utilization was below 50%, yet during morning and afternoon peak hours on weekdays, load could reach 140% of normal capacity, degrading the user experience&lt;/strong&gt;. The customer therefore needed a highly elastic compute supply.&lt;/p&gt;
&lt;p&gt;We provided a high-elasticity resource model: compute support at the scale of hundreds of GPUs was available only during weekday peak hours — 10:00–12:00 AM and 2:00–6:00 PM — with resources scaling to zero at all other times.&lt;/p&gt;
&lt;p&gt;This meant the platform needed to provision hundreds of GPUs within a window of minutes, while consuming zero resources outside peak hours. For the customer, this model delivers large-scale compute during peak periods while avoiding payment for idle capacity. For the platform, it enables more efficient utilization and monetization of idle compute resources.&lt;/p&gt;
&lt;p&gt;The technical challenges were significant:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A model repository of this scale cannot simply be replicated to every elastic cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inference services do not load all models once at startup. Model reads and switches happen continuously as user requests arrive, resulting in high access frequency. Therefore, the object storage acceleration solution needed to support not just large-scale model repository access, but stable read performance under continuous dynamic loading.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The customer's performance requirements were also strict. During acceptance testing, a portion of production traffic was routed to the elastic cluster. The requirement was that both the median and mean inference latency of the elastic cluster must stay within 2 seconds of the customer's own cluster. Given that individual inference jobs take on the order of tens of seconds, this requirement left virtually no room for additional latency introduced by the storage layer. In the first few rounds of testing, both median and mean inference latency on the elastic cluster exceeded the customer's own cluster by approximately 10 seconds — failing the acceptance criteria.&lt;/p&gt;
&lt;h3&gt;Performance optimization: Reducing additional latency on the elastic cluster&lt;/h3&gt;
&lt;p&gt;Optimization began with the median. &lt;strong&gt;A high median indicates that a significant proportion of requests are experiencing performance degradation, not just a small number of outliers inflating the tail.&lt;/strong&gt; JuiceFS monitoring revealed that the cluster's cache hit rate was not reaching the expected level. In the current architecture, a cache miss requires a round trip over the public internet to the customer's object storage on Alibaba Cloud. This significantly increases model loading time and then affects inference request latency.&lt;/p&gt;
&lt;p&gt;To solve this, the platform used the isolation capability of the JuiceFS cache group. It assigned dedicated cache nodes to this customer, reserved enough cache space, and warmed up the core model data. After warming up, the access path for core models achieved nearly 100% cache hit rate. This effectively avoided the performance loss from cross public network backfilling.&lt;/p&gt;
&lt;p&gt;The second factor affecting the median was metadata access latency. Because the platform uses a unified cross-cluster architecture, the metadata service is accessed over the public internet, for example, via JuiceFS Cloud Service or a deployment on a remote host, and this latency affects overall model read performance.&lt;/p&gt;
&lt;p&gt;The platform took two measures to address this issue:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enabling JuiceFS' open cache to keep metadata in local memory as much as possible.&lt;/strong&gt; Since this workload is predominantly read-only, caching is an effective way to reduce metadata access overhead.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tuning the cluster's network rate-limiting policy&lt;/strong&gt;. While the platform cannot directly control network equipment in edge data centers, it can apply node-level rate limiting to prevent any single node from saturating the available bandwidth, improving overall network stability. After these optimizations, cluster-wide performance improved meaningfully and the median metric gradually reached the customer's requirement.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Once the median met the target, the mean still showed a gap. This indicated that long-tail requests remained, with a small number of requests taking significantly longer than normal and pulling up the overall average.&lt;/strong&gt; Further analysis traced this to node-level local cache — specifically, the FUSE cache quota. With limited cache capacity, the elastic cluster experienced more frequent cache evictions than the customer's own cluster, causing some requests to reload model data from scratch and increasing mean inference latency. The platform addressed this by increasing the FUSE local cache quota in the production environment, reducing eviction frequency, improving tail latency, and ultimately bringing the mean metric within acceptance. The system passed validation and has been running stably since.&lt;/p&gt;
&lt;h3&gt;Multi-tenant cache management&lt;/h3&gt;
&lt;p&gt;After the single-tenant case was validated, the solution entered multi-tenant operation. As different tenants began time-sharing the same elastic nodes, a new issue emerged: cache contention between tenants.&lt;/p&gt;
&lt;p&gt;In the elastic resource model, FUSE clients do not actively clear node cache on exit. This is a reasonable design in single-tenant scenarios, where cached data from previous jobs can be reused by subsequent jobs to improve hit rates. &lt;strong&gt;However, in multi-tenant scenarios, one tenant's data can occupy node cache for extended periods. This leaves insufficient cache capacity for the next tenant, who is then forced to fall back to object storage, causing a noticeable performance drop.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To address this, we deployed an independent daemon process on each node that performs a global cache garbage collection (GC) pass before the application FUSE client starts. The eviction strategy references the JuiceFS FUSE client implementation, using a 2-random policy to balance collection efficiency and performance overhead. Coordination across nodes is handled via Kubernetes distributed locks: only the client that acquires the lock executes GC, preventing multiple clients from running cache collection simultaneously and creating excessive network and I/O pressure.&lt;/p&gt;
&lt;p&gt;This mechanism effectively mitigates the problem of historical jobs occupying cache resources in multi-tenant scenarios, allowing different tenants sharing elastic resources to maintain consistent cache performance.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;For elastic compute to reliably serve production traffic, compute scheduling alone is not enough. Model data and hot data must remain stably accessible across clouds and clusters.&lt;/p&gt;
&lt;p&gt;Built on JuiceFS, we’ve combined object storage, unified namespace, metadata management, distributed caching, and FUSE mounting into an object storage acceleration solution purpose-built for elastic inference. This is not simply about mounting object storage as a file system. It’s about building a data access layer around the access patterns of model inference: one that supports warm-up, caching, isolation, and management.&lt;/p&gt;
&lt;p&gt;This represents Gongjiyun's current progress in elastic compute and cross-cloud storage acceleration. As AI inference scenarios continue to evolve, model distribution, cache management, and multi-cluster data access will continue to surface new engineering challenges. We look forward to exchanging ideas with developers, AI application teams, and infrastructure practitioners, and to exploring more stable and efficient data access solutions for elastic compute environments.&lt;/p&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 10 Jun 2026 09:48:58 +0000</pubDate><guid>https://www.juicefs.com/en/blog/user-stories/ai-storage-model-distribution-cross-cloud-inference</guid></item><item><title>Reducing Data Storage Costs: A Deep Dive into JuiceFS 1.4 Tiered Storage</title><link>https://www.juicefs.com/en/blog/engineering/juicefs-tiered-storage</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;a href="https://github.com/juicedata/juicefs/releases/tag/v1.4.0-beta1"&gt;JuiceFS Community Edition 1.4&lt;/a&gt; introduces enhanced tiered storage capabilities, allowing users to set object storage classes at the file or directory level. This makes it possible to manage different storage tiers for data under a unified file system interface. In this article, we’ll discuss this feature’s application background, evolution, usage model, implementation, and future plans.&lt;/p&gt;
&lt;h2&gt;Application background&lt;/h2&gt;
&lt;p&gt;In real‑world scenarios, different files have different access patterns and performance requirements. Some data is read or written frequently and demands low latency and high throughput. Other data is rarely accessed after being written, and the main concern is long‑term storage cost. Tiered storage addresses this by placing data in the appropriate storage layer based on access patterns, balancing performance and cost.&lt;br&gt;
Typically, data can be classified into three categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hot data:&lt;/strong&gt; Frequently accessed, requires low latency and high throughput.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Warm (infrequent access) data:&lt;/strong&gt; Accessed occasionally, but still requires fast retrieval when needed.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cold (archival) data:&lt;/strong&gt; Primarily for long‑term retention, very low access frequency, can tolerate some restoration delay in exchange for lower cost.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Object_storage"&gt;Object storage&lt;/a&gt; already offers tiering capabilities. For example, Amazon S3 provides S3 Standard for frequently accessed data, S3 Standard‑IA for infrequent but still millisecond‑accessible data, and Glacier / Deep Archive for long‑term archiving. These storage classes differ in access latency, minimum storage duration, and pricing.&lt;br&gt;
The table below compares main S3 storage classes:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Storage class&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Use case&lt;/th&gt;
&lt;th style="text-align: left;"&gt;First byte latency&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Minimum storage duration fee&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;S3 Standard&lt;/td&gt;
&lt;td style="text-align: left;"&gt;General-purpose storage for frequently accessed data&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Milliseconds&lt;/td&gt;
&lt;td style="text-align: left;"&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;S3 Standard-IA&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Infrequently accessed data requiring millisecond access&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Milliseconds&lt;/td&gt;
&lt;td style="text-align: left;"&gt;30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;S3 Glacier Deep Archive&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Archiving very rarely accessed data with very low cost&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Hours&lt;/td&gt;
&lt;td style="text-align: left;"&gt;180 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For JuiceFS, which is built on top of object storage, the key is to translate these capabilities into file‑system‑level tiering: users set storage tiers for files, directories, or datasets, and JuiceFS maps them to the underlying object storage while handling writes, migrations, and restore operations.&lt;/p&gt;
&lt;h2&gt;Evolution of JuiceFS tiering capabilities&lt;/h2&gt;
&lt;p&gt;The evolution of JuiceFS tiering has moved from being “passively unaware of object storage classes” to “actively managing storage tiers at file and directory granularity.”  &lt;/p&gt;
&lt;p&gt;Before v1.1, JuiceFS did not provide a way to configure storage classes. While users could manually change the storage class of objects at the object storage side, these changes were not recognized or managed by JuiceFS at the file system level. For standard and infrequent‑access classes that support direct access, normal read/write operations usually continued to work. However, if objects were moved to archival storage, access would fail because those objects cannot be read directly.  &lt;/p&gt;
&lt;p&gt;Starting with v1.1, &lt;a href="https://juicefs.com/docs/community/reference/how_to_set_up_object_storage/#storage-class"&gt;JuiceFS supports setting the object storage class via &lt;code&gt;--storage-class&lt;/code&gt;&lt;/a&gt;. For example, you can specify the default storage class for the file system at format time or override the storage class used for data written to a specific mount point during mount. This gave JuiceFS a basic ability to leverage object storage tiering. However, the configuration granularity remained coarse – primarily at the file system default or mount‑point level – and did not allow fine‑grained management per directory, per file, or per dataset.  &lt;/p&gt;
&lt;p&gt;Version 1.4 further advances tiering capabilities to the file and directory level. You can assign a storage tier to individual files or directories based on data temperature. When a directory is assigned a tier, newly created files and subdirectories under it automatically inherit that configuration. Compared to the previous default or mount‑point level settings, v1.4 is better suited for tiered management by project, directory, dataset, or data temperature.&lt;/p&gt;
&lt;h2&gt;How to configure tiered storage&lt;/h2&gt;
&lt;p&gt;The key to tiered storage in JuiceFS 1.4 is translating object storage classes into file‑system‑manageable tiers. The usage model consists of two steps:  &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Map tier IDs to object storage classes.  &lt;/li&gt;
&lt;li&gt;Assign files or directories to those tier IDs.  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This allows users to organise tiering policies by file, directory, or dataset without specifying the underlying storage class on every write.  &lt;/p&gt;
&lt;p&gt;The figure below shows mapping tier IDs to storage classes:&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Mapping tier IDs to storage classes&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Mapping tier IDs to storage classes&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;For example, map tier IDs 1–3 to different storage classes:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-bash"&gt;juicefs config redis://localhost --tier-id 1 --tier-sc STANDARD_IA -y  
juicefs config redis://localhost --tier-id 2 --tier-sc INTELLIGENT_TIERING -y  
juicefs config redis://localhost --tier-id 3 --tier-sc GLACIER_IR -y  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After mapping, set the storage tier for a file or directory:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-bash"&gt;juicefs tier set redis://localhost --id 1 /path/to/file  
juicefs tier set redis://localhost --id 2 /path/to/dir  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Directory‑level settings have inheritance semantics. Once a directory is assigned a tier ID, newly created files and subdirectories will inherit that tier. To apply the tier to existing data under the directory, use &lt;code&gt;-r&lt;/code&gt; to recursively set the tier:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-bash"&gt;juicefs tier set redis://localhost --id 2 /path/to/dir -r  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;existing data&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Directory inheritance and recursive setting for existing data&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;For archival storage classes such as Glacier, a restore request must be issued before reading:&lt;/p&gt;
&lt;pre class="codehilite"&gt;&lt;code class="language-bash"&gt;juicefs tier restore redis://localhost /path/to/dir -r  
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;p&gt;From an implementation perspective, the key to tiered storage in v1.4 is storing tier information in metadata and using the tier ID to decide the object storage behavior during writes, migrations, and reads.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Write, migration, and archival read flow&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Write, migration, and archival read flow&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h3&gt;Metadata design&lt;/h3&gt;
&lt;p&gt;JuiceFS uses &lt;code&gt;tier-id&lt;/code&gt; on files and directories to indicate the storage tier. A value of &lt;code&gt;0&lt;/code&gt; means the default storage tier; values &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;3&lt;/code&gt; correspond to user‑configured object storage classes.  &lt;/p&gt;
&lt;p&gt;Thus, the storage tier is no longer just an external state at the object storage side, but becomes part of the file system metadata that JuiceFS can understand and manage. When writing new data, migrating existing data, or checking file status, JuiceFS can determine the intended storage class based on this metadata.&lt;/p&gt;
&lt;h3&gt;Migrating existing data&lt;/h3&gt;
&lt;p&gt;For existing data, changing the storage tier involves not only updating the metadata &lt;code&gt;tier-id&lt;/code&gt; but also changing the actual storage class of the underlying objects. When a directory is set recursively, JuiceFS processes all files and subdirectories under it and uses the object storage’s copy capability to migrate existing objects to the new storage class.  &lt;/p&gt;
&lt;p&gt;If only the mapping from a tier ID to a storage class is changed, the actual storage class of existing objects is not automatically updated. In that case, you must use &lt;code&gt;tier set --force&lt;/code&gt; to explicitly trigger the change. This will rewrite the objects with the new storage class.&lt;/p&gt;
&lt;h3&gt;Write path&lt;/h3&gt;
&lt;p&gt;When a new file is written, JuiceFS determines the target storage class based on the file’s own &lt;code&gt;tier-id&lt;/code&gt; or, if not set, the inherited &lt;code&gt;tier-id&lt;/code&gt; from its parent directory. For directories that already have a storage tier assigned, new data can be written directly to the corresponding storage tier. This avoids the overhead of first writing to the default tier and then migrating later.&lt;/p&gt;
&lt;h3&gt;Read path&lt;/h3&gt;
&lt;p&gt;For storage classes that support immediate access (for example, Standard and Standard‑IA), reads are transparent to the application, and JuiceFS simply reads the data from object storage as usual.  &lt;/p&gt;
&lt;p&gt;For archival classes such as Glacier and Deep Archive, objects cannot be read directly. You must first issue a restore request using &lt;code&gt;juicefs tier restore&lt;/code&gt;. This sends a request to the object storage service. Whether and when the objects become readable depends on the cloud provider’s restore mechanism. After restoration completes, applications can retry the read.  &lt;/p&gt;
&lt;p&gt;Therefore, archival storage is suitable for data that is accessed very infrequently and can tolerate restoration delay. It’s not appropriate for workloads that require online access at any time. When using archival tiers, you must consider storage cost, restoration time, and restoration costs.&lt;/p&gt;
&lt;h2&gt;Future plans&lt;/h2&gt;
&lt;h3&gt;Reducing operational costs of archival storage&lt;/h3&gt;
&lt;p&gt;Archival storage classes have low long‑term storage costs, but they often come with complex cost models for writes, restores, early deletion costs, and lifecycle transitions. Writing data directly to archival storage may incur extra costs in scenarios with frequent changes or bulk migrations.  &lt;/p&gt;
&lt;p&gt;In the future, JuiceFS could combine object storage lifecycle management. Data could first be written to standard storage with specific object tags. Users could then use cloud‑vendor lifecycle rules to automatically and cost‑effectively transition data to infrequent‑access or archival tiers based on those tags. This would preserve JuiceFS’ file‑system‑level tiering capabilities while leveraging native batch transition mechanisms to reduce overhead.&lt;/p&gt;
&lt;h3&gt;Extending tiering to multi‑bucket, multi‑cloud&lt;/h3&gt;
&lt;p&gt;Currently, tiered storage works on different storage classes within the same object storage backend. In the future, JuiceFS could extend “tier” to different buckets, different object storage services, or even different cloud providers. Tiering would no longer be limited to a single backend.  &lt;/p&gt;
&lt;p&gt;For example, hot data could be stored in a local high‑performance MinIO cluster backed by SSDs, while cold or archival data resides in low‑cost cloud archival buckets. Policies could then gradually move data from the hot tier to the cold tier. With such an architecture, JuiceFS could offer cross‑bucket, cross‑cloud, and cross‑media tiered data management under a unified file system namespace.  &lt;/p&gt;
&lt;p&gt;If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 03 Jun 2026 08:45:00 +0000</pubDate><guid>https://www.juicefs.com/en/blog/engineering/juicefs-tiered-storage</guid></item><item><title>JuiceFS at Xiaomi: Unified Storage for AI, Big Data, and Cloud‑Native Workloads</title><link>https://www.juicefs.com/en/blog/user-stories/artificial-intelligence-big-data-cloud-native-storage</link><description>&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Xiaomi"&gt;Xiaomi&lt;/a&gt; is one of the world's leading smartphone companies. Since 2021, its storage team has been building a file storage platform based on &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;JuiceFS&lt;/a&gt;, initially providing file storage capabilities for cloud‑native and some application scenarios. After Xiaomi announced its comprehensive AI strategy in 2024, issues with the previous heterogeneous storage system became more evident in areas such as technology selection, data flow, and development/operations. Leveraging multi‑protocol access, elastic scalability, multi‑cloud adaptability, and high performance, the team decided to build a unified file storage foundation centered on JuiceFS to support big data, cloud‑native, and AI workloads.&lt;/p&gt;
&lt;p&gt;To achieve this goal, the platform further developed core capabilities, including a capacity layer, a performance layer, and a cache layer. These reduce the complexity of multi‑system access and data movement while balancing large‑scale storage with high‑performance access. &lt;strong&gt;Over the past two years, with the rapid growth of generative AI and autonomous driving, the platform has supported typical scenarios such as large‑model training, autonomous driving training, inference acceleration, and big‑data cloud migration. Today, the platform can handle hundreds of billions of files and EB‑scale storage, covering the entire AI storage chain from raw data and training data to model file distribution.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Storage architecture challenges under the AI strategy&lt;/h2&gt;
&lt;p&gt;Before 2023, Xiaomi, like most companies, had built multiple storage systems for different application scenarios. In the &lt;a href="https://en.wikipedia.org/wiki/Big_data"&gt;big data&lt;/a&gt; area, the data platform was mainly based on HDFS; AI workloads, before the rise of large language models, relied primarily on high‑performance file storage services on the cloud, such as Parallel File System (PFS) and Network Attached Storage (NAS).&lt;/p&gt;
&lt;p&gt;During this period, we also began to introduce JuiceFS and built an internal self‑developed File Storage Service (FDS), using components like &lt;a href="https://juicefs.com/docs/csi/introduction/"&gt;JuiceFS CSI Driver&lt;/a&gt; to provide file storage for cloud‑native and some application scenarios. As application needs evolved, these storage systems grew independently. This led to a complex heterogeneous storage landscape.&lt;/p&gt;
&lt;p&gt;In 2024, after Xiaomi announced its comprehensive AI strategy, the shortcomings of the previous storage system became more pronounced in areas such as technology selection, access, data flow, and development/operations.&lt;/p&gt;
&lt;p&gt;These challenges included:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;High selection and access costs:&lt;/strong&gt; With many storage systems and inconsistent capabilities, application teams had to understand and adapt to each one, raising the barrier to entry.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low data flow efficiency:&lt;/strong&gt; The lack of a unified access method across systems led to frequent cross‑system data copying. This hurt development efficiency.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scattered development and operations efforts:&lt;/strong&gt; Multiple systems were maintained and evolved independently, making it difficult to focus resources on the mission-critical infrastructure required for the AI strategy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To address these issues, we conducted in‑depth internal discussions and architectural adjustments in 2024, and began redesigning a unified storage architecture for AI, big data, and &lt;a href="https://en.wikipedia.org/wiki/Cloud-native_computing"&gt;cloud‑native&lt;/a&gt; scenarios.&lt;/p&gt;
&lt;h2&gt;Building a unified file foundation with JuiceFS&lt;/h2&gt;
&lt;h3&gt;Selection rationale: Multi‑protocol support, elasticity, multi‑cloud, high Performance&lt;/h3&gt;
&lt;p&gt;JuiceFS is a distributed file system that natively supports multi‑protocol access, elastic scaling, and high‑performance reads/writes. This makes it a perfect fit for both native AI and big data storage needs.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS 架构图（第四版）-第 2 页-winfsp (2)&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;JuiceFS Community Edition architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;In the cloud-native field, we’ve been using JuiceFS since 2021, continuously conducting internal development and iterative optimization. At the same time, we maintain close collaboration with the JuiceFS open-source community to jointly drive technology evolution and real-world adoption.&lt;/p&gt;
&lt;p&gt;In AI scenarios, model training and inference rely heavily on &lt;a href="https://en.wikipedia.org/wiki/POSIX"&gt;POSIX&lt;/a&gt; semantics, which aligns naturally with JuiceFS capabilities. Meanwhile, in the big data area, we were already promoting HDFS replacement during cloud migration, a practice with many mature industry examples, so adapting the HDFS protocol was also feasible.&lt;/p&gt;
&lt;p&gt;Considering multi-protocol support, elastic scalability, &lt;a href="https://en.wikipedia.org/wiki/Multicloud"&gt;multi-cloud&lt;/a&gt; adaptability, and high-performance read/write, we ultimately chose JuiceFS as the core component of our unified file storage foundation. This solved the problems of complex data flow, high access costs, and scattered operations caused by using different file systems across multiple platforms and application units.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;xiaomi Evolution&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Evolution of the unified file storage foundation based on JuiceFS&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h3&gt;Storage layer capability construction&lt;/h3&gt;
&lt;p&gt;Our core goal is to build a unified file storage layer on top of JuiceFS, providing large capacity, high performance, and standardized access interfaces to uniformly support the three core application scenarios: big data, cloud-native, and AI.&lt;/p&gt;
&lt;p&gt;On the client side, we fully leverage JuiceFS’ multi-protocol capabilities, offering access methods including POSIX, Hadoop SDK, Python SDK, and &lt;a href="https://juicefs.com/docs/community/guide/gateway/"&gt;S3 Gateway&lt;/a&gt;. They’re all already in use internally.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;JuiceFS unified file storage&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Architecture of the JuiceFS unified file storage foundation&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;On the data plane, the architecture consists of three layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Capacity layer:&lt;/strong&gt; Built on &lt;a href="https://aws.amazon.com/what-is/public-cloud/"&gt;public cloud&lt;/a&gt; object storage, designed for EB‑scale storage, supporting multi-cloud deployments across different strategic data centers and multiple cloud providers.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance layer:&lt;/strong&gt; Large‑scale tuning based on Ceph and all‑flash nodes, designed for AI training and other scenarios with high throughput and low latency requirements.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache layer:&lt;/strong&gt; Given the “write once, read many, seldom modify” characteristic of AI training datasets, we developed a high‑performance distributed cache system based on NVMe and RDMA to reduce repeated read costs and improve training data access efficiency.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the control plane, we made custom enhancements to the &lt;a href="https://juicefs.com/docs/community/introduction/"&gt;Community Edition&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For metadata, we built a distributed metadata service based on the Raft protocol to integrate with internal infrastructure systems and support multi-system access, improving reliability and scalability.  &lt;/li&gt;
&lt;li&gt;For backend management, we built a unified management service responsible for data lifecycle management, tiered storage, garbage collection, and warm-up of hot data from the capacity layer to the performance or cache layers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Through these efforts, JuiceFS has gradually become the unified file storage foundation at Xiaomi, supporting both large‑scale capacity storage and high‑performance access for AI training. The architecture is now running in production and provides the high throughput required for large model training.&lt;/p&gt;
&lt;h2&gt;Our practices&lt;/h2&gt;
&lt;p&gt;During the construction of the unified file storage foundation, JuiceFS has gradually covered Xiaomi’s mission-critical application scenarios, including big data, cloud-native, and AI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In terms of scale, the solution can support EB‑level storage and hundreds of billions of files.&lt;/strong&gt;  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In terms of capability, the coordinated design of the capacity, performance, and cache layers balances large‑scale storage with high performance.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below we describe two typical scenarios: big data cloud migration and the &lt;a href="https://www.hpe.com/hk/en/what-is/ai-storage.html"&gt;AI storage&lt;/a&gt; pipeline.&lt;/p&gt;
&lt;h3&gt;Big data cloud migration and unified lakehouse storage&lt;/h3&gt;
&lt;p&gt;In its early days, our big data system was mainly built on the Hadoop ecosystem, where HDFS used a previous‑generation coupled architecture. Over time, this architecture showed problems such as performance fluctuations, complex operations, and high total cost. In contrast, cloud storage offers significant advantages in elastic scaling, resource utilization, and cost control. Therefore, starting in 2021, we systematically began migrating big data to the cloud.&lt;/p&gt;
&lt;h4&gt;From cold data to the lakehouse layer&lt;/h4&gt;
&lt;p&gt;Our big data cloud migration went through three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Cold data migration:&lt;/strong&gt; We first migrated cold data from HDFS to cloud storage, a process lasting over two years.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lakehouse layer migration:&lt;/strong&gt; We self‑developed a unified lakehouse file system, promoting the evolution from coupled to decoupled storage and compute.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unified storage foundation based on JuiceFS:&lt;/strong&gt; After selecting JuiceFS, we migrated the entire lakehouse layer to JuiceFS.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Lakehouse construction can leverage Iceberg’s native support for &lt;a href="https://en.wikipedia.org/wiki/Object_storage"&gt;object storage&lt;/a&gt; access (like OSS or S3). However, our application spans multiple regions globally using several cloud vendors. Adapting to each vendor individually would incur high access and maintenance costs.&lt;/p&gt;
&lt;p&gt;Thus, we chose JuiceFS to uniformly access different cloud storage. Upper‑layer services simply switch the backend storage address via the SDK to adapt to access in different cloud environments, greatly reducing multi‑cloud complexity.&lt;/p&gt;
&lt;p&gt;For data migration, our self‑developed data‑factory platform supports transparently switching a table’s underlying storage to the new architecture and gradually migrates existing data to the cloud in the background, with little or no impact on application. Moreover, JuiceFS supports multi-cloud and on‑premises deployment. If future cost or strategic considerations require switching to self‑built storage, data can be smoothly migrated back via JuiceFS. This preserves architectural flexibility.&lt;/p&gt;
&lt;h4&gt;Hot table cache acceleration for compute efficiency&lt;/h4&gt;
&lt;p&gt;After data was in the cloud, we further analyzed access patterns of the lakehouse layer. For daily reporting and analysis tasks, computation is usually concentrated on day‑level or week‑level hot data, not requiring frequent full scans. Therefore, the performance focus for the lakehouse layer was not simply improving full‑scan throughput but rather increasing hot data access efficiency and task execution stability.&lt;/p&gt;
&lt;p&gt;Based on this, we built a hot table warm-up capability in cooperation with the lakehouse layer. The system identifies hot tables and their hot partitions based on daily access statistics, and preloads related data into the cache layer before task execution via a warm-up interface. For periodic reporting tasks that must be completed by 8 AM, hot data is warmed up before computation. This reduces remote reads and repeated access.&lt;/p&gt;
&lt;p&gt;Through offline and online testing, after hot table caching, compute efficiency improved by about 10-20%, with reductions in both computation time and resource consumption. The cache size has reached PB level, with average throughput around 200 GB/s. The cache layer also reduces cross‑cloud bandwidth pressure and cloud storage API call costs: by improving the hot data hit rate, repeated cross-cloud reads can be reduced, thereby lowering bandwidth consumption and access costs.&lt;/p&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;Hot table warm-up architecture&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;Hot table warm-up architecture&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;h4&gt;Benefits for big data&lt;/h4&gt;
&lt;p&gt;Benefits for our big data application include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Performance:&lt;/strong&gt; After switching to JuiceFS, sequential read/write performance improved significantly, more than doubling in some scenarios. Overall task duration decreased by about 10–30%.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost:&lt;/strong&gt; By Xiaomi's internal cost metrics, the unified storage architecture has greatly lowered storage costs – about 70% in China and 90% in overseas regions. The overseas legacy solution, which used HDFS with three replicas on cloud instances and EBS, had a high replication factor and thus higher costs.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stability and operations:&lt;/strong&gt; Under the previous mixed architecture, many compute tasks easily consumed node resources, raising node load and affecting storage performance. With the decoupled storage‑compute architecture, compute tasks run on dedicated nodes, task durations are more stable, and scaling and management are more flexible.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;AI one‑stop storage&lt;/h3&gt;
&lt;p&gt;AI storage consists of three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Raw data stage:&lt;/strong&gt; Storing large volumes of raw data, which undergoes processing (for example, ETL) to produce training datasets, then is fed into high‑performance training environments.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Training stage:&lt;/strong&gt; &lt;a href="https://www.ibm.com/think/topics/model-training"&gt;Training&lt;/a&gt; tasks require high throughput and low latency to reduce I/O wait time and increase GPU utilization. After training, model files are generated for subsequent inference.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inference stage:&lt;/strong&gt; Model files must be quickly distributed to specific nodes for rapid startup of inference tasks.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;div class="w-block-ImageWithCaption block-ImageWithCaption"&gt;&lt;dl&gt;
    &lt;dt&gt;image&lt;/dt&gt;
    &lt;dd&gt;AI storage flow&lt;/dd&gt;
    &lt;dt&gt;caption&lt;/dt&gt;
    &lt;dd&gt;AI storage flow&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="w-block-markdown block-markdown"&gt;&lt;p&gt;Previously, data flowed among multiple systems, causing inconvenience for both application teams and internal operations. By adopting JuiceFS uniformly, we can meet diverse needs based on different storage tiers.&lt;/p&gt;
&lt;h4&gt;Requirements and solutions by stage&lt;/h4&gt;
&lt;p&gt;AI one-stop storage needs to cover three stages: raw data, training data, and model files. The requirements for capacity, performance, cost, and distribution efficiency differ at each stage. The table below compares the application needs for each stage with previous and current solutions.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left;"&gt;Use case&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Application requirements&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Previous solution&lt;/th&gt;
&lt;th style="text-align: left;"&gt;Current solution (JuiceFS)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Raw data&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Large capacity, low cost; support high‑concurrency data processing; scale to PB+&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Direct use of object storage; HDFS; other low‑cost storage&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Capacity‑oriented JuiceFS: multi‑cloud object storage underlying, shielding vendor differences; EB capacity, hundreds of billions of files; millions of concurrent tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Training data&lt;/td&gt;
&lt;td style="text-align: left;"&gt;High throughput, low latency; reduce I/O wait time; improve GPU utilization&lt;/td&gt;
&lt;td style="text-align: left;"&gt;PFS, NAS (good performance but high cost)&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Performance‑oriented/cache‑oriented JuiceFS: TB/s throughput, low latency; async checkpoint to reduce I/O wait; cache acceleration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left;"&gt;Model files&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Fast distribution; efficient loading; quick inference startup&lt;/td&gt;
&lt;td style="text-align: left;"&gt;P2P distribution; workflow distribution; PFS&lt;/td&gt;
&lt;td style="text-align: left;"&gt;Cache‑accelerated JuiceFS: cache improves model loading; up to 16 GB/s sequential load per node; several times faster than local disk or FDS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4&gt;High‑performance cache acceleration: improving efficiency and cutting costs&lt;/h4&gt;
&lt;p&gt;In AI training, training datasets typically have the characteristics of "write once, read many times, and modify very little." This is a typical read-heavy, write-light access pattern, making it suitable for improving data access efficiency through caching.&lt;/p&gt;
&lt;p&gt;Take our internal &lt;a href="https://en.wikipedia.org/wiki/Self-driving_car"&gt;autonomous driving&lt;/a&gt; training as an example. Once a dataset version matures, its data volume may continue to grow within the version cycle, but existing data is rarely modified. While the previous high‑performance file storage met training performance requirements, it had some performance redundancy and cost waste for such repetitive reads. Therefore, we began promoting a high‑performance cache acceleration solution based on JuiceFS.&lt;/p&gt;
&lt;p&gt;The cache solution offers several advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Short I/O path:&lt;/strong&gt; Clients operate on files directly, greatly shortening the I/O path for fast responses.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance optimization:&lt;/strong&gt; Through RDMA and zero‑copy optimization, performance has significantly improved – throughput more than 20% higher than previous high‑performance storage, with ongoing optimization.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost reduction:&lt;/strong&gt; The previous PFS‑based storage used replication (though some used EC, replication was more common for stability). With the cache solution, single‑copy storage reduces costs by more than 60%.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource consolidation:&lt;/strong&gt; For CPU training, GPU nodes typically have NVMe drives (about 10 TB each), which were previously used in scattered ways with low utilization. Now, we consolidate these NVMe resources into a unified cache pool to accelerate nearby GPU training and data processing tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Future plans&lt;/h2&gt;
&lt;p&gt;Looking ahead, we’ll focus on three directions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Continuously improve the stability, performance, and scalability of the unified file storage foundation.&lt;/strong&gt; As AI application grows rapidly, training, inference, and data processing tasks demand higher throughput, lower latency, and greater reliability. We’ll continue optimizing the underlying architecture and critical paths to enhance service capabilities under large‑scale concurrent access.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strengthen lifecycle management for massive data.&lt;/strong&gt; Current data volumes continue to grow, but management across storage tiers, access frequencies, and retention periods can be further optimized. We’ll refine tiered storage, archiving, warm-up, and cleanup strategies based on data temperature, access patterns, and cost models, reducing unit storage cost and improving resource utilization.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhance data management and analysis capabilities.&lt;/strong&gt; On top of the unified file storage foundation, we’ll build data management capabilities for application users, helping them better understand data distribution, access behavior, and resource usage, supporting data management, cost optimization, and application decisions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We look forward to continuous exchanges with industry peers to explore more technical practices. If you have any questions for this article, feel free to join &lt;a href="https://github.com/juicedata/juicefs/discussions/"&gt;JuiceFS discussions on GitHub&lt;/a&gt; and &lt;a href="http://go.juicefs.com/discord"&gt;community on Discord&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 27 May 2026 08:03:25 +0000</pubDate><guid>https://www.juicefs.com/en/blog/user-stories/artificial-intelligence-big-data-cloud-native-storage</guid></item></channel></rss>