Skip to content

plan: auto-tune heuristics — MTP/PIPE/NUMA decisions from bottleneck classification#393

Open
ZacharyZcR wants to merge 1 commit into
JustVugg:devfrom
ZacharyZcR:feat/auto-tune
Open

plan: auto-tune heuristics — MTP/PIPE/NUMA decisions from bottleneck classification#393
ZacharyZcR wants to merge 1 commit into
JustVugg:devfrom
ZacharyZcR:feat/auto-tune

Conversation

@ZacharyZcR

@ZacharyZcR ZacharyZcR commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Classify hardware into bottleneck regimes: disk (cold experts on NVMe), memory (RAM bandwidth), mixed (CPU tail + GPU), compute (fully resident)
  • Derive tuning knobs automatically from the classification:
knob disk-bound compute-bound mixed (GPU)
DRAFT (MTP) 0 if hit<90% 0 (saves 42%, #389) engine default
PIPE PIPE=1 COLI_CUDA_PIPE=2
NUMA COLI_NUMA=1 + numactl hint COLI_NUMA=1
PIN_GB all (CPU-only)
OMP tune off for Metal

Test plan

  • 7 new unit tests covering all bottleneck regimes (compute/disk/multi-GPU/single-GPU/NUMA hint/format)
  • 18/18 tests pass
  • Existing tests unchanged (additive fields, plan version stays at 2)

…cisions

Extend resource_plan to classify the hardware into bottleneck regimes
(disk / memory / mixed / compute) and derive tuning knobs automatically:

  MTP:   off when compute-bound (42% loss at full residency, JustVugg#389)
         or disk-bound with <90% hit (union growth adds reads)
  PIPE:  COLI_CUDA_PIPE=1 single-GPU, =2 multi-GPU, PIPE=1 CPU disk
  NUMA:  selective interleave for GPU hosts, blanket hint for CPU-only
  PIN:   PIN_GB=all when fully resident + no GPU
  OMP:   COLI_NO_OMP_TUNE=1 for Metal (spin steals GPU power)

`coli plan` now shows an auto-tune section with each knob and its
reason. `environment_for_plan()` applies them via setdefault so
explicit user settings always win.

plan version stays at 2 (additive fields: bottleneck_class,
projected_hit_rate, tune). 7 new tests covering all regimes.
@ZacharyZcR
ZacharyZcR changed the base branch from main to dev July 19, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant