Skip to content
Make in India OEM · INR-transparent · Pan-India onsite SLATalk to sales: +91 720 794 8743Sign in

The Small-File and Metadata Problem in AI Training Storage

Concept Updated 19 Aug 2026 · 7 min read

Overview

A storage system that streams 100 GB/s can still starve GPUs when the dataset is 50 million 100 KB images. The reason is that every file open is a metadata operation – lookup, permission check, attribute fetch – and metadata operations are served by a different, usually much smaller, part of the storage system than bulk reads. For small-file workloads the numbers that matter are metadata ops per second and small-block IOPS, not GB/s. The fixes are known: pack small files into large shards, scale or distribute the metadata service, and stage hot data onto node-local NVMe.

The Small-File and Metadata Problem in AI Training Storage
What you’ll learn: where the per-file cost actually goes, how metadata services scale in Lustre-style and distributed-metadata filesystems, which benchmark numbers predict small-file behaviour, and the dataset-packing formats that remove the problem at the source.

Key takeaways

  • Reading one small file costs one or more metadata round trips plus a small read; at 100 KB per file, a modest 4 GB/s of useful data can require 40,000+ file opens per second – a metadata load many systems cannot serve.
  • Classic parallel filesystems concentrate metadata on dedicated servers (Lustre MDS, BeeGFS metadata services); these become the bottleneck long before the data servers do.
  • Distributed-metadata designs (WEKA, DAOS, Storage Scale) and Lustre DNE spread that load, but no filesystem makes per-file overhead free.
  • The durable fix is packing: WebDataset tar shards, TFRecord, Parquet, or similar formats convert millions of opens into large sequential reads.
  • Benchmark with mdtest and fio small-random profiles, not just sequential bandwidth – vendors rarely lead with metadata numbers.

Where the time actually goes

Opening a file on a POSIX parallel filesystem involves a path lookup, permission and attribute checks, and often a layout query telling the client which data servers hold the content – each a network round trip to a metadata service. For a 10 GB file, that one-time cost is noise. For a 100 KB file it can exceed the transfer time itself: at 1 ms of effective metadata latency, a dataloader thread manages barely 1,000 files per second regardless of how fast the data path is. Multiply by shuffled access order (defeating readahead) and thousands of dataloader workers across a cluster, and epoch time becomes a metadata benchmark. Storage vendors’ own workload analyses – for example the ResNet-50 pattern used in MLPerf Storage, which reads ~100 KB samples – exist precisely because this pattern dominates vision and multimodal training.

How metadata services scale

Architectures split into two camps. Centralised: Lustre’s MDS/MDT design serves metadata from dedicated servers; scaling means adding MDTs via DNE (Distributed Namespace) and placing them on flash, which works but requires deliberate namespace design (striped directories, careful placement of hot directories). BeeGFS behaves similarly with its metadata services. Distributed: WEKA, DAOS, and IBM Storage Scale spread metadata handling across many or all nodes, so metadata throughput grows with the cluster. The practical consequence: on a centralised design, one hot directory with 10 million files lands on one server; on a distributed design it is sharded. Our parallel filesystem comparison covers which camp each product sits in.

IOPS and metadata ops versus GB/s

Sequential bandwidth is the cheapest number for a vendor to make large, which is why it headlines datasheets. For small-file training the load profile is different: high 4-128 KB random read IOPS on the data path, and tens of thousands of opens, stats, and closes per second on the metadata path. When evaluating, ask for (or measure) three numbers: file creates per second, stats per second, and 64 KB random read IOPS at your target client count. A system quoting 200 GB/s but 50,000 metadata ops per second will train ResNet-class workloads worse than a smaller system quoting 20 GB/s and 500,000 metadata ops. Measurement method is covered in benchmarking AI storage.

Fix it at the source: pack the dataset

The highest-leverage fix costs no hardware. Packing formats bundle thousands of samples into large files read sequentially: WebDataset (tar shards, streaming-friendly, PyTorch-native), TFRecord (TensorFlow lineage), Parquet or Arrow for tabular and text, FFCV and similar loaders for vision. A 50-million-image dataset becomes perhaps 5,000 shards of 1 GB; file opens drop by four orders of magnitude and the storage system sees the sequential streams it was built for. The costs are real but modest: a preprocessing pipeline, loss of per-file random access (mitigated by shard-level shuffling), and re-packing when the dataset changes. Almost every large training operation converges on packing; doing it before you size storage can shrink the metadata requirement dramatically.

Fix it in the platform: cache and stage

Where packing is impractical – long-tail research datasets, many small teams, code and Python environments – platform mitigations help: metadata on dedicated NVMe (mandatory in any 2026 design), client-side caching of attributes and directory entries, and staging hot datasets onto node-local NVMe before the job starts, which converts shared-metadata load into local ext4/xfs operations that are an order of magnitude cheaper. The staging pattern is detailed in local NVMe scratch vs shared storage.

What matters per workload

Workload pattern Dominant storage demand Number to check First mitigation
LLM pretraining on packed shards Sequential read bandwidth GB/s per client and aggregate Already packed; size bandwidth
Vision / multimodal, raw files Metadata ops + small-read IOPS Opens/s, stats/s, 64K IOPS Pack to WebDataset/TFRecord
Fine-tuning, many experiments Mixed small I/O, hot directories Metadata ops/s under concurrency Node-local staging
Python envs / code on shared FS Stat-heavy traversal Stats/s, attribute cache behaviour Container images or local copies
Checkpoint write bursts Sequential write bandwidth Sustained GB/s write See checkpoint sizing article

Measuring before you buy

Two tools give you the truth cheaply. mdtest (part of the IOR suite) measures file create, stat, and delete rates at scale and is the metadata component of the IO500 benchmark; run it at your real client count, not from one node. fio with 4-64 KB random-read profiles at realistic queue depths covers the data side. Then replay a slice of your actual dataloader – a one-hour PyTorch run with your dataset layout – because attribute caching, readdir behaviour, and client tuning interact in ways synthetic tools miss. Insist on running these during any proof of concept; a vendor unwilling to let you run mdtest is telling you something.

Frequently asked questions

How many files count as a small-file problem?

It is a rate, not a count: trouble starts when required file opens per second exceed what your metadata service delivers. As a rough screen, datasets beyond a few million files under ~1 MB each deserve packing or a distributed-metadata design.

Does adding more OSTs or data servers help?

Not for this problem. Data-server scaling raises bandwidth and data IOPS; file opens are served by metadata services, which scale separately (more MDTs, or a distributed-metadata filesystem).

Is object storage immune to the small-file problem?

No – small objects carry per-request overhead too, and S3-style listing is expensive. Object stores avoid POSIX attribute semantics, which helps, but packing small samples into large objects is still standard practice.

What metadata performance should I ask a vendor for?

File creates, stats, and opens per second at your client count, measured with mdtest or equivalent, on the configuration you would buy. Ask how metadata is stored (dedicated flash? distributed?) and what happens when one hot directory dominates.

Will NVMe everywhere make this go away?

Flash metadata targets raise the ceiling substantially but do not remove per-file network round trips or POSIX semantics. Packing remains the only fix that changes the workload itself.

Ready to deploy?

Talk to an RDP architect about power, cooling and lead time.

Request a Quote