youtube
Decoupling long user sequences from monolithic training rows into an optimized key-value store reduced storage costs tenfold, averting an infrastructure crisis that consumed 10% of Meta's global data center power.
AI-assisted summary of How Meta Scaled AI Training Storage via Data Normalization | Sarang Masti and Weiran Liu from Meta — original source. Check the original for full context.
Source published:
Key ideas
- Adopting long user sequences expanded Meta's AI training data to tens of exabytes across 10+ data centers, consuming 10% of the company's total power budget and forcing severe downsampling. (1:21)
- To counter extreme duplication from logging identical user histories in every recommendation row, Meta normalized its training data by storing lightweight pointer keys in warehouse tables and moving raw sequences into ZippyDB. (6:22)
- Engineers resolved major early throughput and latency bottlenecks in ZippyDB and RocksDB by bypassing the write path via offline SSTable generation, adding parallel multi-scans with I/O coalescing, and pushing down schema-aware projection and truncation. (10:52)
- The optimized Sequence Storage system increased per-server read throughput fivefold (from 200 MB/s to over 1 GB/s) and scaled maximum sequence lengths by 40x (from 2,000 to 80,000 events) across more than 30 production recommendation models. (17:25)
Detailed notes
## Background Presented at the @Scale Conference and published on YouTube on June 19, 2026, this technical talk features Meta engineers Sarang Masti and Weiran Liu detailing how Meta scaled AI training storage for its recommendation systems. The presentation description highlights how shifting to rich user sequences inflated feature footprints by 10x to 100x, causing massive duplication in legacy relational tables, and how a co-designed indexing and storage architecture cut sequence storage costs tenfold.
## TL;DR To improve recommendation quality, Meta transitioned from condensed feature summaries to long user interaction sequences, inadvertently triggering a storage crisis that ballooned data footprints across more than 10 data centers and consumed 10% of the company's power budget. The team solved this by normalizing the training data: retaining lightweight pointer keys in warehouse tables while offloading raw sequences into ZippyDB. When initial iterations introduced severe read amplification and join latency, Meta implemented offloaded SSTable generation in Spark and Presto, added parallel multi-scan and I/O coalescing to RocksDB, and pushed projection and truncation down into the storage engine. These optimizations boosted per-server read throughput fivefold, expanded supported sequence lengths from 2,000 to 80,000 events across 30+ production models, and paved the way for lifetime user sequence modeling.
## Atmosphere & style The presentation carries the polished, authoritative, and deeply technical tone characteristic of high-stakes infrastructure conferences. Liu and Masti deliver a measured, pragmatic narrative that transitions from an urgent macro-level capacity crisis into granular systems-level post-mortems, speaking with candid transparency about early design iterations that initially fell short on cost. The talk feels like an insider masterclass in systems engineering, maintaining a disciplined focus on bottlenecks, hardware mechanics, and the end-to-end co-design required to make exabyte-scale ML viable.
## Bulletin - [01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) Adopting long user sequences expanded Meta's AI training data to tens of exabytes across 10+ data centers, consuming 10% of the company's total power budget and forcing severe downsampling. - [06:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=382s) To counter extreme duplication from logging identical user histories in every recommendation row, Meta normalized its training data by storing lightweight pointer keys in warehouse tables and moving raw sequences into ZippyDB. - [10:52](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=652s) Engineers resolved major early throughput and latency bottlenecks in ZippyDB and RocksDB by bypassing the write path via offline SSTable generation, adding parallel multi-scans with I/O coalescing, and pushing down schema-aware projection and truncation. - [17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) The optimized Sequence Storage system increased per-server read throughput fivefold (from 200 MB/s to over 1 GB/s) and scaled maximum sequence lengths by 40x (from 2,000 to 80,000 events) across more than 30 production recommendation models.
## Key takeaways - [00:05](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=5s) Prior training storage optimizations like columnar compression, row/column reordering, and model-aware placement proved insufficient once model features grew 100x larger. - [01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) Long chronological user sequences drastically improve recommendation quality compared to static summary features, making sequence length directly correlated with model performance. - [01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) The rapid growth of user sequences overwhelmed data center capacity, forcing engineers to cut training data retention down to 30 days and sacrifice annual seasonality learning. - [04:06](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=246s) The legacy training architecture snapshotted all features inline within self-contained rows, causing massive duplication because a user's sequence changes minimally between frequent recommendations. - [06:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=382s) Meta adapted relational database normalization by keeping primary rows on warm HDD storage with sequence ID pointers while offloading raw sequences into ZippyDB. - [08:46](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=526s) V1 of Sequence Storage was as expensive or more costly than duplicated storage because ZippyDB was tuned for OLTP rather than high-throughput batch AI training reads. - [10:52](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=652s) Continuous row-by-row writes in RocksDB created deep LSM trees and aggressive background compactions, causing severe read amplification and starving flash bandwidth. - [10:52](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=652s) Using Spark and Presto to generate pre-compacted, sorted SSTables offline allowed ZippyDB to bypass memtables and WALs, achieving a single-level LSM layout with roughly one flash I/O per read. - [13:44](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=824s) RocksDB's lack of native multi-scan originally forced serial range scans whose latencies stacked cumulatively, creating pipeline stalls for GPU training workers. - [13:44](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=824s) Implementing parallel multi-scans and I/O coalescing in RocksDB grouped adjacent disk block reads, reducing media IOPS and bounding batch latency to the single slowest scan. - [15:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=922s) Because raw key-value storage is schema-agnostic, training workers initially had to download full sequence blobs over the network before filtering unneeded attributes on client CPUs. - [15:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=922s) Pushing feature projection and length truncation down into ZippyDB cut transmitted network data and GPU client parsing loads to about one-third of their previous volume. - [17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) The project demonstrates that modern AI training storage requires end-to-end co-design across offline data pipelines, core storage engines, and GPU ingestion layers. - [19:28](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1168s) Meta's future sequence storage roadmap targets scaling sequence length by another 10x to capture lifetime user history (hundreds of thousands of events) and generalizing the normalized architecture to all ML features.
## Detailed walkthrough ### [00:05](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=5s) Scaling Challenges and Meta's Traditional Storage Optimizations
Weiran Liu introduces the talk alongside his colleague Sarang Masti, setting the stage for how Meta built "Sequence Storage" to scale training data pipelines for next-generation recommendation systems. Across the recommendation systems industry, storing training data has evolved into a massive, exabyte-scale bottleneck. Recommendation models require exabyte-scale data to achieve high predictive accuracy, making storage scalability a primary operational priority across Meta's infrastructure.
Over recent years, Meta heavily funded and developed storage infrastructure to stay ahead of this rapid growth. Prior optimizations focused on four primary techniques: columnar compression, row reordering, column reordering, and model-aware placement. By actively exploiting similarities across rows and columns alongside observed access patterns, engineering teams compressed data much tighter and minimized unnecessary physical copies. These techniques performed remarkably well for classic recommendation workloads consisting primarily of standard dense and sparse features—until an entirely new modeling paradigm broke the existing assumptions.
- **Primary classical optimization levers**: Columnar compression, row reordering, column reordering, and model-aware physical placement. - **Goal of classical techniques**: Exploit data similarities and common model access patterns to minimize redundant physical data copies.
---
[01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) The Rise of User Sequences and the Exabyte Storage Crisis
The new data paradigm that "changed everything" is the adoption of long user sequences. Rather than relying on static, summarized snapshots, user sequences capture a user's raw chronological interaction history spanning anywhere from several months to years. This provides an information-dense representation that bundles detailed user behaviors, deep content-understanding data, and fine-grained contextual signals. Because of this extreme information density, user sequences are 100x larger (or more) than traditional sparse and dense features.
Over the past three years, Meta pivoted its recommendation modeling to rely heavily on user sequences for both digital advertising and organic content recommendations. Meta published multiple papers demonstrating that sequence length is directly correlated with model quality: the longer the user sequence history provided, the better the recommendation quality became.
```mermaid flowchart TD accTitle: Transition from Traditional Features to Sequence Data accDescr: Diagram illustrating how the adoption of 100x larger user sequences drove training storage into tens of exabytes across data centers.
subgraph Traditional["Traditional Modeling"] A["Dense & Sparse Features\n(Condensed Summaries)"] --> B["Warehouse Relational Tables\n(Self-contained Rows)"] end
subgraph ParadigmShift["User Sequence Paradigm"] C["Months-to-Years of User History\n(100x+ Feature Size)"] --> D["Storage Explosion\nTens of Exabytes"] end
Traditional -.->|"Shift to Sequences (2023+)"| ParadigmShift D --> E["Capacity Saturation\n(10+ DCs, 10% Power Budget)"] E --> F["Aggressive Downsampling &\nLost Seasonal Context"] ```
However, this modeling success created a severe storage crisis. By 2023, user sequences became the single dominant driver of training storage growth, overwhelming previous columnar compression and data placement efficiencies. Training data expanded to tens of exabytes across more than 10 global data centers, consuming an astonishing 10% of Meta's total power budget. Because of hard capacity limits in the data centers, teams were forced into aggressive workarounds: - Engineers had to continuously downsample incoming logs, discarding valuable training samples upfront before they could ever be used. - Data retention windows in many pipelines shrank to just 30 days, completely wiping out long-term historical learning such as annual seasonality patterns. - Experimenting with newer data formats became excruciatingly slow, requiring expensive and time-consuming generation of massive raw data volumes.
Recognizing that the old approaches were no longer viable, the team set out to re-architect training data generation from first principles, focusing on eliminating duplication through normalization.
---
[04:06](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=246s) Analyzing Training Rows and Root Causes of Data Duplication
Sarang Masti takes over to break down the mechanics of the existing AI training stack and pinpoint why user sequences caused storage footprints to balloon. In Meta's legacy architecture, a "training row" is logged during online inference, capturing an exact, self-contained snapshot of all ML features evaluated at recommendation time, combined with an outcome label indicating whether the user interacted with the recommendation. Collections of these rows over specific time windows make up a "training table." During training, a preprocessing worker reads these rows, reconstructs the training samples, and streams them into GPUs.
This legacy model favored fully self-contained rows where every feature was snapshotted inline. The design had clear historical advantages: sample reconstruction was trivial and fast, as the preprocessor only needed to perform a single, sequential read of a row with zero external lookups.
When features consisted of tiny, highly condensed summaries, this trade-off made sense. But analyzing training tables across the company revealed massive data duplication. Because a user's behavior history changes very little—or not at all—between two recommendation requests issued minutes or hours apart, subsequent training rows for the same user repeatedly logged identical feature states. Once features shifted to massive user sequences that were 100x larger, duplicating that history inline on every single interaction quickly broke the economics of the warehouse.
---
[06:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=382s) Sequence Storage: Normalizing Training Tables via ZippyDB
To solve the duplication explosion, Meta adapted classical relational database normalization. Instead of storing massive user sequences inline within every self-contained training row, the data is split across two separate systems:
1. **Normalized Training Table**: The primary training rows remain in the data warehouse on cost-effective, warm hard-disk drive (HDD) storage. However, the sequence features are stripped out and replaced with compact, lightweight pointer keys referencing unique user sequence IDs. 2. **User Sequence Table**: The large, raw user interaction sequences are extracted and written to a dedicated, high-performance indexable key-value store, keyed by user sequence ID.
```mermaid flowchart LR accTitle: Sequence Storage Normalized Architecture accDescr: Architecture showing training rows on HDD warehouse referencing sequences in ZippyDB, joined by a training preprocessor for GPU ingestion.
subgraph Storage["Normalized Storage Layer"] TT["Training Table\n(Warm HDD Warehouse)\nRows with Lightweight Keys"] ST["User Sequence Table\n(ZippyDB Key-Value Store)\nKey: Sequence ID | Value: Sequence"] end
subgraph Compute["Training Pipeline"] TP["Training Preprocessor\n(Connector Join Engine)"] GPU["AI Training GPUs"] end
TT -->|"Read Sample Metadata"| TP ST -->|"Point Lookup / Fetch Sequence"| TP TP -->|"Reconstructed Training Batch"| GPU ```
For the indexed storage layer, Meta leveraged ZippyDB, its internal distributed key-value store, designed to handle high-volume point lookups. While this decoupled architecture immediately slashed duplicate bytes, it introduced a new systems bottleneck: reconstruction complexity. Instead of simple streaming scans, the training preprocessor must now perform real-time joins, reading rows from the warehouse and firing off point lookups into ZippyDB to assemble training batches on the fly. Normalization is only economical if this join overhead does not introduce runaway server costs or GPU starvation.
---
[08:46](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=526s) Early Inefficiencies and Storage Bottlenecks
The first deployed iteration of Sequence Storage fell short of performance and cost targets. In fact, Masti notes that V1 was so inefficient that the total infrastructure footprint ended up being "as costly or if not more" expensive than the naive approach of storing bloated, duplicated rows in the warehouse.
In hindsight, this friction was predictable: ZippyDB was originally built and tuned for standard OLTP-style application workloads, not high-bandwidth batch AI training ingestion. Similarly, the training preprocessor had never been designed to orchestrate high-concurrency join mechanics at this scale. To make Sequence Storage viable, Meta had to re-engineer both sides of the pipe, focusing heavily on reducing the cost per gigabyte-per-second ($/GB/s) of read throughput delivered by the storage servers.
The team diagnosed two primary server-side bottlenecks that had to be addressed: - **Severe read amplification**: Training access patterns caused storage nodes to read significantly more physical data than the logical payload requested, throttling effective throughput. - **Elevated read latency during index joins**: Latencies incurred while resolving sequence pointers into ZippyDB caused pipeline stalls that left expensive GPU accelerators underutilized.
[10:52](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=652s) Offloaded SSTable Generation and Compaction
Populating the initial key-value storage engine using conventional row-by-row insertions triggered continuous, aggressive background compactions inside RocksDB. These background compactions consumed an enormous share of database server resources, specifically flash write bandwidth and CPU cycles, putting them into direct competition with read-serving workloads. Furthermore, the row-by-row write path produced a deep Log-Structured Merge-tree (LSM tree). Reading a single user sequence required traversing multiple levels of SSTable files from the top level down to the bottom, causing severe read amplification on the underlying flash media. Because substantial resources were tied up servicing writes and each read generated multiple flash I/O operations, overall read throughput on the storage servers was severely constrained.
To eliminate this bottleneck, the team introduced an offloaded SSTable compaction and optimization pass. In ZippyDB, they added an ingestion API capable of directly loading pre-generated SSTables from external systems, completely bypassing the write-ahead logs (WAL), memtables, and the CPU-intensive row-by-row insertion pipeline. They updated offline query engines—specifically Apache Spark and Presto—to natively read and write RocksDB SSTable files. This enabled offline data pipelines to periodically compact, sort, optimize, and index sequence data outside the live ZippyDB serving cluster. Once the final SSTables are generated, they are ingested into ZippyDB to replace older files, flattening the database layout into an LSM structure optimized purely for read performance.
```mermaid flowchart LR accTitle: Offloaded SSTable Generation Pipeline accDescr: Spark and Presto process raw data and produce SSTables that are directly loaded into ZippyDB, bypassing the write-ahead log.
subgraph Offline["Offline Processing Pass"] A["Raw Sequence Data"] --> B["Spark & Presto Pipelines"] B --> C["Compacted & Indexed SSTables"] end
subgraph Serving["ZippyDB Storage Engine"] C -->|"Direct SSTable Ingestion API"| D["Single-Level LSM Tree"] D -->|"~1 Flash I/O per Read"| E["Training Clients"] end ```
- Row-by-row writes caused severe I/O amplification across multiple LSM tree levels, consuming CPU and flash bandwidth needed for read queries. - Bypassing the server-side memtable and WAL via direct SSTable loading freed up server-side write budgeting. - Externalizing SSTable creation allowed Spark and Presto to produce pre-indexed, compact files. - The resulting single-level LSM tree achieved roughly "one IO per read" directly from flash.
---
[13:44](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=824s) RocksDB Parallel Multi-Scan and I/O Coalescing
When looking into read latency, the team found that read scans across user sequences were executing serially. Because RocksDB lacked native multi-scan support, ZippyDB processed batches of range scans one after the other. Under this serial scan model, the latency for querying a batch of user sequences equaled the aggregate sum of every individual scan latency. This elevated latency posed a direct risk of training GPU QPS regressions, as high-performance accelerators frequently stalled while waiting for sequential batch fetches to complete across the network.
To resolve this, the engineers implemented a native multi-scan capability within RocksDB. When a batch of reads arrives through the new multi-scan API, RocksDB inspects the requested ranges to discover adjacent disk blocks and identify I/O coalescing opportunities. Whenever two read requests touch neighboring physical blocks, RocksDB coalesces them into a single continuous scan instead of issuing two distinct operations. Once coalesced ranges are determined, the engine issues those I/O requests in parallel across the underlying media. Consequently, media IOPS dropped significantly, and overall batch latency collapsed from the cumulative sum of all scans to "only decided by the single slowest scan", boosting GPU utilization.
---
[15:22](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=922s) Pushdown Optimizations: Feature Projection and Length Truncation
A third major efficiency barrier stemmed from data over-fetching. Traditional key-value engines like RocksDB and ZippyDB treat keys and values as opaque byte blobs without any schema awareness. However, a user sequence is not arbitrary data; it is structured as a time series of discrete interaction events (effectively a list of structs), where each event contains numerous individual attributes. In practice, specific recommendation models only care about events within defined historical time windows and only need a small subset of the attributes associated with each event. Without schema awareness in the storage layer, the entire sequence had to be shipped over the network to the GPU training hosts, where the clients performed filtering in user space. This created a dual penalty: high network bandwidth usage and substantial client-side CPU overhead to parse and discard unwanted data.
To eliminate this transfer waste, the team made the ZippyDB query engine schema-aware, enabling it to deserialize user sequence values on demand directly on the storage server. With schema inspection enabled, they implemented two server-side pushdown optimizations: 1. **Feature projection:** Deconstructs the decoded key-value structs and discards unrequested event attributes before building the network response. 2. **Length truncation:** Filters the event time series to retain only the specific time window required for a given training sample.
By pushing attribute projection and sequence truncation down into ZippyDB, the total volume of data transmitted over the network and parsed by the GPU training workers was reduced to roughly one-third of its original footprint.
---
[17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) Production Results and Key Architectural Takeaways
Implementing these storage-layer optimizations produced dramatic efficiency gains across Meta's recommendation infrastructure. Storage server read throughput jumped by roughly 5x, expanding from an initial 200 MB/s to over 1 GB/s per server node, drastically lowering hardware footprint and operational costs. Furthermore, the maximum supported sequence length increased from 2,000 events to 80,000 events—an almost 40x leap—without imposing significant storage cost penalties. As of the presentation, the normalized sequence storage platform operates in production serving more than 30 distinct recommendation models across Meta's product families.
Sarang Masti summarized three high-level lessons learned from redesigning the training storage stack: - **Training data scale is a critical, persistent bottleneck:** Meta has reached the ceiling of affordable relational storage, with high-capacity sequence features threatening to expand data footprints by 5x to 10x. - **Normalization is the only viable path forward:** When features were compact, aggregated summary statistics, storing duplicated snapshots alongside training labels was an acceptable trade-off to optimize sequential I/O. For rich, raw sequences, data duplication is economically non-viable. - **Modern AI/ML storage requires full-stack co-design:** Capturing the benefits of data normalization required end-to-end modifications spanning offline preprocessing (Spark/Presto), internal storage engine mechanics (RocksDB and ZippyDB), and model ingestion pipelines on the GPU clients.
---
[19:28](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1168s) Future Roadmap: Lifetime Sequences and Canonical Feature Storage
Meta's sequence storage roadmap focuses on two primary initiatives. The first is scaling sequence length by another order of magnitude. While the production system reliably handles 80,000 events per user, the team's long-term North Star is a 10x expansion to capture comprehensive "lifetime user history". Pushing into hundreds of thousands of events per user introduces new latency, hardware reliability, and cost hurdles, prompting active exploration into advanced data compression, smarter encodings, and hierarchical storage tiering across different physical media.
The second initiative involves expanding the architecture beyond user sequences into a generalized feature platform. Meta intends to apply the normalized indexing infrastructure built for sequence storage to item features, content metadata, and dense embedding tables. The ultimate vision is establishing a single canonical, normalized storage architecture for all machine learning training data across Meta.
## Notable quotes > [00:05](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=5s) Across the recommendation systems industry, storing training data has evolved into a massive, exabyte-scale bottleneck. — Weiran Liu
> [01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) The new data paradigm that "changed everything" is the adoption of long user sequences. — Weiran Liu
> [01:21](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=81s) Training data expanded to tens of exabytes across more than 10 global data centers, consuming an astonishing 10% of Meta's total power budget. — Weiran Liu
> [08:46](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=526s) as costly or if not more — Sarang Masti
> [10:52](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=652s) one IO per read — Sarang Masti
> [13:44](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=824s) only decided by the single slowest scan — Sarang Masti
> [17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) Training data scale is a critical, persistent bottleneck — Sarang Masti
> [17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) Normalization is the only viable path forward — Sarang Masti
> [17:25](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1045s) Modern AI/ML storage requires full-stack co-design — Sarang Masti
> [19:28](https://www.youtube.com/watch?v=ZyAoUSmbntI&t=1168s) lifetime user history — Sarang Masti
## Mentioned Sarang Masti, Weiran Liu, Meta, ZippyDB, RocksDB, Apache Spark, Presto, @Scale Conference
## Video description Training data for Meta's recommendation systems was entirely stored in Data Warehouse, structured as relational tables where each row captures labels and snapshotted features at the point of recommendation.
New modeling techniques, such as learning from user sequences and multi-modality, has led to a 10-100x increase in feature size, making the training data increasingly cost-prohibitive due to high duplication. The same user's features are stored repeatedly for every recommendation request, with highly popular content features being duplicated potentially over a million times.
We present a co-designed data and infrastructure in order to address the scaling challenge. By moving features out of training samples into a high-performance indexing storage and implementing model access pattern-aware pushdown optimizations, we have achieved a 10x storage cost reduction for the largest feature: long user sequences.
Want to learn more about the @Scale Conference? Visit our website here: atscaleconference.com
[Source](https://www.youtube.com/watch?v=ZyAoUSmbntI)