Class RuntimeOptions
Configuration options for the DAG scheduler and runtime tick loop.
public class RuntimeOptions
- Inheritance
-
RuntimeOptions
- Inherited Members
Constructors
RuntimeOptions()
public RuntimeOptions()
Properties
AdaptiveFenceCost
When true, MigrationCost and AabbCost are continuously calibrated from a 64-tick sliding window of per-chunk measurements. Static FenceCostModel values seed the model at startup; subsequent ticks converge toward the measured µs/unit. Disable for repeatable benchmarks or to pin behaviour to the static seed.
public bool AdaptiveFenceCost { get; set; }
Property Value
BaseTickRate
Target tick rate in Hz. Default: 60. The scheduler uses metronome-style tick advancement to prevent drift.
public int BaseTickRate { get; set; }
Property Value
EnableParallelFence
When true (default), WriteTickFence is parallelized across the worker pool via the internal sub-DAG (FenceExec).
When false, the runtime falls back to the legacy single-threaded serial fence — useful for diagnostics and as a safety
fallback if a regression is suspected. Enabling adds FenceExec to the scheduler's full system array, but
SystemCount reports user-registered systems only — see AllSystemCount
for the total including internal systems.
public bool EnableParallelFence { get; set; }
Property Value
FenceChunkOversubscription
Oversubscription factor for fence-chunk dispatch: the chunk-count cap becomes FenceChunkOversubscription × WorkerCount.
Above 1 lets the scheduler smooth out per-worker preemption jitter — a healthy worker can pick up the next queued chunk
while a preempted worker finishes its current one. Must be ≥ 1. Default: 2.
public int FenceChunkOversubscription { get; set; }
Property Value
FenceCostModel
Cost model coefficients for the fence work-planner. Each per-stage cost is the hint count multiplied by the matching coefficient; the planner uses the total cost to pick chunk count and split splittable items. Defaults are 1.0 everywhere — tune from real-world traces.
When AdaptiveFenceCost is true (default), this value is only used as the initial seed; runtime
continuously recalibrates MigrationCost and AabbCost from measured chunk wall-time.
public FenceCostModel FenceCostModel { get; set; }
Property Value
Overload
Overload detection and response configuration. Always active with sensible defaults.
public OverloadOptions Overload { get; set; }
Property Value
ParallelQueryMinChunkSize
Minimum number of entities per chunk for parallel QuerySystem dispatch.
Controls granularity: fewer entities per chunk = more parallelism but more overhead (Transaction creation per chunk).
Entity sets smaller than this value still use the parallel chunk path with totalChunks=1.
Default: 64.
public int ParallelQueryMinChunkSize { get; set; }
Property Value
SubscriptionServer
Subscription server configuration. Set to non-null to enable the TCP subscription server. If null, no subscription server is started (subscriptions disabled).
public SubscriptionServerOptions SubscriptionServer { get; set; }
Property Value
TelemetryRingCapacity
Capacity of the telemetry ring buffer (number of ticks retained). Must be a power of 2. Default: 1024 (~17 seconds at 60Hz, ~200KB).
public int TelemetryRingCapacity { get; set; }
Property Value
WorkerCount
Number of worker threads for parallel system execution.
Set to -1 (default) for automatic: Math.Max(1, Environment.ProcessorCount - 4).
Set to 1 for single-threaded debug mode (systems execute in topological order on the timer thread).
public int WorkerCount { get; set; }