Featured image of post HeyGen: How to Cut Data Waiting Time in Training Across 10+ Global GPU Clusters

HeyGen: How to Cut Data Waiting Time in Training Across 10+ Global GPU Clusters

HeyGen connects 10+ global GPU clusters to one JuiceFS Enterprise namespace, using tiered caching to cut cold model reads and training data waits.

Background

Background
Background|News screenshot

HeyGen is an AI video generation and digital human platform with over 30 million users across 196 countries, adopted by 85% of Fortune 100 companies. Its R&D, training and inference workloads are spread across more than 10 GPU clusters worldwide. Compute comes from different data centers and GPU providers, and jobs are scheduled dynamically to wherever capacity is available, so the required datasets, models and dependencies are not always in the same region as the compute.

The Cost of Replica-Based Data Management

The Cost of Replica-Based Data Management
The Cost of Replica-Based Data Management|News screenshot

If each cluster keeps its own copy of the data, files must be replicated or synced between clusters, which is slow and can incur extra egress fees. Copies can also drift into different versions, adding sync and consistency work, and data has to move again whenever compute resources change.

The Approach: Unified Namespace with POSIX Compatibility

HeyGen evaluated cloud and on-prem NAS and object storage with data replication, and ultimately chose JuiceFS Enterprise Edition: object storage serves as the data substrate, so the team does not have to maintain storage nodes itself. Multiple clusters join a single global file system, access data through one mount point, and use per-cluster Cache Groups to speed up reads, reducing replication and version syncing. Because R&D code already accessed data through POSIX paths (e.g. open('/jfs/data/...')), keeping the file system interface lowered migration cost and made local development more consistent with production.

The architecture has four layers: access (RD, training and inference workloads mount the file system over POSIX), caching (client-side local cache plus in-cluster distributed cache), metadata (managed by JuiceFS Enterprise Edition), and data (cross-region, cross-cloud object storage).

Tiered Caching

Tiered Caching
Tiered Caching|News screenshot

The read path has four levels: node memory (read/write buffer sized by --buffer-size, plus metadata cache), local NVMe cache, the in-cluster Cache Group, and the cross-cloud object storage that holds the full dataset. Cache Groups support per-directory or per-file cache priorities, so higher-priority data is evicted later when space runs short; HeyGen also uses warmup to preload data a job will soon need. Model directories are set to priority 3, Python dependencies to 2, and other data to 0.

Practice 1: Distributing Models and Python Dependencies

Rather than converting every dependency change into an OCI image, HeyGen kept its existing Python installation flow: packages are placed on a JuiceFS path in advance, and jobs point the index URL at that path (e.g. --index-url /jfs/pypi/simple). Models are warmed into the Cache Group on an hourly basis. On a cache miss a node fetches from upstream, and other workloads can reuse the in-cluster cache, reducing the need to run separate external Python mirrors per cluster.

In tests with 1,000+ concurrent jobs, cold reads of a 100 GB model dropped from roughly 20–30 minutes to 60–120 seconds, and uv dependency installation from about 5 minutes to about 30 seconds. Results vary with workload and environment.

Practice 2: Loading Training Data

Practice 2: Loading Training Data
Practice 2: Loading Training Data|News screenshot

Training nodes typically have substantial local NVMe capacity, which HeyGen organizes into a cluster-level Cache Group and accelerates with RDMA for transfers between clients and cache nodes. This requires JuiceFS Enterprise Edition 5.3 or later, with rdma-network configured on both clients and cache nodes. In addition, while training consumes batch N, a warmup job uses idle bandwidth to preload batch N+1 into the Cache Group, overlapping data loading with the current batch’s training.

Takeaways

The architecture has run in production for more than a year, supporting about 6 PB of data, about 1 billion inodes and 1,000–2,000 client nodes. The benefits fall into three areas: fewer cold reads and less GPU waiting; simpler data management and operations as clusters share one namespace; and more controllable storage cost by keeping object storage as the substrate and absorbing hot reads with tiered caching.