﻿# Lustre directory stripes distribute metadata, not file data

Striping a directory across MDTs addresses namespace work. Separate its hash and inheritance from OST file striping before optimizing file-per-worker checkpoints.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/lustre-striped-directory-mdt-placement/
Language: en

## Many files create a namespace problem

A distributed checkpoint writer creates a file per worker in a shared output directory. Creation and lookup slow down even though bulk storage devices have spare bandwidth. Striping that directory across metadata targets can address a different bottleneck from striping each file across object storage targets.

The [directory-striping manual](https://raw.githubusercontent.com/lustre/lustre-release/master/Documentation/man1/lfs-setdirstripe.1) describes MDT placement and filename hashing. The separate [file-striping manual](https://raw.githubusercontent.com/lustre/lustre-release/master/Documentation/man1/lfs-setstripe.1) describes OST data layouts. Confusing these controls can produce a layout change that never acts on the operation that is slow.

## Identify the pressured operation

Separate directory creation, file creation, lookup, enumeration and bulk read/write time. A successful metadata optimization need not change sequential throughput for a large checkpoint file. Conversely, increasing data stripe count cannot be assumed to relieve a single busy directory's namespace operations.

Record the distribution of filenames and the number of active publishers. Directory hashing determines where entries reside, so an artificial naming pattern may produce a different placement from the real writer. Avoid selecting a testing-only hash because it happens to suit a synthetic sequence.

## Inspect actual and inherited layouts

The [getdirstripe manual](https://raw.githubusercontent.com/lustre/lustre-release/master/Documentation/man1/lfs-getdirstripe.1) distinguishes a directory's current layout from the default used for new subdirectories. Capture the master MDT, stripe count, hash and relevant inheritance settings. A newly configured default does not establish that existing subdirectories changed.

Inspect representative files separately with their data-layout tools. Keep directory metadata placement and OST object placement as different evidence columns. The same pathname participates in both, but neither listing can substitute for the other.

## Avoid universal directory fanout

The setdirstripe manual cautions that striping every directory across every MDT can increase RPC work and hurt performance. A large shared output directory and a deep tree of tiny directories have different access costs. Apply the candidate policy to the narrow namespace shape that needs it.

Use a disposable directory tree with the actual filename distribution and creation concurrency. Include enumeration and cleanup, not just creation. A layout that makes writes look faster but creates unacceptable listing or recovery overhead may fail the application's complete workflow.

## Evidence for accepting the namespace layout

Acceptance should show the intended directory layout, successful worker publication and acceptable metadata-operation behavior under the recorded concurrency. Validate that the checkpoint's complete file set is discoverable and that failed workers do not leave publication ambiguous.

[Storage placement fundamentals](/journal/storage-optimized-hosting/) provide the wider distinction between metadata and data bottlenecks. [Checkpoint consistency](/journal/guide-storage-filesystem-snapshot/) explains why a complete-looking directory listing is still weaker than restoring the expected application state.

## Limits of metadata distribution

MDT striping does not guarantee independent hardware failure domains or a faster single-file read. It also does not create a transaction across worker outputs. Preserve both the namespace layout and the application publication contract in the final record. No performance result is asserted here: the procedure identifies the control surface and observations needed to test a specific namespace bottleneck.
