Skip to main content

Knob catalog

Every graph.run() keyword argument maps to a runner-binary flag. The canonical machine-readable form of this catalog is:

python -m tomii --list-knobs-json

This page transcribes catalog version 3. Each knob carries a name (the graph.run() keyword), the CLI flag it maps to, a type, a role, an optional search domain, and a description. The catalog is the single source the knob-space generator (tomii.knob_space) builds search spaces from; see knobs for tuning guidance and agent tuning for the search harness.

Roles

RoleMeaning
perfAffects performance; safe to search (verifier-gated)
measurementBenchmark parameter; fix it for fair comparison, never search it
ioOutput/diagnostic plumbing; never search
envMachine-specific (CPU pinning); set once per host, don't search

In domains, pow2 means the sensible search points are powers of two within [min, max] (sample the exponent, not the value). The workers maximum is resolved to the host's CPU count at catalog-generation time (128 on the machine that produced this table).

Catalog

NameCLI flagTypeRoleDomainDescription
workers--workersintperf1–128, pow2Rayon worker threads (match physical cores)
core_offset--core-offsetintenvFirst CPU to pin workers to (use 1 to leave CPU 0 for OS)
system_threads--system-threadsintperf1–4, linearResolution/scheduler threads (default 1; rarely needs changing)
receiver_threads--receiver-threadsintperf0–4, linearDedicated network receiver threads (for network-input graphs)
max_runtime--max-runtimeintmeasurementStop after N seconds (0 = run until max_frames complete)
slots--slotsintperf1–64, pow2Concurrent in-flight frames (1 for latency, >1 for throughput)
max_frames--max-framesintmeasurementTotal frames to process (0 = run indefinitely)
batching_size--batching-sizeintperf1–512, pow2Max tasks per scheduler batch
batching_limit--batching-limitintperf1–8, pow2Max outstanding batches before back-pressure
exclude_frames--exclude-framesintmeasurementSkip first N frames from timing output
record_frame--record-frameintmeasurementRecord timing for this specific frame index only
fifo--fifoboolperfboolUse FIFO task scheduling instead of default (depth-first)
custom--customboolperfboolEnable custom scheduling strategy
inits--initsboolmeasurementboolRe-run graph initializations on each frame
debug--debugboolioboolPrint verbose debug output
record--recordboolioboolEnable timing/event recording to file
use_rdtsc--use-rdtscboolmeasurementboolUse RDTSC for sub-μs timing (x86 only; improves timer precision)
slot_priority--slot-priorityboolperfboolPrioritize tasks from the earliest active slot
coalesce_barriers--coalesce-barriersboolperfboolBatch barrier fan-outs into bulk tasks (reduces overhead for fine-grained graphs)
inline_continuation--inline-continuationboolperfboolRun single-successor tasks inline (reduces scheduling overhead)
no_fanout_bulk--no-fanout-bulkboolperfbool
output--outputstrioPath for raw timing output file
timing--timingstrioPath for per-node timing CSV
report--reportstrioPath for JSON summary report (avg/p99 latency, bottleneck hints)
dump_state--dump-statestrioPath for a runtime state snapshot (JSON) written at shutdown; SIGUSR1 writes numbered live snapshots (wedged-run debugging)

Search hints

Search hints from the same catalog, for knobs that carry one. Boolean knobs without a specific hint carry the generic hint "try both True and False"; string knobs carry none.

NameSearch hint
workersunimodal; binary search 1–physical_cores; diminishing returns past core count
core_offsetset to 1 to leave CPU 0 for OS; rarely needs tuning otherwise
system_threadsleave at default 1 unless profiling shows scheduler bottleneck
slots1 minimizes latency; >1 increases throughput; try 1,2,4,8
max_framesbenchmark parameter; set to fixed value for fair comparison
batching_sizeunimodal; binary search 1–512; larger reduces scheduling overhead for fine-grained graphs
batching_limitunimodal; try 1,2,4; higher allows more outstanding work
exclude_framesskip warmup frames; set to 1–3 to exclude JIT effects from timing
fifotry both; depth-first (default) usually better for latency
use_rdtscenable for sub-us timing precision on x86; no effect on performance
slot_prioritytry both when slots > 1; can reduce tail latency under imbalanced graphs
coalesce_barriershelpful when node factor >> worker count (reduces barrier overhead)
inline_continuationtry both; often reduces latency for linear chains or low-fan-out graphs

The runner binary also accepts low-level flags that are not part of this catalog (ring-buffer capacity, spin-wait parameters, socket buffer sizes); those are listed under command-line interfaces.