HPC performance tuning is the repeatable process of measuring a workload, finding what limits it (compute, memory, storage or network), changing one thing at a time and proving the change helped. Most disappointing cluster results come from a mismatch between the workload and the infrastructure underneath it, so the best tuning starts with a sound design. That is where we at Dormedia work with organizations: designing, sourcing, deploying and supporting HPC and AI infrastructure so that tuning begins from a configuration built for the job.
TL;DR
- Tuning is a loop: measure, analyze, change one thing, verify, repeat until further gains no longer pay for the effort.
- Establish a baseline on a production-representative test case before touching anything.
- Profile first. The bottleneck is usually memory bandwidth, I/O or the interconnect, not raw compute.
- Many gains come from system design: the right servers, components, network and storage for the workload.
- Stop when the human time costs more than the compute time you save.
Table of Contents
- What HPC tuning actually means
- Step 1: Build a baseline you can trust
- Step 2: Profile to find the real limit
- Step 3: Apply the easy wins first
- Step 4: Tune I/O and storage
- Step 5: Look at the interconnect
- Step 6: Verify, and know when to stop
- A worked example
- Where tuning ends and infrastructure begins
- Our view
- Plan your HPC or AI infrastructure with us
- FAQ
- Sources
What HPC tuning actually means
HPC stands for high-performance computing: running demanding simulations, analytics or AI training across many processors at once. Tuning means making a given workload finish faster, or use fewer resources, on a given system.
The HPC Wiki lists five factors that shape performance: hardware design (caches, vector length), implementation (language, data layout, libraries), code generation (compiler and options), system configuration (operating system and libraries) and the execution environment (process placement, resource allocation, OS noise). For an executive or IT manager, this list matters because only some of these sit in the application code. Hardware choice, system configuration and execution environment are infrastructure decisions, and they are often the cheapest to improve.

