メタ、大規模AIモデルのストレージ設計指針を公開
本文の状態
日本語全文を表示中
詳細モードで約20分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Meta AI Engineering
Meta は AI モデルの急成長に伴うストレージボトルネック解消のため、Tectonic 基盤上に BLOB ストレージを構築し、GPU 利用率と研究速度の最大化を目指すアーキテクチャを発表した。
AI深層分析を開く2026年8月4日 14:21
AI深層分析
キーポイント
AI イノベーションにおけるストレージの重要性
メタは AI が脳であるならストレージは記憶であると定義し、計算能力や速度がメモリサイズと検索速度に依存すると指摘している。
GPU 性能向上に対するストレージ成長の遅れ
GPU 処理性能が約2年ごとに3倍になる中、ストレージおよび相互接続性能の成長は緩やかであり、これが GPU の停止やコスト増の主要因となっている。
Tectonic と BLOB ストレージの役割分担
メタは耐障害性と可用性を高める Tectonic 基盤上に、グローバルで無限に拡張可能な BLOB ストレージ層を構築し、データ階層化と配置最適化を実現している。
NFS から BLOB への移行戦略
従来の Llama 訓練で広く使われていた NFS 型インターフェースから、大規模データレイクへの統一アクセスと高性能を目的とした BLOB ストレージ層へ移行を進めている。
AI ワークロードにおけるレイテンシの重要性
GPU 訓練では数百台の GPU が同期するため、1 つでも遅延が発生すると全体的な処理速度が低下する。そのため、予測可能で上限値(pMax)に収まる低レイテンシが不可欠である。
重要な引用
If AI is the brain, storage is the memory: Capability and speed are highly dependent on the size of memory and speed of retrieval.
As a result, storage bottlenecks continue to be one of the primary contributors to GPU stalls for AI workloads
Our modern training stack has been migrating slowly on top of the BLOB-storage interface
If one GPU is slow, this step will slow down all GPUs as well as the entire training.
編集コメントを表示
編集コメント
メタが自社の大規模 AI 開発で直面するストレージのボトルネックを、独自のアーキテクチャで解決しようとする試みは業界全体に示唆に富む。特に GPU の性能向上に対するストレージの追いつき難さが明確に指摘されており、今後のインフラ設計において重要な視点となるだろう。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
ここ数年、モデルの能力とトレーニングデータの規模は指数関数的に成長を遂げてきました。特に過去1年ほどでは、新世代モデルのリリース間隔が数ヶ月から数週間に短縮されています。このAI革新における速度と計算コストの両面で、信頼性が高く高速なストレージへのアクセスが不可欠です。もしAIが「脳」だとすれば、ストレージは「記憶装置」と言えます。その能力と速度は、記憶容量の大きさやデータ検索の速さに大きく依存しています。
しかし、AI演算性能が約2年ごとに3倍に向上する一方で、ストレージおよび相互接続(インターコネクト)のパフォーマンス成長はより緩やかです。その結果、ストレージのボトルネックはAIワークロードにおけるGPUのストール要因の一つとして引き続き大きな役割を果たしており、直接コスト増や市場投入までの遅延を招いています。GPU利用率だけでなく、ストレージアーキテクチャはAI研究におけるイテレーション速度にも直結しています。GPUが地理的に分散し、データセット規模が巨大化する中で、研究者たちは地域間でのデータ取り込みと転送に多くの時間を費やすことになり、研究のスピードが阻害されています。
本ブログ記事では、MetaのBLOBストレージアーキテクチャがどのように進化してきたかについて解説します。その目的は、GPU利用率の最大化と研究速度の最大化という2つの主要な課題への対応です。
ストレージアーキテクチャ概観
Meta は、Facebook、Instagram、Reality Labs、Meta AI、広告、データウェアハウス、および内部データベースなど、社内外のすべての製品を支える数百ものエクサバイト規模のストレージクラスターを運用しています。当社のストレージサービスは、オブジェクトストレージ、ファイルシステム、ブロックデバイス API を提供しており、これらの API 抽象化レイヤーは、水平方向にスケーラブルな基盤ブロック層「Tectonic」の上に構築されています。
Tectonic レイヤーは、地域跨ぎのマルチテナント型ストレージファブリックであり、消去符号化技術を活用して高い耐久性と可用性を実現します。また、HDD やフラッシュメモリなど異なるメディア間でのティアリング(階層化)をサポートし、ホットデータ、コールドデータ、ウォームデータをスマートに配置することで、テナント間の I/O 利用効率を最適化しています。
Tectonic の上に動作する BLOB ストレージレイヤーは、グローバルかつ無限にスケーラブルなストレージファブリックを提供するとともに、耐久性と可用性のトレードオフをユーザーが選択できるポリシーも公開しています。
以前、「Training Llama: A Storage Perspective」と題した @Scale 講演で、Meta が Tectonic ブロック層の上に NFS に似たファイルシステムインターフェースを公開して Llama のトレーニングを直接実行する方法について解説しました。このアーキテクチャは現在も Meta 内で広く利用されていますが、業界全体と同様に、現代のトレーニングスタックは徐々に BLOB ストレージインターフェースの上へと移行しています。この移行の背景には、BLOB ストレージレイヤーにおける大規模データレイクへの統一されたストレージアクセスニーズと、高性能化の要求があります。
GPU 利用率の最大化
現代の AI ワークロードは「データ飢餓」状態にあり、従来の Web アプリケーションとは全く異なる特性を持っています。バースト性と持続的な高スループット、予測可能で上限が定められた pMax レイテンシ、そして可変的な I/O パターンです。近年の BLOB ストレージにおける焦点は、主に GPU 利用率の最大化へと移ってきました。
なぜレイテンシが重要なのか
バウンド付きかつ低値の pMax レイテンシがなぜ重要かを理解するために、モデル学習を例に考えてみましょう。学習中、数十万もの GPU がストレージ内の膨大なデータを複数回(つまり複数のエポックにわたって)反復処理し、バッチ単位でデータセットを学習します。定期的に、一定数のステップまたはバッチごとに、GPU 同士は状態を同期します。もし一つの GPU が遅い場合、このステップ全体がその GPU に合わせて遅延し、結果として学習プロセス全体が遅れてしまいます。
図 1 は、2 つの GPU にわたるデータ読み込みパイプラインを示しています。各 GPU ホストにあるデータローダーは、現在のバッチを処理している間に次のバッチをプリフェッチしており、計算または I/O のオーバーラップを最大化しています。GPU1 の場合、ストレージからのフェッチレイテンシは許容範囲内であるため、I/O を待って GPU が停止することはありません。一方、GPU2 では 2 回にわたりストレージフェッチのレイテンシが高くなり、GPU がストールしました。これらのストールの結果、ステップ完了までの全体時間が遅延しています。
image図 1: 2 つの GPU にわたるデータ読み込み。
レガシーな BLOB ストレージアーキテクチャは AI 対応できていなかった
長年にわたり、BLOB ストレージはサービス指向の方式で、層を重ねる形で有機的に進化してきました。これらの層の多くは状態を保持し、独自のメタデータストアを維持していました。従来のグローバル HDD が提供するユースケースでは、このメタデータへのアクセス遅延がボトルネックになることは稀でしたが、フラッシュメモリからミリ秒単位でデータにアクセスする AI ワークロードにとっては致命的な問題でした。
図 2 は、典型的な getObject("/bucket/path") API のリクエストフローを示しています。リクエストが API サーバーに到達すると、サーバーは名層(namelayer)、ボリューム層(volumeslayer)、コンテナ層(containerlayer)をまたいで多数のメタデータ参照を実行し、パスを (blockId, offset, size) のタプルセットへと解決します。これらの参照の一部はリージョンを跨ぐこともあり、遅延が数百ミリ秒に達することも珍しくありません。どの参照からの応答が遅れても、全体の処理は十分には機能しません。参照処理の後、API サーバーは Tectonic レイヤーからデータをプロキシしてクライアントへ転送します。
image図 2: getObject API の従来のリクエストフロー
このアーキテクチャは従来型のワークロードにはよく機能していましたが、設計上のトレードオフを決定づけていた根本的な前提条件は、その後変化しました。その主な要因の一つがパフォーマンスと遅延です。
前述の通り、従来型のワークロードにおける遅延要件は緩やかでしたが、AI ワークロードでは pMax まで予測可能で制限された遅延が要求されます。
信頼性と耐久性:従来のアーキテクチャは、リージョンの障害が発生しても高い可用性と耐久性を確保するように設計されていました。データとメタデータはデフォルトでグローバルに複製されていました。しかし、AI ワークロードでは極めて高い可用性が求められますが、「デフォルトでグローバル」という設計方針はもはや通用しません。
コスト効率:従来のスタックは HDD を基盤として構築され、1 バイトあたりのコスト最適化を追求していました。一方、AI ワークロードには IOPS の大幅な増加が必要であり、フラッシュストレージへの移行が不可欠です。さらに、GPU の計算コストと比較すると、ストレージ自体の計算コストは無視できるほど小さくなっています。
電力効率:GPU を用いるデータセンターでは、スペース不足よりも電力供給の制約が深刻化しています。ストレージに消費される 1 キロワットは、そのまま GPU に回せない電力を意味します。これは AI ワークロードにおいて新たに直面する制約条件です。
つまり、トレードオフのバランスが大きく変化しているため、アーキテクチャ全体を見直す必要があります。
基盤の再構築
新しい基盤を構築するにあたり、私たちは以下の主要な設計方針を採用しました。
統一メタデータスキーマ:メタデータサブシステムを完全に書き換え、これまで別々のレイヤーに分散していたメタデータを 1 つの統合された平坦なスキーマに集約しました。この基盤には ZippyDB を採用しています。これにより、ストレージアドレスへのパス解決が O(1) で可能となり、飛躍的な性能向上を実現しました。
データプレーンプロキシの排除:データプレーンプロキシを撤廃し、ストレージサーバーからクライアントへ直接バイトストリームを送信可能なファットクライアント SDK を構築しました。これにより省電力目標の達成に貢献するとともに、スループットの向上とレイテンシの低減を実現しています。
地域別デプロイ:BLOB ストレージスタックは軽量かつ柔軟性を備え、地域サービスまたはグローバルサービスとして展開可能です。現在では、すべての AI リージョンにおいて GPU とコロケーションされた BLOB ストレージスタックを地域単位で展開しています。
image図 3: getObject API の新しいリクエストフロー
図 3 は、getObject("/bucket/path") の新しいリクエストフローを示しています。クライアント側の SDK がこの API 呼び出しを受け取ると、API サーバーに対して getReadPlan("/bucket/path") リクエストを発行します。API サーバーは、パスを (blockId, offset, size) タプルにマッピングするために、新しいメタデータストアに対してチャンクごとに O(1) のルックアップを実行し、その後 ReadPlanResult を SDK に返します。SDK には Tectonic BlockClient が埋め込まれているため、Tectonic から直接データをストリームできるようになりました。これらの変更により、基盤を再構築して Tectonic 上にゼロオーバーヘッドを追加するという目標を達成しました。データプロキシを排除したことで、電力フットプリントの予算内での運用も維持できています。
スパイクとホットスポットへの対応
AI ワークロードでは、データやチェックポイントの読み込み時に数百台の GPU が並列してデータにアクセスすることが知られています。モデル重みなどのデータの一部は頻繁にアクセスされる「ホット」な状態になりやすく、GPU の再起動などのイベントがトラフィックの急激な増加を引き起こします。
基盤部分は既に整ったため、次に直面したのはこれらの急増とホットスポットへの対応でした。幸いにも BLOB ストレージ層には長年の間、ホットスポット対策の経験が蓄積されているため、既存のソリューションを AI ワークロード向けに適応させることができました。具体的には、以下の 2 つのアプローチを採用しました。
分散データキャッシュ:GPU ホストの余剰メモリを活用し、頻繁かつ並列的にアクセスされるデータの分散データキャッシュとして機能させました。これを実現するために、Meta の Owl サブシステムからコンポーネントを流用しました。Owl サブシステムのピアを BLOB ストレージクライアント SDK に直接統合することで、すべてのデータアクセスがこのデータキャッシュを経由するようにしています。
Readplan メタデータキャッシュ:Readplan とは、パスからストレージアドレスへのマッピングを指します。現在、頻繁にアクセスされる BLOB に対する Readplan を、memcache に似た分散メモリストアにキャッシュしています。
実際の運用では、分散データキャッシュでの平均ヒット率は 80% に達し、Readplan キャッシュによるメタデータのアクセスは 1〜2 ミリ秒で完了します。本質的に、これらのシンプルな仕組みは以下の 3 つの役割を果たします。
・トラフィックの急増を吸収し、ストレージからの I/O 要件を削減する
・メタデータにおけるホットシャードの問題を解決する
・メモリからデータを供給することで p50 および p99 のレイテンシを改善する
プロトコル最適化
これまでの議論で、全体の 80% の課題は解決できました。残りの 20% は、スタック全体に潜むボトルネックを特定し、解消することで達成しました。以下にいくつかの重要な問題点を挙げますが、これは網羅的なリストではありません。
遅延ノード(Laggards):1 つの低速なストレージノードが、レイテンシの尾部(tail latencies)を引き起こすケースです。これはよく知られた課題であり、クライアント側で「ヘッジドリード(hedged reads)」を採用して緩和しました。
出口トラフィックの急増(Egress spikes):チェックポイントイベント時には、クライアントから一時的に出口トラフィックが急激に増加することが一般的です。これがネットワークの輻輳やタイムアウト、再試行を引き起こし、最終的には GPU が待機状態(ストール)に陥る原因となります。これを解決するため、クライアント SDK に動的な並列制御機能を構築し、アプリケーションレベルの輻輳信号に基づいて自動で並列度を調整できるようにしました。
上記の対策をすべて講じた結果、新しい BLOB ストレージスタックは GPU のストールを引き起こすことなく AI ワークロードに対応可能となりました。また、Tectonic レイヤーに追加するオーバーヘッドも無視できるほど小さいものです。これにより、次の焦点は研究開発へと移されました。
研究速度の最大化
GPU は希少であり、ますます地理的に分散化しています。一方で、パフォーマンスを維持するためには、トレーニングワークロードに必要なデータは GPU と同じ場所に配置(コロケーション)する必要があります。この状況が研究者にとって興味深い課題を生んでいます。つまり、現在は研究者自身がデータを各地域間で取り込み、移動させる責任を負う必要があるのです。
Meta における典型的なトレーニングジョブの提出プロセスは以下の通りです。
- 研究者がさまざまなソースからデータを選定し、それを加工・強化した上で BLOB ストレージに保存します。
- 次に、ジョブを実行したい地域を選択します。
研究者はデータ取り込みジョブを起動し、GPU ホスト内からの読み込みに最適化されたファイル形式で、トレーニング用データセットのターゲットリージョンへのスナップショットを作成します。
その後、取り込みが完了するまで待機します。データセットの規模によっては、このプロセスに数時間かかることもあります。
研究者はトレーニングジョブを起動し、実行状況をモニタリングします。
出力結果を分析し、データセットを調整して、ステップ 3 から再度イテレーションを開始します。
ステップ 2 から 4 には数時間を要することがあり、これが研究者のイテレーション速度に直結します。理想的な状態としては、研究者の時間はストレージ待ちではなく、モデルのチューニングに充てられるべきです。現在、研究者はパフォーマンスを最適化するためにジョブ開始前にスナップショットをコピーし、データを GPU と同列配置しています。この手法は大規模トレーニング(数週間から数ヶ月にわたるもの)では理にかなっていますが、実際には大多数のジョブはそれよりも小規模です。これらのジョブを担当する研究者たちは、イテレーション速度を優先するため、時折のパフォーマンス低下を許容する用意があります。
そのため、研究者がデータを一度取り込めば、地域的な境界を意識することなくどこからでもアクセスできるシステムが必要でした。また、数時間ではなく数分で反復作業ができるワークフローも求められていました。
設計を根本から見直す中で、これらのデータセットが持つ「書き込みは一度だけ、読み取りは多数」という特性に気づきました。では、ストレージを惑星規模のコンピューターにおけるディスクとみなし、オペレーティングシステムの知見を借りてはどうでしょうか?
CPU コア上で動作する Linux プロセスがディスクからファイルを読み込もうとする際、OS はメモリ上のページキャッシュや L2/L1 CPU キャッシュなど、さまざまな階層にわたってデータをオンデマンドで読み込む(ハイデート)処理を透明に行います。この直感に基づき、図 4 に示すようなアーキテクチャの進化が生まれました。
imageFigure 4: Dataloading architecture evolution.
核となるアイデアは、ホスト上およびホスト外のストレージリソースを階層化されたキャッシュとして活用し、最終的な真実の源(ソート・オブ・トゥルース)として HDD に裏打ちされたグローバルな BLOB ストレージファブリックを支えにすることです。具体的には、GPU ホスト上のメモリとフラッシュを L1 および L2 キャッシュとして利用します。また、フラッシュに裏打ちされた地域ごとの BLOB ストレージファブリックを L3 キャッシュとし、データローダーは引き続き慣れ親しんだ BLOB ストレージ SDK を通じてストレージにアクセスします。
レイテンシを効果的に隠蔽し、データのライフサイクルを簡素化するために、私たちは以下の仕組み relies しています。
Dataloader のプリフェッチ機能は、現在のバッチを処理している間に次のデータセットのバッチをメモリに読み込んでおく仕組みです。このプリフェッチ動作は、BLOB ストレージ SDK レベルでは読み込み操作として現れます。
Deep prefetch(深層プリフェッチ)では、BLOB ストレージ SDK の一部として明示的な prefetch() API を公開しています。Dataloader は背景でこの prefetch() API を呼び出すことで、今後数分間で必要となるデータの明示的なプリフェッチを実行します。この API により、リモートストレージからデータをローカルリージョンの L3 キャッシュへ転送する「ハイドレーション」がトリガーされ、メタデータキャッシュも事前ウォームアップされます。
自動データライフサイクル管理では、L3 リージョン別分散フラッシュ階層に格納されたデータは、トレーニングサイクル内のエポック間で再利用できるように、設定された期間保持されます。TTL(Time To Live)や LRU(Least Recently Used)ポリシーなど、カスタム.eviction ポリシーをサポートしており、これらのポリシーは容量やクォータの状況も考慮して動作します。
この新しいデータ読み込みパラダイムの採用は、本番環境への展開が始まった直後に急速に進みました。現在でも、両方のデータ読み込みパラダイムを本番環境でサポートし続けています。その影響を数値で示すため、Figure 5 では全ワークロードにおける展開前後のインジェクション時間を比較しています。
imageFigure 5: 展開前後のインジェクション時間。
新しいフロンティアモデルが数週間でリリースされる世界において、このデータ読み込みパラダイムへの転換は、さらに高速化を進めるために不可欠な変化です。
Key Takeaways
現代の AI ワークロードは大量のデータを必要とし、ストレージは計算コストとイノベーションの速度の両面で重要な役割を果たしています。ストレージのボトルネックは GPU の利用率や計算コストに直接影響を与えます。さらに、地理的に分散した GPU を活用する環境では、リージョン間でのデータ取り込みに要する時間が研究における反復スピードを左右します。
Meta の BLOB ストレージアーキテクチャは、同社のアプリ群をサポートするために構築されたものです。しかし AI ワークロードに対応するためには、性能の飛躍的な向上が必要でした。これにより、アーキテクチャ全体の見直しが行われました。メタデータサブシステムの再構築と、プリフェッチやオンデマンドによるデータ読み込みを備えた階層型キャッシュアーキテクチャの導入を通じて、現在のワークロードのニーズに効果的に応えることが可能になりました。
今後の取り組み
Meta では、ハードウェアの進化やワークロードの変化に対応するため、ストレージの継続的な進化を進めています。今後は以下の領域での取り組みが予定されています。
- ネットワークの限界までストレージを拡張する
- GPU を停止させることなく、さらに大規模なチェックポイント機能をサポートする
- 推論ワークロードにおける新たな課題への対応(現在着手済み)
本記事「Meta のスケール展開における AI ストレージ設計図」は、Engineering at Meta に最初に掲載されました。
原文を表示
Over the past several years, model capabilities and training dataset sizes have experienced exponential growth. During the past year or so, the time between new-frontier-model releases has gone down from months to weeks. Reliable and fast access to storage is important to both the speed and computational cost of this AI innovation. If AI is the brain, storage is the memory: Capability and speed are highly dependent on the size of memory and speed of retrieval.
Yet while AI compute performance has roughly tripled every two years, storage and interconnect performance growth have been more modest. As a result, storage bottlenecks continue to be one of the primary contributors to GPU stalls for AI workloads, directly impacting expenditures and time to market. Aside from GPU utilization, storage architecture also directly impacts the speed of iteration in AI research; with GPUs increasingly becoming geo-distributed and dataset sizes increasingly becoming massive, researchers spend a significant amount of time ingesting and moving data across regions, thus impacting research velocity. In this blog post, we discuss how Meta’s BLOB-storage architecture evolved to address two primary challenges: maximizing GPU utilization and maximizing research velocity.
Storage Architecture Overview
Meta operates hundreds of exabyte-scale storage clusters that serve all of Meta’s external and internal products, including Facebook, Instagram, Reality Labs, Meta AI, Ads, Data Warehouse, and internal Databases. Our storage service exposes object storage, file systems, and block-device APIs, and these API abstractions are built on top of a horizontally scalable foundational block layer called Tectonic. The Tectonic layer is a regional, multi-tenant storage fabric that provides high durability and availability leveraging erasure-coding techniques, supports tiering across media types (e.g., HDD and flash), and manages smart placement of hot, cold, and warm data for efficient utilization of I/O across tenants. The BLOB-storage layers that operate on top of Tectonic expose a global, infinitely scalable storage fabric, and expose policies that let users make tradeoffs between durability and availability.
In a previous @Scale talk titled, “Training Llama: A Storage Perspective,” we discussed how Meta trained Llama directly over the Tectonic block layer by exposing an NFS-like FileSystem interface on top of it. While this architecture continues to be used widely within Meta, our modern training stack has been migrating slowly on top of the BLOB-storage interface, as is the case across the industry. This transition is motivated by the need for unified storage access to massive data lakes in the BLOB-storage layer as well as the need for high performance.
Maximizing GPU Utilization
Modern AI workloads are “data hungry” and have very different workload characteristics than traditional web applications: bursty and sustained high throughput, predictable and bounded pMax latencies, and variable I/O patterns. The focus for BLOB storage, in recent years, has largely shifted to maximizing GPU utilization.
Why Latency Matters
To see why bounded and low-pMax latencies are important, let’s consider model training. During that training, hundreds of thousands of GPUs iterate over vast amounts of data in storage multiple times (i.e., over multiple epochs), and the GPUs train datasets in batches. Periodically, after every certain number of steps or batches, the GPUs synchronize their state among themselves. If one GPU is slow, this step will slow down all GPUs as well as the entire training.
Figure 1 shows a data-loading pipeline across two GPUs. The dataloader in every GPU host prefetches the next dataset batch, while the GPU is processing the current batch for maximum compute or I/O overlap. In the case of GPU1, the storage-fetch latency is well within bounds, so the GPU is never stalled waiting on I/O. In the case of GPU2, there are two instances where storage fetch exhibits high latency, stalling GPU. As a result of these stalls, the overall step-completion time is delayed.
imageFigure 1: Dataloading across two GPUs.
Legacy BLOB-Storage Architecture Wasn’t AI-Ready
Over the years, BLOB storage evolved organically, adding layers on top of layers in a true service-oriented fashion. Many of these layers were stateful and maintained their own metadata stores. While these metadata-access latencies typically weren’t the bottleneck for the traditional use cases served by global HDDs, they were showstoppers for AI workloads with millisecond access to data in flash. Figure 2 shows the request flow for a typical getObject(“/bucket/path”) API. After the request arrives at the API server, the server does many metadata lookups across the namelayer, volumeslayer, and containerlayer before resolving the path to a set of (blockId, offset, size) tuples. Some of these lookups can cross regions, and it’s not uncommon for latencies to add up to hundreds of milliseconds; one slow response from any of the lookups was sufficient. After the lookups, the API server proxies the data from the Tectonic layer to the client.
imageFigure 2: Old request flow for getObject API.
While this architecture served conventional workloads well, the foundational assumptions that dictated design tradeoffs have since shifted. Some of these are:
Performance and latency: As discussed, while latency needs for conventional workloads were modest, AI workloads demand predictable and bounded latencies all the way up to pMax.
Reliability and durability: The legacy architecture was designed to be highly durable and available, even in the face of region outages; data and metadata were globally replicated by default. While AI workloads demand very high availability, the global-by-default design choice no longer holds.
Cost efficiency: Legacy stack was built on top of HDDs and highly optimized for cost per byte. The IOPS demands for AI workloads necessitate flash, and in addition, the computational cost of storage becomes negligible relative to the computational cost of GPUs.
Power efficiency: With GPUs, datacenters are increasingly power constrained rather than space constrained. Every kilowatt of power spent on storage is power not spent on GPUs. This is a new constraint with AI workloads.
In short, the tradeoff space has shifted enough for us to rethink the entire architecture.
Rebuilding the Foundation
As we set out to build the new foundation, we made the following major design choices:
Unified metadata schema: We rewrote the metadata subsystem and collapsed the metadata spread across different layers into one unified and flat schema backed by ZippyDB. This paves the way for O(1) lookup to resolve paths to storage addresses, which is a step-function improvement.
No dataplane proxy: We eliminated the dataplane proxy and built a fat client SDK that is capable of streaming bytes directly from storage servers to the clients. This helps with power-efficiency goals and also helps achieve higher throughput/lower latency.
Regional deployment: The BLOB-storage stack is now lean with flexibility to be deployed as a regional or global service. We now deploy a regional BLOB-storage stack colocated with GPUs in every AI region.
imageFigure 3: New request flow for getObject API.
Figure 3 shows the new request flow for getObject(“/bucket/path”). When the SDK on the client receives this API call, it now issues a getReadPlan(“/bucket/path”) request to the API server. The API server does O(1) lookup per chunk to the new metadata store to map the path to (blockId, offset, size) tuples. It then returns the ReadPlanResult to the SDK. The SDK has Tectonic BlockClient embedded within it, and so is now able to stream data from these blocks directly from Tectonic. With these changes, we have rebuilt the foundations and met the goal of adding zero overhead on top of Tectonic. By eliminating the data proxy, we also stay within budget for the power footprint.
Dealing With Spikes and Hot Spots
During data and checkpoint loading, AI workloads are known to access data concurrently across hundreds of GPUs. Subsets of data such as model weights are often “hot,” and events such as GPU restarts trigger sharp traffic spikes. With the foundations now fixed, our next problem was dealing with those spikes and hot spots. Luckily, the BLOB-storage layer has had experience dealing with hot spots over the years, so we adapted existing solutions to AI workloads here. Specifically, we employed two approaches:
Distributed data cache: We leveraged the spare memory on the GPU hosts as a distributed data cache for frequently and concurrently accessed data. To achieve this, we reused components from Meta’s Owl subsystem: We integrated the peers in the Owl subsystem directly into the BLOB-storage client SDK so that all data access goes through this data cache.
Readplan metadata cache: Readplan refers to the mapping from path to storage address. We now cache the read-plan for frequently accessed BLOBs in a distributed-memory store similar to memcache.
In practice we observe an average cache hit rate of 80% on the distributed data cache, and the read-plan cache provides 1-2 ms access to metadata. In essence, these simple mechanisms do three things:
Absorb the spikes and reduce the I/O requirements from storage.
Solve the problem of metadata hot shards.
Improve p50 and p99 latencies by serving from memory.
Protocol Optimizations
What we’ve discussed so far got us 80% of the way. We achieved the remaining 20% by identifying and fixing bottlenecks across the stack. Below are some noteworthy problems, though not an exhaustive list by any means:
Laggards: One slow storage node contributing to tail latencies. This is a well-understood problem, and we resorted to hedged reads on the client side to mitigate this.
Egress spikes: During checkpoint events, it is common for the client to create sharp egress spikes. This in turn can cause congestion, timeouts, and retries, eventually stalling GPUs. We resolved this by building dynamic concurrency control on the client SDK to automatically tune parallelism based on application-level congestion signals.
With all of the above, the new BLOB-storage stack is now capable of serving AI workloads without causing GPU stalls, adding negligible overhead on top of the Tectonic layer. Our next focus shifted to research.
Maximizing Research Velocity
GPUs are scarce and increasingly becoming geo-distributed; at the same time, training workloads need data colocated with GPUs for performance reasons. This creates an interesting challenge for researchers: They are now on the hook for ingesting and moving datasets across regions.
At Meta, a typical training-job submission involves the following:
A researcher curates data from various sources, enriches them and persists them in BLOB storage.
The researcher picks a region where they want to run the job.
The researcher submits a data-ingestion job, which creates a snapshot of the training datasets onto the target region in a file format optimized for data loading from within the GPU host.
The researcher then waits for ingestion to finish; depending on the dataset size, that can take hours.
The researcher submits their training job and monitors their run.
The researcher analyzes outputs, tweaks datasets, and iterates again, starting with Step 3.
Steps 2 through 4 can take hours and directly impact the speed of iteration for researchers. Ideally, we like our researchers’ time to be spent on tuning models, not waiting for storage. Currently, researchers copy snapshots before starting their jobs to colocate data with GPUs, which results in the most optimal performance. While this optimization for performance makes sense for large-scale training jobs that span weeks or months, the vast majority of jobs are much smaller; the researchers owning these jobs are more than willing to trade off occasional performance degradation for iteration speed.
And so, we needed a system where researchers are able to ingest data once and access data anywhere without thinking about regional boundaries. We needed a workflow that allows researchers to iterate in minutes and not hours. As we went back to the drawing board, the write-once, read-many characteristic of these datasets rang a bell. What if we think of storage as a disk in a planet-scale computer and borrow ideas from the operating-system world? When a Linux process running on a CPU core attempts to read a file from disk, the operating system transparently hydrates data on demand across the various layers of the cache—page cache in memory and L2 and L1 CPU caches. This intuition led to the architectural evolution in Figure 4:
imageFigure 4: Dataloading architecture evolution.
The core idea is to leverage the various on-host and off-host storage resources as a tiered cache with global BLOB-storage fabric backed by HDDs as the ultimate source of truth. Specifically, we leverage the memory and flash on the GPU host as L1 and L2 caches. And we leverage the regional BLOB-storage fabric backed by flash as the L3 cache dataloader continues to access storage through the familiar BLOB-storage SDK. To effectively hide latencies and to simplify the data life cycle, we rely on the following:
Dataloader prefetch: Dataloaders prefetch the next batch of datasets into memory while processing the current batch. This prefetch will surface as a read operation at the BLOB-storage SDK level.
Deep prefetch: We expose an explicit prefetch() API as part of the BLOB-storage SDK. The dataloader will trigger explicit prefetch of the data needed during the next few minutes by invoking the prefetch() API in the background. This API triggers hydration of data from remote storage onto the local region L3 cache and also prewarms the metadata cache.
Automatic data life cycle: Data in the L3 regional disaggregated flash tier is typically held for a configured period of time to allow reuse across epochs in a training cycle. We support custom eviction policies, including TTL and LRU policies. The eviction policies are also capacity/quota aware.
We saw rapid adoption of this new data-loading paradigm as soon as production rollout started, and we continue to support both of the data-loading paradigms in production today. To illustrate the impact in numbers, Figure 5 shows roughly the ingestion times before and after the rollout across all workloads:
imageFigure 5: Ingestion times before and after the rollout.
In a world where new frontier models get released in weeks, this shift in the data-loading paradigm is a much-needed change to move even faster.
Key Takeaways
Modern AI workloads are data hungry, and storage plays an important role in both the computational cost and speed of innovation. Storage bottlenecks directly impact GPU utilization and computational cost, and in a world with geo-distributed GPUs, time spent on cross-region data ingestion directly impacts the speed of iteration in research. The BLOB-storage architecture at Meta was built to serve Meta’s family of apps, and we needed a step-function improvement in performance to serve AI workloads. This led to rethinking the entire architecture. By rebuilding the metadata subsystem and by adopting a tiered caching architecture with prefetching/on-demand hydration, we are able to meet the needs of today’s workloads effectively.
Future Work
We are continuously evolving storage at Meta to keep up with hardware evolution and workload demands. Some future work in this area will include:
Scaling storage to network limits.
Supporting checkpointing without stalling GPUs at even higher scale.
New challenges for inference workloads, which we are starting to tackle.
The post Meta’s AI Storage Blueprint at Scale appeared first on Engineering at Meta.
AI算出
技術分析ainew評価高い
AI の脳と記憶の関係性を論じ、GPU 利用効率向上のための具体的なアーキテクチャ(Tectonic, erasure-coding など)を開示しており、実装や設計の参考となる独自情報を含む。ただし日本企業への直接的な影響や日本語一次情報の欠如により、関連性は限定的である。
6つの評価軸を見る
- AI関連度
- 75
- 情報源の信頼性
- 100
- 新規性
- 75
- 調べる価値
- 75
- 重複の少なさ
- 100
- 日本での有用性
- 25
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み