Days
Configuration Settings

Overview

TOML schema basics, units, and feature-gated keys.

Days simulations are configured using a single TOML file. The CLI entry point (src/main.rs) expects the path to that file as its only argument:

RUST_LOG=info cargo run -- configs/simple.toml

Units and types

The most common conventions in the TOML schema:

  • Time: seconds as floating point (f64) unless otherwise noted.
  • Rates: bits per second (port_rate, rate_gbps, …).
  • Sizes: bytes for traffic sizes, packet sizes, and most buffers.
  • Topology node IDs: integers (usize), used consistently across graph edges, hosts, paths, and endpoints.

Minimal example

This is a minimal, custom-topology run: one link, one packet-distribution flow.

seed = 1
duration = 2.0
threading = "single"
log_path = "./output/minimal"

edges = [[0, 1]]
hosts = [0, 1]

[switch]
port_rate = 1e9
capacity = 100
discipline = "FIFO"
drop = "TailDrop"

[[flow]]
flow_type = "PacketDistribution"
graph = [[0, 1]]
[flow.traffic]
  initial_delay = 0.0
  size = 10000
  arr_dist = { type = "Uniform", low = 0.001, high = 0.001 }
  pkt_size_dist = { type = "DiscreteUniform", low = 512, high = 512 }

Sections at a glance

Feature-gated configuration

Some config values are only valid when the binary is built with the right Cargo features:

  • link.mode = "Pfc" requires --features l2_pfc
  • flow_type = "DCQCN" and [traffic.dcqcn] require --features dcqcn
  • Protocol event traces for the Lean checker:
    • dcqcn_events.csv requires --features dcqcn,lean
    • pfc_events.csv requires --features l2_pfc,lean
    • cubic_events.csv requires --features lean
    • drr_events.csv requires --features lean
    • wfq_events.csv requires --features lean
  • --features perf_stats enables internal performance statistics from the nexosim simulation engine

On this page