Ray's Knowledge Base
Unlock

The first timed run on Lustre reads cold files, so warm the set before an A/B

PitfallVerified 5 Nov 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

An A/B test of two settings (1 MiB and 4 MiB pieces) showed the first setting 2.6 times slower (11:20 against about 4:15). The first setting was always the first run.

Cause#

The first run read every file cold from Lustre. The cost came from stat and open on cold files, not from the setting. An off-CPU profile showed the waits in those calls.

Fix#

Warm the cache first: read the whole file set once before timing. Then run several rounds, and alternate the settings in each round. With a warm cache on 8,404 files at 1 thread, the two settings took the same time (4 MiB: 256.5 s and 254.9 s; 1 MiB: 254.0 s and 251.7 s). Never trust a gap that appears only in round 1.

Evidence#

  • dftracer-utils: full minife set, 83 million events, 1 thread, Flux job on a Lustre file system.
  • The earlier "1 MiB is slow" result was wrong; the 4 MiB setting stayed.

Also found by searching

  • first benchmark run is much slower than the second on Lustre
  • one build looks 2.6x slower than the other on the first round
  • how do I compare two settings on a Lustre file set
  • cold Lustre stat and open make the first timed run slow