Curriculum / Part 6 · Scale-out NAS and object storage
Lesson 27

NFS for AI

NFS for AI clusters: v3 vs v4.1, rsize/wsize, nconnect, NFS over RDMA, and the tools that show what a mount is really doing.

⏱ 35 min5-question quizLab 6.1

The simple version

A single garden hose fills a pool slowly no matter how big the water main is. Run eight hoses from the same tap and the pool fills eight times faster, until the tap itself is the limit.

Versions and options

OptionWhat it does
vers=3Stateless, simple, widely supported
vers=4.1 / 4.2Stateful sessions; 4.1 adds sessions and optional pNFS (parallel NFS)
rsize/wsizeLargest read/write per request (often 1 MiB)
nconnect=NUp to 16 TCP connections per client-server transport (Linux)
proto=rdma,port=20049NFS over RDMA

Why nconnect matters for GPU nodes

client NFS bandwidth ≈ min(nconnect × per-connection rate, NIC, server share)

One connection at ~2.2 GB/s (the simulator's modelled value) loads a 140 GB model in ~64 s. Eight connections: ~17.6 GB/s → ~8 s, if the NIC and NAS have room.

Remount trap. nconnect belongs to the RPC transport the client creates on its first mount to a server. A remount, or a second mount to the same server, reuses that transport. nfsstat -m lists nconnect only when it isn't 1, so check it after every change.

Seeing what a mount is doing

$ nfsstat -m                  # options in effect per mount
$ mountstats /nas             # per-mount RPC counts, RTT and execute times (nfs-utils)
$ nfsiostat 1 /nas            # per-mount ops/s, kB/s, RTT every second

High RTT with low throughput points at the server or network; low RTT with low throughput points at too little concurrency on the client.

Tools

nfsstat -m
Mount options in effect (nconnect shown when ≠ 1).
mountstats MOUNT
Per-mount RPC statistics (nfs-utils).
nfsiostat INTERVAL MOUNT
iostat-style per-mount NFS view.
mount -t nfs -o vers=4.1,nconnect=8 …
Fresh mount with several TCP connections.

Quiz

Lab

Lab 6.1 · One TCP stream

Loading a 140 GiB model from the NAS (/nas/models/llm-70b/weights.safetensors) runs at about 2.2 GB/s. Someone already tried mount -o remount,nconnect=8 /nas and saw no change.

Start lab 6.1 →

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

$ nfsstat -m$ umount /nas$ mount -t nfs -o vers=4.1,nconnect=8 nas01:/ai /nas$ nfsstat -m