Cornell's virtual workshop describes the in-depth version of the work as timing the code to find hot spots, the places where most compute time goes, then improving those spots and repeating while the benefit justifies the effort.
Step 1: Build a baseline you can trust
You cannot tune what you have not measured. The standard measure is wall-clock time to solution, with derived figures such as speedup and parallel efficiency, according to Cornell's course notes on performance analysis.
The HPC Wiki's minimum process starts with a test case that represents real production work, not a toy input. Then:
- Run a warm-up so caches stabilize.
- Repeat the run. Microsoft's HPC benchmarking guidance suggests at least five iterations and reporting the median or average.
- Keep the operating system, drivers and configuration identical across comparisons.
- Record software versions, environment variables and command-line parameters.
The same guidance lists the usual pitfalls: too little warm-up, comparing different software versions, ignoring NUMA topology (the way memory is attached to specific processor sockets) and leaving everything at default settings.
Benchmarks that isolate the hardware
Synthetic benchmarks test one subsystem at a time. Microsoft's overview names STREAM for memory bandwidth, HPL/LINPACK for peak floating-point rate, HPCG for sparse linear algebra, OSU Micro-Benchmarks for MPI latency and bandwidth, and NCCL tests for GPU collectives. Application benchmarks such as GROMACS, WRF or MLPerf show how your real workload behaves. Use both: synthetic results tell you what the hardware can do, application results tell you how much of that you actually get.
Step 2: Profile to find the real limit
A profiler shows whether code is compute-bound, memory-bound or communication-bound. The Ohio Supercomputer Center recommends compiling with debug symbols plus your normal optimization level, then looking for hot spots, excessive tiny function calls, memory swapping and low CPU utilization, which can point to I/O delays.
The tools differ by stack:
- Intel VTune's HPC characterization analysis reports core utilization, memory-bound status and vectorization of floating-point loops.
- HPE's Cray Performance Analysis Tools cover computation, communication, I/O and memory across MPI, OpenMP, CUDA and HIP code.
- PETSc users can run with its log-view option for a phase-by-phase time summary.
- For storage, Darshan characterizes application I/O and, as described in a survey of parallel I/O, needs no source changes because it loads as a library.
Reading the result
| What the profile shows | Likely limit | Where to look first |
|---|---|---|
| Cores busy, vector units idle | Compute, code generation | Compiler flags, vectorization |
| Cores waiting on memory | Memory bandwidth | Data layout, ranks per node, memory configuration |
| Time in MPI waits | Network | Interconnect, process placement |
| Low CPU use, long file operations | Storage and I/O | Filesystem, I/O pattern, checkpoint frequency |
Step 3: Apply the easy wins first
The DoD HPC Centers guide recommends a baseline compiled without optimization, then recompiling with options such as -O2 or -O3, vectorization and loop unrolling, and checking that results stay identical or close to the baseline, because some compilers rearrange instructions in ways that can produce incorrect results. It advises profiling only after these simple steps, to avoid wasted effort.
Memory-bound? Use fewer ranks
A common surprise: more processes do not mean more speed. PETSc's documentation explains that most of its operations are limited by memory bandwidth, and that on a dual-socket Haswell system over 80% of peak bandwidth is reached with only four processes per socket. Past that, extra MPI ranks per node add little, and hyper-threading usually does not help. When you scale tests, keep the number of processes per node constant and add nodes instead.
This is a hardware lesson as much as a software one. If your workload is bandwidth-bound, the memory channels and socket configuration you buy matter more than headline core counts.
Check data structures
Cornell's notes point out that tuning often means looking at data, not code: rearranging arrays for unit stride, removing levels of indirection, or using single precision for high-volume data. The fastest path is often swapping a slow data structure for an equivalent fast one behind the same interface.
Step 4: Tune I/O and storage
Storage is a frequent hidden limit. A U.S. Department of Energy study of large parallel filesystems notes that checkpoint I/O can consume 7% to 20% of runtime for some codes, against an ideal of roughly 10%. Another study found that, for the small random reads typical of deep learning, relaxed consistency models gave a 5x bandwidth gain over strict ones.
To test storage without running the whole application, IOR is a synthetic MPI-based benchmark with more than 50 options that exercises POSIX, MPI-IO and HDF5 interfaces, as the parallel I/O survey describes. Its access patterns can mimic your application's.
Step 5: Look at the interconnect
When profiles show time lost in communication, the answer often lies in network topology, bandwidth and latency rather than code. Our design guide to high-speed interconnects covers how those choices affect HPC and AI clusters. For AI training, collective operations across GPUs make the fabric especially important, and our piece on AI infrastructure bottlenecks shows where projects typically stall.
Step 6: Verify, and know when to stop
The GWDG describes a closed loop of performance tuning: measurement, analysis, generating alternatives and implementation, repeated until the target is met or further tuning stops being cost-effective. It also notes that a 1% runtime reduction on a program consuming millions of CPU hours saves roughly 10,000 CPU hours, so small gains can matter at scale.
Verification checklist:
- Compare results against the baseline for accuracy, not only speed.
- Test more than one input and configuration. Optimizations made for one setup may degrade another.
- Confirm the optimized variant is actually used in regular production runs.
- Do not copy-paste scripts blindly. The HPC Wiki gives the example of using 32 of 48 cores on a node and losing a third of the resources.
Cornell's notes also say not to tune when human time costs more than the compute time saved, and not to tune sections that already take little time.
A worked example
Suppose a simulation takes 10 hours on 64 ranks across two nodes. You profile it and find cores stalled on memory. Following the pattern above, you run it with fewer ranks per node and find the time barely changes, confirming a bandwidth limit. Next you reorder an array for unit stride and the run drops. Each change was tested alone, repeated several times, and checked against baseline output. If the next idea saves 15 minutes but takes a week of engineering, you stop. These numbers are illustrative, but the sequence is the method.
Where tuning ends and infrastructure begins
Software tuning has a ceiling set by the system under it. If memory bandwidth, network fabric, storage or power and cooling are mismatched to the workload, no compiler flag fixes it. That is why teams planning new HPC or AI capacity benefit from deciding configuration, sourcing and deployment together, and why power and site constraints belong in the same conversation. Our guides on data center power planning and site selection cover those layers, and our series on HPC consulting scope, process and cost explains how an engagement is structured.
Our view
Tuning pays best when the system was designed around the workload in the first place. Since 2011 we have worked in this field, and since 2017 we have been deeply engaged in HPC and AI.
Our approach is to treat design, sourcing, deployment, scaling and support as one project. Customized server and component configurations, data center solutions, global logistics, and tax and tariff compliance all affect how a cluster performs on day one, and our network of vendors and logistics experts is built to keep pricing and delivery timelines sound.
For CTOs and IT managers, the practical benefit is fewer surprises: a configuration chosen against measured bottlenecks, and strategic advisory and ongoing support when the workload changes.
Dormedia
Plan your HPC or AI infrastructure with us
If your profiles point at the hardware, or you are planning a new deployment, we handle design, customized configurations, components, data center solutions, global shipping, tax and tariff solutions, project management, strategic advisory and ongoing support. Explore the Dormedia services or see available hardware inventory.

FAQ
What is performance tuning in HPC?
It is the iterative process of measuring a workload, finding its bottleneck, changing configuration or code, and confirming the improvement. It repeats until further gains are no longer worth the effort.
How many times should I run a benchmark?
Microsoft's guidance suggests at least five iterations with the median or average reported, after a warm-up run. EPCC's course advises at least three repetitions and changing one parameter at a time.
Why doesn't adding more cores make my job faster?
Many workloads are limited by memory bandwidth, and a fraction of the cores can saturate the memory channels. PETSc's developers note that the best performance may come from fewer ranks than physical cores.
Should I tune code or buy different hardware?
Profile first. If the profile shows memory, network or storage limits that code changes cannot move, the infrastructure design is the lever, and we can help you plan it.
Sources
- Performance Engineering, HPC Wiki
- In-depth tuning, Cornell Virtual Workshop
- Performance analysis, Cornell CS5220 notes
- HPC performance and benchmarking overview, Microsoft Learn
- HOWTO: Tune Performance, Ohio Supercomputer Center
- HPC Performance Characterization Analysis, Intel VTune
- CPE Performance Analysis Tools User Guide, HPE
- Hints for Performance Tuning, PETSc
- Parallel I/O Characterization and Optimization survey (HTML)
- Parallel I/O survey (PDF)
- Techniques for Improving Performance, DoD HPC Centers
- Performance of Large-scale Parallel Filesystems, OSTI
- Parallel file system consistency models, OSTI
- Tools for Analyzing Parallel I/O, GWDG
