Curriculum / Part 4 · Parallel filesystems
Lesson 20

Client tuning and caching

Client-side knobs that change performance: read-ahead, RPCs in flight, NFS rsize/wsize and nconnect, and when node-local caching helps.

⏱ 35 min5-question quiz

The simple version

A waiter who brings one plate per trip is slow. Carry bigger trays (larger RPCs), have several trips going at once (more RPCs in flight), and fetch the next course before it's ordered (read-ahead), and the same kitchen serves far more people.

Lustre client parameters

Lustre exposes client tunables through lctl:

$ lctl get_param osc.*.max_rpcs_in_flight
$ lctl get_param osc.*.max_pages_per_rpc
$ lctl get_param llite.*.max_read_ahead_mb

More RPCs in flight per OST keeps more I/O outstanding (Little's Law again); larger RPCs move more data per round trip; read-ahead prefetches sequential data. Defaults are reasonable for many workloads; change one thing at a time and measure, because the right values depend on your Lustre version, network and access pattern.

NFS mount options

rsize/wsize set the largest read/write per request; nconnect=N (Linux, up to 16) opens several TCP connections to the server so one stream isn't the bottleneck. nfsstat -m shows what's actually in effect. Transport options like nconnect are fixed when the client first connects to a server, so changing them needs a fresh mount, not a remount (Lab 6.1).

Node-local caching

When every epoch re-reads the same data, a cache on local NVMe turns network reads into local reads. Options include FS-Cache with cachefilesd for NFS, Lustre's Persistent Client Cache (PCC) in newer releases, or simply staging data to /scratch before a job. It helps when the working set fits on the node and is re-read; it doesn't help a single pass over data much larger than the cache.

effective read rate ≈ hit ratio × local rate + (1 − hit ratio) × remote rate

90% hits at 7 GB/s local and 2 GB/s remote → about 6.5 GB/s, and the shared filesystem sees 10% of the load.

Tools

lctl get_param / set_param
Read and change Lustre client tunables.
nfsstat -m
NFS options in effect, including nconnect when ≠ 1.
mount -t nfs -o vers=4.1,nconnect=8 ...
Mount NFS with several TCP connections.

Quiz

Lab

Related 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):

$ nfsstat -m$ mount