Skip to content

Adaptive Curve Guided Pause Discovery

Victor Xirau Guardans edited this page Sep 29, 2026 · 2 revisions

Adaptive Curve-Guided Pause Discovery

Mess can choose pause values automatically when --pause is not provided. This is the default behavior for normal benchmark runs.

The goal is to spend measurements where the bandwidth-latency curve is changing, instead of using a fixed hand-written pause list that can be too sparse around knees and too dense in flat regions.


Quick Start

# Default adaptive run: standard tier, 50 points per enabled mode
./build/bin/mess --ratio=100

# Fast exploratory run
./build/bin/mess --ratio=100 --tier=lite

# High-resolution run
./build/bin/mess --ratio=100 --tier=detailed

# Custom adaptive point budget
./build/bin/mess --ratio=100 --point-count=75

# Manual pause list: disables adaptive discovery
./build/bin/mess --ratio=100 --pause=0,10,100,1000,10000

Adaptive discovery is performed independently for each enabled execution mode. In the public benchmark flow, the discovered pause set is used for the MultiSequential curve.


Tiers

Tier Point budget Intended use
lite 15 points per mode Fast exploratory runs and CI-style checks
standard 50 points per mode Default curve generation
detailed 200 points per mode Dense characterization when runtime is acceptable
--point-count=N N points per mode Custom budget

--tier and --point-count are mutually exclusive. --point-count is also incompatible with --pause, because manual pause lists disable adaptive discovery.

When --tier=lite is used and --repetitions is not specified, Mess uses one repetition per point to keep the run short.


What Gets Measured First

For each ratio and mode, Mess starts with shared anchor points:

  1. pause=0
  2. pause=1
  3. powers of ten: 10, 100, 1000, ...

The power-of-ten expansion stops when the curve reaches a low-bandwidth horizon or when the measurements become too noisy relative to their bandwidth. In practice, this gives the algorithm enough information to know the full bandwidth range before it starts spending the remaining budget.

If there are very wide gaps between discovered anchors, Mess inserts skeleton points at geometric midpoints before the main refinement phase.


How Refinement Works

After the initial anchors, Mess scores each neighboring pause interval and repeatedly measures the interval with the highest estimated error.

The scoring uses normalized bandwidth and latency together:

  • Bandwidth is normalized by the current peak bandwidth.
  • Latency is normalized by the measured latency range.
  • Pause spacing is evaluated in log space, so the split between 100 and 10000 is 1000, not 5050.
  • Curvature is estimated from neighboring points.
  • Ambiguous coupled transitions, where both bandwidth and latency move enough that a straight line could hide a bend, are prioritized.

The next candidate pause is the geometric midpoint of the selected interval:

split(10, 100)    -> 31
split(100, 1000)  -> 316
split(0, 10)      -> 5

Refinement stops when the tier budget is reached or when no remaining segment is above the internal error threshold.


Suspicious Feature Validation

Some points can look like sharp features because of measurement noise. Mess validates suspicious local bends before accepting them as real curve structure.

For a local triplet [left, center, right], Mess checks:

  • Whether the center point deviates strongly from the line between the outer points.
  • Whether the slope changes direction around the center.
  • Whether the deviation is larger than the observed measurement noise and a minimum feature threshold.

When a suspicious point is found, Mess remeasures the center and may add guard points on both sides. If the guard points support the bend, the feature is kept and the new guard points count toward the adaptive curve. If not, the center is treated as corrected noise.

At --verbose=2 or higher, this appears as:

Adaptive Validating suspicious MULTISEQ pause 14 between [13, 17]
Adaptive Validation MULTISEQ pause 14: feature

Reading the Logs

With --verbose=2, Mess prints the adaptive setup:

Adaptive Setup:
  Modes: MULTISEQ
  Budget: 50 points/mode (50 total)

With --verbose=3, refinement decisions are also shown:

Adaptive Refining MULTISEQ (worst E=3.078e-02)
CurveTracer Split [10, 31] -> p=17 (E=6.539e-02)

At the end of a mode, Mess prints the discovered pause list:

Adaptive MULTISEQ pauses (50): 0, 1, 5, 7, 10, ...

Those are the points used to build the final bandwidth-latency curve.


When to Use Manual Pauses

Use adaptive discovery for normal characterization. It is usually better than a fixed list because it follows the machine's actual curve.

Use --pause when you need:

  • Exact repeatability against an older experiment.
  • A single point, such as --pause=0 for peak-load testing.
  • A narrow hand-picked region during debugging.
  • A benchmark matrix where every system must use exactly the same pause values.

Manual pause lists are still valid; they simply bypass the adaptive tracer.


Interaction with Traffic Generation

Adaptive discovery selects the benchmark-level pause values. The traffic generator then implements each selected pause by inserting NOP bubbles inside the generated memory kernel. The kernel details are controlled separately in include/KernelTypes.h; see Traffic generator setup.

The important distinction is:

  • Adaptive discovery decides which pause values to measure.
  • The traffic generator decides how a given pause value is translated into assembly-level throttling.

See Also

Clone this wiki locally