← Back to section · Post-Quantum Migration
Performance Compatibility Testing: Baselines Before Complaints About Slowness
How much slower the system gets after an algorithm swap only counts if the numbers are comparable. Baseline methodology for handshake latency, CPU load and memory footprint: same environment, same workload, same measurement definitions — measure the delta, not an impression.
Without a baseline, every performance claim is an impression
“We switched to post-quantum algorithms and the system got slower.” This sentence appears constantly in migration projects, and it is almost always unfalsifiable: slower by how much, at which hop, because of computation or because of extra bytes taking a longer road? Without a baseline there is no answer. The job of performance compatibility testing is to measure the full performance profile of the classical configuration before cut-over, then measure again with exactly the same method afterwards; the difference between the two number sets is the true performance cost of the migration. Note the key word: “compatibility”, not “speed”. ML-KEM’s computation is in fact quite fast. The real question is whether the new configuration fits inside the existing system’s latency budget, CPU budget and memory budget.
What to measure: a four-dimension metric list
A complete baseline covers at least four metric groups:
- Handshake latency: full handshakes and resumed handshakes measured separately, with means and p95/p99 percentiles, and round trips annotated — after post-quantum messages grow, extra round trips are a primary source of added latency and are not compute cost;
- Throughput and connection rate: new connections per second, signatures and verifications per second — the capacity language of gateways and load balancers;
- CPU load: split by operation — key generation, encapsulation/decapsulation, signing, verification, each with per-call cost and core usage; note that rejection sampling in ML-DSA signing gives the per-call cost a distribution tail, so look at high percentiles, not just the mean;
- Memory footprint: growth in resident memory, per-connection state size, storage occupied by key material; on constrained devices also stack depth and peak temporary buffers.
How to measure: same environment, same workload, same definitions
The most common way baselines become worthless is inconsistent conditions between the two runs. The discipline is three rules:
Same environment: the same machine (or same instance type), the same OS and cryptographic library versions, unrelated load switched off; on cloud instances, avoid neighbour noise and take medians across repeated rounds.
Same workload: generate reproducible pressure with a fixed load script and request mix (ratio of full to resumed handshakes, concurrent connections, message size distribution) instead of “roughly testing” against production traffic.
Same definitions: where latency starts and stops, whether network round trips are included, how long the measurement window is — these must match word for word between the two runs. Two specific cautions: when measuring compute cost, isolate network factors on loopback or same-datacentre paths; when measuring end-to-end experience, do the opposite and use near-production network conditions. Measure the two questions separately and the conclusions become attributable.
Measurement traps that ruin baselines
Four high-frequency traps lurk in baseline measurement, and stepping into any of them destroys comparability. First, missing warm-up: a cryptographic library’s first calls include code loading, cache initialisation and just-in-time compilation, so the first few hundred operations run markedly slower than steady state; a baseline must discard the warm-up segment and count only steady state. Second, session-cache contamination: if the load script does not deliberately control it, the second run may hit session resumption heavily and hide the cost of full handshakes — resumption hit rates must match across runs and be recorded. Third, connection reuse masking: long-lived connection reuse amortises handshake cost, so under an “average request latency” definition the new algorithm’s handshake delta drowns in business traffic; handshakes must be timed separately. Fourth, processor state drift: cloud instances’ CPU frequency, hyperthread neighbours and power caps make the same test produce different numbers at different times; the countermeasure is to interleave the two runs (one classical round, one post-quantum round, alternating) instead of finishing one set before the other, so environmental drift acts on both equally.
Measure signing and verification separately
Another common definitional error is merging signing and verification into one “signature performance” number. Their cost structures differ completely: ML-DSA verification is deterministic with stable timing, while signing contains rejection sampling, so its per-call cost is a distribution driven by sampling luck, not by the data signed. For capacity planning the two ends need separate numbers: on the signing side, watch high-percentile latency (it sets the throughput ceiling of private-key-side equipment such as signing servers and HSMs); on the verification side, watch means and throughput (it sets gateway cost for certificate validation). The directions are asymmetric too: most systems verify far more often than they sign, but the signing side usually sits on scarcer hardware. Measure and record the two number sets separately in the baseline, so that when parameter sets change you can tell which side absorbs the impact instead of guessing at a blended figure.
Translate the delta into capacity conclusions
Numbers are an intermediate product; the deliverable of compatibility testing is capacity conclusions:
- At the target connection rate, how much CPU headroom is left on the existing gateways? Does signing need offloading from general-purpose CPUs to dedicated hardware?
- Is the latency budget (say, p99 connection setup under a threshold) breached by the extra round trips? By how much, and on which links?
- Does the memory delta, multiplied by maximum concurrent connections, hit the instance size ceiling? Does the session cache need to shrink?
Answer these questions before the pilot, not after go-live. One definitional caution: capacity conclusions should be computed against business peaks, not daily averages — handshake storms typically occur in the full-reconnect moments after service restarts, certificate rotations and failovers, when connection rates can reach several times the daily mean; the baseline suite should include a dedicated “cold-start full reconnect” load shape to calibrate the capacity ceiling against.
One more cost class is easily missed: key generation. Post-quantum key generation costs more than classical, and for scenarios that generate keys frequently — short-lived certificates, high-frequency rotation, mass device onboarding — the generation rate is itself a capacity item, to be measured and baselined separately. And one more easily forgotten long-term item: archive the baseline scripts and results in configuration management, so that when parameter sets change (ML-KEM-768 to 1024, say), libraries upgrade, or chains change, one command re-runs and one command compares. A performance baseline is not project documentation; it is a living regression asset — which is exactly what separates it from a one-off load test.
Tags: Performance TestingBaselinesHandshake LatencyCapacity Planning