Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 11 min read Case study mediumAdept

Scaling data ingestion for machine learning training at Meta

Meta's disaggregated Data PreProcessing tier (DPP) reads training data from the Tectonic file system, decodes it, extracts features and turns it into tensors for ML training. Because GPU performance is outpacing CPU and storage, many recommendation models are limited by data ingestion, and in power-constrained data centers that caps how many accelerators can be deployed. Four optimizations cut the data ingestion power budget by 35-45%. Storing each feature as its own on-disk stream (feature flattening with projection) raised reader throughput 2-2.3x, and client-side rebatching added 20-40%. A column-major FlatMap in-memory format added 9-17%, and storing features that are usually read together next to each other on disk cut storage-to-reader transfer by 45-55%. Future work includes HDD+SSD tiered storage and moving preprocessing onto GPUs.

Assumes: columnar storage formatsML training pipelinesmemory bandwidth bottlenecks

Related posts

  • Meta’s AI Storage Blueprint at Scale

    Meta Engineering mediumAdept

    Meta rebuilt its BLOB-storage stack on top of the Tectonic block layer to stop storage from stalling GPUs in AI training. The rebuild collapsed multi-layer metadata into a flat ZippyDB schema with O(1) path-to-block lookups, replaced the dataplane proxy with a fat client SDK that streams directly from Tectonic, and deployed regional stacks colocated with GPUs. Hot spots and spikes are absorbed by a distributed data cache in spare GPU-host memory (Owl, ~80% hit rate) and a read-plan metadata cache (1-2 ms). Tail latency is handled with hedged reads, and checkpoint egress spikes with client-side dynamic concurrency control. To cut multi-hour cross-region ingestion, storage is treated as a tiered cache: host memory and flash as L1/L2, regional flash as L3 with TTL/LRU eviction, HDD-backed global storage as the source of truth, plus an explicit prefetch() API for on-demand hydration.

  • Streaming datasets: 100x More Efficient

    Hugging Face mediumAdept

    Hugging Face reworked streaming in the `datasets` library so multi-terabyte datasets can feed large training jobs directly from the Hub, keeping the same `streaming=True` API. The fix for request storms, where every DataLoader worker resolved data files independently, is a persistent data-files cache shared across workers plus batched resolution calls, cutting startup requests up to 100x and making file resolution 10x faster. Parquet prefetching and configurable PyArrow buffer and range sizes roughly double streaming throughput. They report that at 64xH100 with 256 workers, streaming matched local SSD reads. Xet deduplicated storage with Parquet content-defined chunking speeds transfers, and an improved HfFileSystem supports custom streaming pipelines.

  • From Chunks to Blocks: Accelerating Uploads and Downloads on the Hub

    Hugging Face mediumAdept

    Hugging Face's Xet storage backend uses content-defined chunking for deduplication but avoids per-chunk overhead by aggregating chunks into content-addressed blocks of up to 64MB and using shards to map files to chunks. That cuts CAS entries roughly 1,000x. A global index over key chunks, a 0.1% subset picked by hash modulo, exploits spatial locality to find shards for deduplication without a network query per chunk. On a 191GB repo of 29 Gemma-2-9B GGUF quantizations, only about 97GB of unique blocks were stored, nearly halving upload time. Local chunk caching also avoids re-downloading unchanged data.

  • How Meta trains large language models at scale

    Meta Engineering easyNovice

    Training LLMs at Meta shifted workloads from many small recommendation jobs to a few enormous GPU jobs, forcing changes across hardware, data center layout, reliability, networking and storage. Meta adapted its Grand Teton H100 platform (700W TDP, HBM3, still air-cooled), repacked data halls for GPU density, and tracks common failure modes such as GPUs dropping off PCIe, DRAM/SRAM uncorrectable errors and network cable faults. Instead of choosing between fabrics, it built two 24K-GPU clusters, one RoCE and one InfiniBand, and tuned both to equivalent performance for Llama 3 training. The tuning relied on topology-aware placement of parallelism traffic, custom collectives such as recursive doubling/halving in place of rings, and load balancing to handle fat flows.

  • How we scaled metrics aggregation by moving durable state into storage

    Datadog Engineering mediumAdept

    Datadog's metrics aggregation service, which merges DDSketch distributions to reduce tag dimensions, went through three generations as volume grew roughly 10× each time. Static leader-follower partitions with local RocksDB doubled compute and needed manual partition splits. Dynamic Kafka assignment with incremental SSTable snapshots to blob storage and time-windowed lazy restore improved recovery and enabled autoscaling, but state recovery then became the bottleneck. The third generation makes streaming aggregation and deduplication best-effort. Both storage tiers reconcile partial aggregates, duplicates and late data during reads and compaction, so workers can restart at the live edge without restoring hours of state and can be provisioned for current traffic.

The quest for software engineering knowledge.

Look:
Layout: