Skip to main content

chronon::sender::TickSimulationConfig

More...

#include <TickSimulationConfig.hpp>

Public Types

Name
enum classPartitionSolverType { Weighted, SA}

Public Functions

Name
voidsetPollingIntervalCycles(uint64_t cycles)
voidsetExecutionPolicy(ExecutionPolicy policy)
uint64_tpollingIntervalCycles() const
ExecutionPolicyexecutionPolicy() const

Public Attributes

Name
booltrace_execution
SchedulerTimelineTraceConfigtimeline_trace
uint64_ttick_frequency_hz
1 GHz default.
doublesa_critical_path_weight
doublerebalance_min_gain
Skip rebalance if predicted gain below this fraction.
doublerebalance_imbalance_threshold
uint64_trebalance_cooldown_cycles
Minimum cycles between rebalances (0 disables cooldown).
uint64_trebalance_check_interval_cycles
boolprofile_clock_scheduler
Sample multi-clock scheduler components every 64 sweeps (no speculative ticks).
PartitionSolverTypepartition_solver
size_tnum_threads
uint32_tmax_lookahead_cycles
In explicit clock mode, bounds the rolling physical-time batch window.
doubleinitial_partition_sync_cost_ns
uint64_tepoch_size
boolenable_weighted_partitioning
boolenable_parallel
boolenable_lookahead
boolenable_epoch_free_lookahead
boolenable_dynamic_rebalance
Reuses actor-local safe points for single-clock and explicit-clock graphs.

Detailed Description

struct chronon::sender::TickSimulationConfig;

Configuration for tick-based simulation.

Placement (initialization-time) vs. scheduling (runtime) are orthogonal. Placement groups units into clusters; scheduling decides how those clusters advance in time. cluster.size() == 1 is the fallback for un-clustered topologies — the scheduler treats the two uniformly.

Public Types Documentation

enum PartitionSolverType

EnumeratorValueDescription
Weighted
SA

Initial partition solver used by the cluster-aware path. SA is the default; Weighted keeps the deterministic four-phase solver available.

Public Functions Documentation

function setPollingIntervalCycles

inline void setPollingIntervalCycles(
uint64_t cycles
)

function setExecutionPolicy

inline void setExecutionPolicy(
ExecutionPolicy policy
)

function pollingIntervalCycles

inline uint64_t pollingIntervalCycles() const

function executionPolicy

inline ExecutionPolicy executionPolicy() const

Canonical configuration API. The booleans above are compatibility fields. This reports the requested policy, not the resolved execution backend.

Public Attributes Documentation

variable trace_execution

bool trace_execution = false;

variable timeline_trace

SchedulerTimelineTraceConfig timeline_trace;

variable tick_frequency_hz

uint64_t tick_frequency_hz = 1'000'000'000;

1 GHz default.

variable sa_critical_path_weight

double sa_critical_path_weight = 0.0;

SA objective critical-path term weight applied to max per-thread chain cost (ns). 0 disables the term (default).

variable rebalance_min_gain

double rebalance_min_gain = 0.01;

Skip rebalance if predicted gain below this fraction.

variable rebalance_imbalance_threshold

double rebalance_imbalance_threshold = 1.03;

variable rebalance_cooldown_cycles

uint64_t rebalance_cooldown_cycles =
0;

Minimum cycles between rebalances (0 disables cooldown).

variable rebalance_check_interval_cycles

uint64_t rebalance_check_interval_cycles = 2048;

variable profile_clock_scheduler

bool profile_clock_scheduler = false;

Sample multi-clock scheduler components every 64 sweeps (no speculative ticks).

variable partition_solver

PartitionSolverType partition_solver = PartitionSolverType::SA;

variable num_threads

size_t num_threads = std::thread::hardware_concurrency();

variable max_lookahead_cycles

uint32_t max_lookahead_cycles = 100;

In explicit clock mode, bounds the rolling physical-time batch window.

variable initial_partition_sync_cost_ns

double initial_partition_sync_cost_ns = 8.0;

Fixed, wall-clock-free sync cost (ns) fed ONLY to the initial deterministic partition so the solver minimizes cross-thread edge cut, co-locating topologically-connected units (e.g. a CPU core's pipeline) on one thread. Scaled to dominate the uniform unit cost (1.0) — empirically ~8x is the sweet spot: large enough to pull connected components together, small enough that the compute-balance signal still steers the SA solver (much higher swamps it and convergence degrades). 0 restores the old pure-load-balance behavior.

This knob is scoped to the initial partition: it is not written into platform_metrics_, so dynamic rebalance decides migrations on its own inputs (measured unit costs + platform_metrics_) and is unaffected by it.

variable epoch_size

uint64_t epoch_size = 64;

Deprecated:

Prefer setPollingIntervalCycles().

Host predicate and Sequential termination polling interval. Epoch-free runUntilTermination ignores this value because stop propagates directly.

variable enable_weighted_partitioning

bool enable_weighted_partitioning = true;

Enables the cluster-aware partitioning path. When false, Chronon falls back to the legacy topology-only thread assignment.

variable enable_parallel

bool enable_parallel = true;

Scheduler selection:

  • !enable_parallel → Sequential
  • all epoch-free safety gates are satisfied → Epoch-free lookahead
  • otherwise → Sequential fallback DeprecatedPrefer setExecutionPolicy(). Retained for source compatibility.

variable enable_lookahead

bool enable_lookahead = true;

Deprecated:

Prefer setExecutionPolicy().

Compatibility switch. False now forces Sequential; the removed per-cycle barrier scheduler is no longer selectable.

variable enable_epoch_free_lookahead

bool enable_epoch_free_lookahead = true;

Deprecated:

Prefer setExecutionPolicy().

Epoch-free lookahead uses one persistent-worker, run-spanning window. Run-ahead is bounded by lookahead_floor_ + max_lookahead_cycles plus per-edge queue-headroom dependencies. MPSC lanes require neither centralized scheduler arbitration nor a run-end flush. Bounded destinations perform aggregate admission on their owning Unit immediately before its tick. Engaged only when max_lookahead_cycles is positive and every MPSC port has fully resolved per-connection progress and queue headroom. A failed safety gate selects Sequential; no barrier-based fallback remains. Setting this compatibility switch to false also forces Sequential.

variable enable_dynamic_rebalance

bool enable_dynamic_rebalance = true;

Reuses actor-local safe points for single-clock and explicit-clock graphs.


Updated on 2026-09-20 at 14:23:39 +0000