Performance and Fleet Operation

The final skill is to turn profiles, topology and failure evidence into a safe system change. Throughput matters only with fixed workload semantics, correct results, reliability and resource cost.

Section 10 of 10 · 14 units · about 58 hours

0/14

By the end you can For one fixed and correct workload, predict the bottleneck, confirm it with aligned traces, implement one bounded change, report throughput, memory, reliability and cost with variance, and defend a rollback-ready real-code contribution.

Units

Build it

Mini project · about 20 to 30 hours

Measured fleet baseline with one real-code win

Build fixed-workload benchmarks, aligned traces and fleet simulators in trainlab, rehearse hang, placement and cost regressions, then land one bounded change in a real training codebase with before-and-after evidence. Every claim separates CPU, single-GPU and multi-GPU evidence and keeps the regimes where the change loses.

  1. 1Write the fixed-workload harness with warmup, synchronization and a correctness guard that rejects fast-but-wrong results, and solve the CS336 benchmarking problems while stating tokens per second, MFU, HFU and goodput.
  2. 2Capture attributed timelines with profiler ranges around transfers and collectives, align ranks by collective markers, and work the CS336 trace and memory problems while stating observer overhead.
  3. 3Inject one hang, arm the recorder and desync controls before launch, and diagnose the first-cause rank against victim ranks from per-rank dumps with the analysis tool; on CPU, dump explicitly, since automatic dumps on timeout come from the NCCL watchdog.
  4. 4Predict the bound with the CS336 inequalities before tracing, measure exposed communication for one bucket policy, run the Stas loader sweep to rule out starvation, and gate a precision switch on equivalence with overflow counts; with two or more GPUs, read a placement regression from busbw and traces.
  5. 5Extend plan/ with a fleet and placement simulator covering gang starts, topology-aware placement, quotas, fairness, backfill, fragmentation, preemption and failures, and validate it against hand-worked scenarios.
  6. 6Write health checks with a collective test, a fixed-workload canary with rollback, and runbooks rehearsed against injected hang, OOM and straggler; validate the cost-per-useful-token model for one scenario with residual and portability limits.
  7. 7Land one bounded change in Picotron, TorchFeather, TorchTitan or an isolated Bumblebee branch through the debugging workflow: fixed-workload baseline, aligned profiles, equivalence plus regression tests, fallback flag, before-and-after results with variance, and the losing regime.
What you hand in
  • The fixed-workload harness with manifests, attributed timelines, hang diagnosis and bound plus placement evidence.
  • The fleet simulator with scenario results, health checks, canary, runbooks and the validated cost model.
  • The bounded real-code change with baseline, profiles, equivalence and regression tests, variance and losing regimes.
How to check it
How it's graded

Honest measurement

Pass: Fixed workload with correctness guard, raw samples with variance, and overhead stated beside trace claims.

Great: A second operator reproduces the headline numbers from the manifest, and losing shapes stay in the report.

Diagnosis and fleet

Pass: Hang, placement and precision regressions localize first cause, and the simulator covers gang, quota and failure scenarios.

Great: Runbooks resolve injected faults to exclusion plus rollback, and the cost model explains its residual.

Real-code change

Pass: The bounded change passes the CPU suite and equivalence tests, beats the baseline on the traced bottleneck, and keeps fallback.

Great: Two alternatives are defended against, and a preserved losing regime bounds where the change applies.

Resources

  • Machine Learning Systems Volume II - Fleet Orchestration and Performance EngineeringML Systems Textbook

    Read Scheduling Problem, Orchestration Paradigms, Topology-Aware Scheduling, Elastic Scheduling, Cost Optimization, Multi-Tenancy and Quotas and Debugging Cluster Utilization, then Memory Wall and Roofline Diagnosis, Graph Compilation, Communication-Computation Overlap, System Profiling and Measurement at Scale at https://mlsysbook.ai/vol2/performance_engineering/performance_engineering.html. Use the framework to choose one bottleneck-specific lab and one rollback metric.

  • AI Systems Performance Engineering - Chapters 1 to 5, 13 and 14Chris Fregly (O'Reilly)

    Use Chapter 1 for goodput and reproducibility, Chapters 2 to 5 for topology, orchestration, communication, storage and the data pipeline, Chapter 13 for PyTorch profiling and scaling, and the Chapter 14 sections on graph breaks and recompilation. Run only the companion labs for the bottleneck you observe, preserve workload correctness and record hardware assumptions.

  • Machine Learning Engineering Open Book - Network, Debug, Training Performance and OrchestrationStas Bekman

    Use network/debug/README.md, the hang, crash and OOM sections of debug/pytorch.md, training/performance/README.md, storage/README.md and orchestration/slurm/users.md as an incident-driven reference. Build one symptom-to-evidence-to-cause runbook rather than reading every page.

  • How to Scale Your Model - Chapters 1, 5, 9 and 12Google DeepMind

    Use rooflines, training cost models, profiling workflow and GPU topology to predict the dominant limit of one run. Compare the prediction with a trace and quantify the residual before proposing a change.

  • CS336 Assignment 2 (Spring 2026) - Profiling and Parallelism AnalysisStanford University

    Revisit Section 2 profiling and Section 8 communication analysis. Produce warmup-controlled timing, Nsight or PyTorch traces, memory evidence and analytic DP, FSDP, TP and 2D comparisons on configurations you can execute honestly.

  • PyTorch Flight Recorder TutorialsPyTorch

    Read the environment-variable Flight Recorder tutorial (trace buffer, dump on timeout, fr_trace analysis), then the newer tutorial at https://docs.pytorch.org/tutorials/intermediate/debug_hangs_with_flight_recorder.html, which needs torchcomms and can run on CPU with Gloo. Diagnose one injected hang from per-rank dumps.

  • MegaScale: Scaling Large Language Model Training to More Than 10,000 GPUsJiang et al. (NSDI 2024)

    Read the efficiency optimizations, the fault-tolerance loop (heartbeats, diagnostics, fast restart) and the straggler and diagnosis tooling. Its MFU and scale numbers are its own cluster's results.

  • Revisiting Reliability in Large-Scale Machine Learning Research ClustersKokolis et al. (2024)

    Read the failure taxonomy, mean time to failure versus job size and the scheduler-side metrics. Use them to model goodput with failures for one job size.

  • Ultra-Scale Playbook - Benchmarking ConfigurationsHugging Face

    Study the configuration-search experiments and Lessons learned on benchmarking as method. Its heatmaps are its own H100 cluster's results; reproduce the method on a tiny legal search space, separating analytic predictions, simulations and measurements.

  • Distributed Training Systems LaboratoryRoadmap-Final

    Complete the capstone with a fixed workload, correctness oracle, analytic plan, fault campaign, aligned traces and one real-code extension. Label CPU simulation, single-GPU evidence and multi-GPU evidence separately.

  • TorchTitanPyTorch

    Read docs/debugging.md (memory snapshots, fake-backend modes, Flight Recorder dumps) and the CPU unit tests under tests/unit_tests/cpu/, then the configuration, metrics, profiling, checkpoint and parallelization seams at a pinned commit. Select one bounded issue or measurable improvement and follow the contribution standards; do not attempt a wholesale rewrite.