Skip to the shelves

Meta’s Storage Architecture Revolutionizes AI Workflows

Date due card
Shelf AI & ML
Date in
Readers558

Meta's updated storage architecture aims to enhance GPU utilization and research velocity for AI workloads, addressing critical bottlenecks in data access.

Meta’s Storage Architecture Revolutionizes AI Workflows

Over the past few years, the pace of development in artificial intelligence (AI) has accelerated dramatically, with the interval between the release of cutting-edge models shrinking from months to mere weeks. Yet, the underlying infrastructure for AI—particularly storage—has not kept up with this rapid evolution. While the performance of AI compute resources has tripled every two years, advancements in storage and interconnect capabilities have lagged behind. As a result, inefficient storage architectures have become a significant bottleneck, stalling GPU operations and inflating costs. This article examines how Meta’s BLOB-storage architecture has evolved to maximize GPU efficiency and enhance research velocity.

Understanding the Storage Framework

Meta operates vast storage clusters on an exabyte scale that underpin its diverse services, including Facebook, Instagram, Reality Labs, and Meta AI. The storage framework provides object storage, file systems, and block-device APIs developed on top of a scalable core layer known as Tectonic. This regional, multi-tenant storage system is designed for high durability and availability through advanced erasure coding techniques and media tiering while efficiently managing data based on access patterns.

Previously, Meta trained models like Llama directly over the Tectonic layer using an NFS-like interface. However, as capabilities evolved, the company transitioned its training processes to utilize the BLOB-storage interface, necessitated by the requirement for unified access to extensive data lakes.

Enhancing GPU Utilization

Modern AI workloads are particularly resource-intensive, demanding high throughput and low-latency access to data. The shift in focus within BLOB storage architecture has been towards maximizing GPU utilization, which is critical for efficient model training. Failure to meet the low-latency requirements can lead to GPU stalls and inefficiencies in the model training pipeline.

The Importance of Latency

Latency plays a pivotal role during model training, where multiple GPUs work on vast data sets over numerous epochs. If one GPU experiences latency, it can cause a cascading slowdown for all others. For example, a scenario involving two GPUs highlights this; if one experiences latency in data fetching, it can stall the entire process until all GPUs synchronize their states.

Figure 1: Dataloading across two GPUs.

Limitations of Legacy Architectures

Meta's previous BLOB-storage architecture evolved through incremental changes but ultimately became ill-suited for the demands of AI workloads. Many layers of the system were stateful, leading to inefficient metadata lookups. These bottlenecks manifested in significant latency, particularly for time-sensitive AI processing tasks.

Previously, a typical retrieval request (e.g., getObject(“/bucket/path”)) required multiple metadata lookups across different layers, resulting in delays that could extend to hundreds of milliseconds. This outdated approach was not compatible with the low-latency requirements critical for AI workloads.

  • Performance: The prior architecture could not meet the stringent latency needs of modern AI operations.
  • Reliability: The design was too globally focused, resulting in inefficiencies given today’s increased demand for localized performance.
  • Cost-Efficiency: Older systems reliant on HDDs were not aligned with the contemporary shift towards quick-access flash storage.
  • Power Efficiency: The previous architecture's design constrained GPU resource allocation due to power limits.

Architectural Overhaul: Rebuilding the Foundation

In light of these limitations, a comprehensive redesign was undertaken, characterized by several key adjustments:

  • Unified Metadata Schema: The metadata system was restructured into a flat, unified schema integrated with ZippyDB, enabling instant retrieval for storage addresses.
  • Direct Data Streaming: The introduction of a robust client SDK replaced earlier data proxy models, directly streaming data to clients and improving throughput while minimizing power consumption.
  • Regional Deployments: The BLOB-storage setup can now be deployed locally alongside GPU resources to reduce latency.
Figure 3: New request flow for getObject API.

Managing Traffic Spikes and Hot Spots

AI workloads typically exhibit heavy concurrent access patterns across hundreds of GPUs. To handle such high demand, especially during critical moments like checkpoint loading, the redesigned BLOB storage architecture implemented two core strategies:

  • Distributed Data Cache: Leveraging excess GPU memory, frequently accessed data is cached across systems, which enhances performance during peak times.
  • Readplan Metadata Cache: This cache stores access paths for commonly used data, significantly speeding up retrieval times.

These implementations have resulted in an impressive cache hit rate of 80%, decreasing reliance on storage during CPU spikes, and dramatically improving latency statistics.

Protocol Optimizations for Further Efficiency

Beyond foundational changes, targeted optimizations were made to address specific bottlenecks:

  • Laggard Nodes: Slow nodes that contributed to latency were managed using hedged reads to ensure better reliability.
  • Egress Control: To manage spikes in egress traffic during checkpoints, a dynamic concurrency control mechanism was instituted, adjusting SDK parallelism in response to real-time congestion.

This collective effort has resulted in a BLOB-storage framework capable of supporting AI workloads without inducing processor stalls and minimal overhead atop the Tectonic layer.

Accelerating Research Velocity

Today’s scarcity of GPUs, combined with their geographical distribution, places additional pressure on researchers. Tasks such as data ingestion often lag, delaying critical parts of the research process. The traditional method involves multiple steps, including data curation and regional ingestion, which can take several hours. This lag detracts from iterative model tuning, leaving researchers waiting longer than necessary.

Meta needed to streamline this process, enabling data access across regions without significant delays. Drawing on parallels from operating system architectures, a tiered cache system was designed, using GPU memory as primary caching tiers while maintaining accessibility from the BLOB storage system.

  • Dataloader Prefetch: This mechanism ensures datasets are preloaded while the current workload processes, thus optimizing throughput.
  • Deep Prefetch API: An explicit prefetch API in the BLOB storage SDK allows data to be preloaded from regional caches for the near future.
  • Autonomic Data Lifecycle Management: This approach governs data stored in the cache, utilizing policies like TTL and LRU for streamlined management.
Figure 5: Ingestion times before and after the rollout.

By adopting this new data-loading system, Meta has streamlined its ingestion process, dramatically shortening wait times for researchers and accelerating the pace of AI research.

Key Insights and Future Directions

As AI workloads become increasingly data-diven, the importance of an efficient storage architecture cannot be overstated. Bottlenecks in storage access not only hinder GPU utilization but also slow down the pace of research. Meta’s advancements in BLOB-storage architecture have explicitly catered to these challenges, reflecting a radical redesign to enhance performance suited for AI.

Looking ahead, Meta plans to continue evolving its storage capabilities to meet the demands of scaling hardware and emerging AI workloads. Future improvements will focus on:

  • Scaling storage systems to meet network bandwidth limits.
  • Ensuring seamless checkpointing without impacting GPU performance at larger scales.
  • Addressing unique challenges related to inference workloads, which are currently being explored.

With these ongoing enhancements, Meta aspires to not only keep pace but also lead in the rapidly advancing field of AI research and operational efficiency.

Source: Thomas Smith · engineering.fb.com

Readers also borrowed