Curriculum / Part 4 · Parallel filesystems
Lesson 17

Lustre architecture

Lustre's building blocks (MGS, MDS/MDT, OSS/OST, clients), how striping spreads a file, and how to inspect and change layouts.

⏱ 45 min5-question quizLab 4.1

The simple version

A huge book is cut into chapters and each chapter goes to a different librarian. To read the book fast, you ask all the librarians at once. Lustre does that with files: the stripe count is how many librarians share the book, and the stripe size is how big each chunk is.

The building blocks

ComponentRole
MGS (management server)Holds configuration; clients and servers register with it
MDS / MDTMetadata server and its metadata target: the namespace, permissions, file layouts
OSS / OSTObject storage servers and their object storage targets: the file data
ClientsMount the filesystem; talk to the MDS for metadata and directly to OSSs for data
LNetLustre's networking layer, running over TCP or RDMA (o2ib)

To read a file, a client asks the MDS for its layout, then reads the objects straight from the OSTs listed in it.

Striping

single-file bandwidth ≤ stripe count × per-OST bandwidth (and ≤ the client's network)

stripe_count=1 → one OST serves the whole file. stripe_count=8 at ~5 GB/s per OST → up to ~40 GB/s, if the client can take it.

$ lfs getstripe /lustre/datasets/train-shards.tar
$ lfs setstripe -c 8 -S 4M /lustre/ckpt         # default for NEW files in this dir
$ lfs migrate -c 8 /lustre/datasets/train-shards.tar   # rewrite an existing file
Layouts are fixed at creation. Changing a directory's default affects only files created afterwards. lfs setstripe on an existing file fails; use lfs migrate to restripe it.

Wide striping isn't free: small files gain nothing, and every stripe is another object to create and track. Newer Lustre releases add progressive file layouts (PFL), which grow the stripe count as a file grows, and Data-on-MDT for very small files.

OST space and balance

Space is per OST. A file with a stripe on a full OST can't grow, even if the filesystem as a whole is half empty. Check balance with lfs df -h, find files on a busy OST with lfs find /lustre --ost N, and move them with lfs migrate.

Tools

lfs getstripe [-d] PATH
Show a file's layout, or a directory's default.
lfs setstripe -c N -S SIZE PATH
Set the layout for new files (or create an empty file with it).
lfs migrate -c N [-i IDX] FILE
Rewrite an existing file with a new layout.
lfs df -h / lfs find --ost N
OST capacity and which files live on an OST.

Quiz

Lab

Lab 4.1 · Stripe count of 1

Reading the 512 GiB file /lustre/datasets/train-shards.tar tops out around 5 GB/s, even though the filesystem has 8 OSTs and the client has two 200 Gb/s storage NICs.

Start lab 4.1 →

Try it now in the simulator (opens with the command ready; press Enter):

$ lfs getstripe /lustre/datasets/train-shards.tar$ lfs getstripe -d /lustre/ckpt$ lfs df -h