Skip to main content

Daytone: A Performant Discrete-Event Simulator for Network Simulations

Project description

Daytone: A Performant Discrete-Event Simulator for Network Simulations

Developed with the Rust programming language, Daytone has been designed as a performant discrete-event simulator for network simulations. It uses stackless coroutines in asynchronous Rust to implement the actor model, where each actor can only interact with its counterparts using message passing. It excels at both small-scale and large-scale network simulations due to its ability to use either a single-threaded or a multi-threaded runtime; the single-threaded runtime minimizes overhead, while the multi-threaded runtime utilizes multiple CPU cores concurrently in the same simulation run.

To run a network simulation session using a configuration file, run:

RUST_LOG=debug daytone configs/simple.toml

where RUST_LOG levels can be error, warn, info, debug, and trace.

Running Unit and Integration Tests

To run both unit and integration tests, use the command:

cargo test --features test

Or if cargo-nextest has been installed (by using the command brew install cargo-nextest), run the following command instead to take advantage of its speed and more streamlined user interface:

cargo nextest run --all-features

Configuration Settings

In Daytone, all configuration settings are read from a configuration file when a simulation session starts, and the configuration file follows the TOML format for the sake of simplicity and readability.

Here is an example configuration file simple.toml:

# An example configuration file that shows a basic setup.

seed = 1000
edges = [[0, 1], [0, 2]]
hosts = [0, 1, 2]
duration = 20.0
ui_interval = 1.0
report_interval = 2.0
num_threads = 1
log_path = "./simple"

[switch]
port_rate = 8000
capacity = 100
weights = [1]
discipline = "FIFO"
drop = "RED"

[[flow]]
flow_type = "PacketDistribution"
graph = [[0, 1]]
[flow.traffic]
    initial_delay = 1.0
    size = 10000
    arr_dist = {type = "Exp", lambda = 1.0}
    pkt_size_dist = {type = "Uniform", low = 1000, high = 1500}

[[flow]]
flow_type = "PacketDistribution"
graph = [[1, 0]]
[flow.traffic]
    initial_delay = 2.0
    duration = 10.0
    arr_dist = {type = "Uniform", low = 1, high = 1}
    pkt_size_dist = {type = "Uniform", low = 1000, high = 1500}

[[collective]]
collective_type = "Broadcast"
flow_type = "PacketDistribution"
flow_count = 2
graph = [[0, 1], [0, 2]]
sources = [0]
sinks = [1, 2]
[collective.traffic]
    initial_delay = 1.0
    duration = 10.0
    arr_dist = {type = "Uniform", low = 1, high = 1}
    pkt_size_dist = {type = "Uniform", low = 1000, high = 1500}

The following introduces all the possible settings in the configuration file.

General

seed

The seed for the random number generator to ensure reproducibility of the simulation results.

  • Valid value: Integer

  • Required: Yes

  • Example:

    seed = 1000
    

duration

The total duration of the simulation in seconds.

  • Valid value: Floating point number

  • Required: No

  • Default: 1500.0

  • Example:

    duration = 20.0
    

report_interval

The report_interval parameter specifies the time interval to log reports from all elements in the simulation.

  • Valid value: Floating point number

  • Required: No

  • Default: f64::MAX (No reports when the simulation is in progress, all reports are logged at the end.)

  • Example:

    report_interval = 1.0
    

ui_interval

Daytone provides a user interface, which for now includes a progress bar to visualize the progression of a simulation session. This ui_interval element specifies the time interval to advance the position of the progress bar.

  • Valid value: Floating point number

  • Required: No

  • Default: duration / 100

  • Example:

    ui_interval = 1.0
    

num_threads

The number of threads to be used in the simulation run. By setting this value to 1, the single-threaded runtime will be used instead of the default multi-threaded runtime.

log_path

Daytone generates three CSV files, sources.csv, sinks.csv, and switches.csv, containing statistics of a simulation session. log_path specifies the directory of the three CSV files.

  • Valid value: String

  • Required: No

  • Default: ./output

  • Example:

    log_path = "./test"
    

topology

Daytone supports arbitrary topologies. Besides widely-used topologies FatTree and Torus, any topology that can be specified as an undirected graph can be supported as well.

  • FatTree

    To specify the FatTree topology, it is required to specific k. k is a multiple of 2.

    Example:

    [topology]
    category = "FatTree"
    
    [topology.torus]
      	k = 8
    
  • Torus

    To specify the Torus topology, it is required to specific dimension dim, and node per dimension n. Only 1D, 2D, and 3D Torus topologies are supported. That is, valid values of dim are 1, 2, 3.

    Example:

    [topology]
    category = "Torus"
    
    [topology.torus]
      	dim = 2
      	n = 3
    
  • Custom topology

    Use edges to specify an undirected graph as the topology, and hosts to specify hosts in the topology.

    edges is a vector of [integer, integer]. An [integer, integer] pair presents an edge in the undirected graph.

    hosts is a vector of integers

    Example:

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

Switch

In Daytone, all switches use the same setting which can be specified with the following attributes.

port_rate

The bit rate of each outbound port.

  • Valid value: Floating point number

  • Required: Yes

  • Example:

    port_rate = 8000
    

capacity

The capacity (buffer size) of each outbound port.

  • Valid value: Integer

  • Required: Yes

  • Example:

    capacity = 100
    

drop

The packet drop strategy that drops packets when the buffer is full.

  • Valid value:

    Value Meaning
    TailDrop Dropping packets at the tail of the queue
    RED Random Early Detection
  • Required: Yes

  • Example:

    capacity = 100
    

discipline

The scheduling discipline.

  • Valid value:

    Value Meaning Notes
    FIFO First In First Out
    DRR Deficit Round Robin Required to specify weights
    WFQ Weighted Fair Queueing Required to specify weights
    SP Static Priority Required to specify priorities
    VC Virtual Clock Required to specify vticks
  • Required: Yes

  • Example:

    discipline = "FIFO"
    

weights

  • Valid value: Vector of integers

  • Required: Yes if dispcipline = "DRR" or dispcipline = "WFQ"

  • Example:

    weights = [1, 2, 3]
    

priorities

  • Valid value: Vector of integer values, where the index of the vector is the flow class, and the value is the priority of this flow class

  • Required: Yes if dispcipline = "SP"

  • Example:

    priorities = [1, 2]
    

vticks

  • Valid value: Vector of (integer, integer), where the first integer is the flow class and the second integer is the inverse of the desired rates for the corresponding flows, in bits per second

  • Required: Yes if dispcipline = "VC"

  • Example:

    vticks = [(0, 2), (1, 1)]
    

Flow

In Daytone, flows can be specified one by one:

[[flow]]
flow_id = 2
starts_before = [3]
starts_after = [1]
flow_type = "PacketDistribution"
graph = [[0, 1]]
[flow.traffic]
    initial_delay = 1.0
    duration = 2.0
    arr_dist = {type = "Uniform", low = 1, high = 1}
    pkt_size_dist = {type = "Uniform", low = 1000, high = 1500}

or by sets:

[[flow_set]]
first_flow_id = 10
flow_type = "PacketDistribution"
flow_count = 10
[flow_set.traffic]
    initial_delay = 0.0
    duration = 10.0
    arr_dist = {type = "Uniform", low = 0.0008, high = 0.0008}  # 10Mbps
    pkt_size_dist = {type = "Uniform", low = 1024, high = 1024}

The following table lists required, optional, or not supported attributes of a flow or a flow set.

Attribute Meaning flow flow_set
flow_id The id of the flow optional no
first_flow_id The smallest flow id of the flow set no optional
starts_before The ids of flows that cannot start until this flow / flow set ends optional optional
starts_after The ids of flows that this flow / flow set must wait for them to end before it starts optional optional
flow_type The type of the flow or flows of the flow set required required
flow_count The number of flows in the flow set no required
graph The pair of the source host and the sink host of the flow required no
path The path of the flow optional no
traffic The traffic of the flow / flow set required required

flow_id

The id of the flow. If not specified, the id of the first flow specified in the configuration file will be 0, and the subsequent ids of flows increase by 1.

  • Valid value: Integer

  • Required: No

  • Example:

    flow_id = 1
    

first_flow_id

The smallest flow id of the flow set.

  • Valid value: Integer

  • Required: No

  • Example:

    flow_first_id = 1
    

starts_before

The ids of flows that cannot start until this flow / flow set ends.

  • Valid value: Vector of integers

  • Required: No

  • Example:

    starts_before = [3, 4]
    

starts_after

The ids of flows that this flow / flow set must wait for them to end before it starts.

  • Valid value: Vector of integers

  • Required: No

  • Example:

    starts_after = [0, 1]
    

flow_type

The type of the flow or flows of the flow set.

  • Valid value:

    Value Meaning
    PacketDistribution A flow whose packet source sends packets with specific distributions of inter-arrival times and packet sizes
    TCP A flow whose packet source simulate the TCP protocol
  • Required: Yes

  • Example:

    flow_type = "PacketDistribution"
    

flow_count

The number of flows in the flow set.

  • Valid value: Integer

  • Required: Yes for a flow set

  • Example:

    flow_count = 10
    

graph

The pair of the source host and the sink host of the flow.

  • Valid value: [[integer, integer]]

  • Required: Yes for a single flow

  • Example:

    graph = [[0, 2]]
    

path

The path of the flow.

  • Valid value: Vector of integers where each integer is a node in the path

  • Required: No

  • Example:

    path = [0, 1, 2]
    

traffic

For a flow, it must specify its traffic under [flow.traffic]. For a flow set, it must specify the traffic of its flows under [flow_set.traffic].

The following table lists attributes of traffic.

Note:

  • initial_delay, arr_dist, and pkt_size_dist are required.
  • Either size or duration is required.
  • If flow_type = "TCP", [flow.traffic.tcp] or [flow_set.traffic.tcp] must be specified for the flow or flow set.
  • Attributes:

    Attribute Meaning Valid Value
    initial_delay The seconds the flow / flow set waits before producing its first packet Floating point number
    size The total size of packets of the flow / each flow of the flow set in bytes Integer
    duration The duration of the flow / each flow of the flow set in seconds Floating point number
    arr_dist The arrival distribution of packets in seconds Valid distribution info
    pkt_size_dist The distribution of packet sizes in bytes Valid distribution info

Valid distribution info includes uniform distribution and exponential distribution:

  • {type = "Uniform", low = 0.0008, high = 0.0008}
  • {type = "Exp", lambda = 1.0}
  • Required: Yes

  • Example:

    [[flow_set]]
    flow_type = "TCP"
    flow_count = 100
    [flow_set.traffic]
    	initial_delay = 0.0
    	duration = 0.1
    	arr_dist = {type = "Uniform", low = 0.0008, high = 0.0008}
    	pkt_size_dist = {type = "Uniform", low = 1024, high = 1024}
    [flow_set.traffic.tcp]
    	cc_algorithm = "TCPReno"
    

traffic.tcp

For a flow, it must specify its tcp characteristics under [flow.traffic.tcp]. For a flow set, it must specify the tcp characteristics of its flows under [flow_set.traffic.tcp].

  • Attributes:

    Attribute Meaning Valid Value
    cc_algorithm The congestion control algorithm TCPReno, TCPCubic
  • Required: Yes

  • Example:

    [flow.traffic.tcp]
    	cc_algorithm = "TCPReno"
    

Collective

In Daytone, collectives can be specified one by one:

[[collective]]
collective_type = "Broadcast"
flow_type = "PacketDistribution"
flow_count = 2
graph = [[0, 2], [0, 3], [1, 2], [1, 3]]
sources = [0, 1]
sinks = [2, 3]
[collective.traffic]
    initial_delay = 1.0
    duration = 10.0
    arr_dist = {type = "Uniform", low = 1, high = 2}
    pkt_size_dist = {type = "Uniform", low = 1000, high = 1500}

or by sets:

[[collective_set]]
collective_type = "Gather"
collective_count = 2
flow_type = "PacketDistribution"
flow_count = 2
sources = [[0, 1], [1, 2]]
sinks = [[2, 2], [3, 3]]
[collective_set.traffic]
    initial_delay = 1.0
    duration = 10.0
    arr_dist = {type = "Uniform", low = 3, high = 4}
    pkt_size_dist = {type = "Uniform", low = 2000, high = 2500}

The following table lists required, optional, or not supported attributes of a collective or a collective set.

Attribute Meaning collective collective_set
collective_type The type of the collective or collective set required required
first_flow_id The smallest flow id of the collective or collective set optional optional
collective_count The number of collectives in the collective set no required
flow_type The type of the flows of the collective or collective set required required
flow_count The number of flows in the collective or in each collective of the collective set required required
graph The pairs of the source host and the sink host of the collective's flows optional no
paths The paths of the collective's flows optional no
sources The sources of flows optional optional
sinks The sinks of flows optional optional
traffic The traffic of the collective / collective set required required

collective_type

The type of the collective or collective set.

  • Valid value: Brordcast or Gather

  • Required: Yes

  • Example:

    collective_type = "Broadcast"
    

first_flow_id

The smallest flow id of the collective / collective set.

  • Valid value: Integer

  • Required: No

  • Example:

    flow_first_id = 1
    

collective_count

The number of collectives in the collective set.

  • Valid value: Integer

  • Required: Yes for a collective set

  • Example:

    collective_count = 10
    

flow_count

The number of flows in the collective or in each collective of the collective set.

  • Valid value: Integer

  • Required: Yes

  • Example:

    flow_count = 4
    

graph

The pairs of the source hosts and the sink hosts of the collective's flows.

  • Valid value: Vector of [integer, integer]

  • Required: No

  • Example:

    graph = [[0, 1], [0, 2]]
    

paths

The paths of the collective's flows.

  • Valid value: Vector of vectors of integers where each integer is a node in the path

  • Required: No

  • Example:

    paths = [[0, 1], [0, 1, 2]]
    

sources

For a collective, sources is the set of the source hosts of this collective's flows.

  • Valid value: Vector of integers where each integer is a source host

  • Required: No

  • Example:

    sources = [0, 1]
    

For a collective set, sources is set of the source hosts of this collective set's collectives' flows.

  • Valid value: Vector of vectors of integers where each vector is a collective's flows' source hosts

  • Required: No

  • Example:

    sources = [[0, 0], [1, 1]]
    

sinks

For a collective, sinks is the set of the sink hosts of this collective's flows.

  • Valid value: Vector of integers where each integer is a sink host

  • Required: No

  • Example:

    sinks = [0, 1]
    

For a collective set, sinks is set of the sink hosts of this collective set's collectives' flows.

  • Valid value: Vector of vectors of integers where each vector is a collective's flows' sink hosts

  • Required: No

  • Example:

    sinks = [[0, 0], [1, 1]]
    

traffic

For a collective, it must specify the traffic of its flows under [collective.traffic]. For a collective set, it must specify the traffic of its flows under [collective_set.traffic].

The following table lists attributes of traffic.

Note:

  • initial_delay, arr_dist, and pkt_size_dist are required.
  • Either size or duration is required.
  • If flow_type = "TCP", [flow.traffic.tcp] or [flow_set.traffic.tcp] must be specified for the flow or flow set.
  • Attributes:

    Attribute Meaning Valid Value
    initial_delay The seconds the collective / collective set waits before producing its first packet Floating point number
    size The total size of packets of each flow of the collective / collective set in bytes Integer
    duration The duration of each flow of the collective / collective set in seconds Floating point number
    arr_dist The arrival distribution of packets in seconds Valid distribution info
    pkt_size_dist The distribution of packet sizes in bytes Valid distribution info

Valid distribution info includes uniform distribution and exponential distribution:

  • {type = "Uniform", low = 0.0008, high = 0.0008}
  • {type = "Exp", lambda = 1.0}
  • Required: Yes

  • Example:

    [[collective]]
    collective_type = "Broadcast"
    flow_type = "PacketDistribution"
    flow_count = 4
    [collective.traffic]
        initial_delay = 1.0
        duration = 10.0
        arr_dist = {type = "Uniform", low = 3, high = 4}
        pkt_size_dist = {type = "Uniform", low = 2000, high = 2500}
    

traffic.tcp

For a collective, it must specify the tcp characteristicsc of its flows under [collective.traffic.tcp]. For a collective set, it must specify the tcp characteristics of its collectives' flows under [collective_set.traffic.tcp].

  • Attributes:

    Attribute Meaning Valid Value
    cc_algorithm The congestion control algorithm TCPReno, TCPCubic
  • Required: Yes

  • Example:

    [collective.traffic.tcp]
    	cc_algorithm = "TCPReno"
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

daytone-0.3.4-py3-none-win_amd64.whl (1.3 MB view details)

Uploaded Python 3Windows x86-64

daytone-0.3.4-py3-none-win32.whl (1.2 MB view details)

Uploaded Python 3Windows x86

daytone-0.3.4-py3-none-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

daytone-0.3.4-py3-none-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

daytone-0.3.4-py3-none-musllinux_1_2_aarch64.whl (1.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

daytone-0.3.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

daytone-0.3.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

daytone-0.3.4-py3-none-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

daytone-0.3.4-py3-none-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file daytone-0.3.4-py3-none-win_amd64.whl.

File metadata

  • Download URL: daytone-0.3.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for daytone-0.3.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5f127eeb2dc0851ca15ea11a0e4fdf50bfcbeecc8f2e3c08cd35147e5a4f6329
MD5 9973dc00cda66990e2033562737f98b4
BLAKE2b-256 d9454125efe58bd5a7b821ce286b632993b915a3420c05b0a47cb9c77e5f4177

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-win32.whl.

File metadata

  • Download URL: daytone-0.3.4-py3-none-win32.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for daytone-0.3.4-py3-none-win32.whl
Algorithm Hash digest
SHA256 a932c8350ffcf5122dcaa8e869f0081c4ecffa95fc8c7d3aa0b79303aba23f15
MD5 8ab9d3a4e2ec625b945d933a44d27481
BLAKE2b-256 6f2c63ce231797a567c6a624cff5a44b95cd5b5f6ae0522f3ff3fc9a2e371c70

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 43ec1d777134f86795fe26906de99391ef3570823b87eb7525359881527d9aff
MD5 5ab63630693f5921cb1df124c54e84e3
BLAKE2b-256 0687daa7154c557d451439808a174c2b3416da5f28b717e64e55b1e2eb2ec24e

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ddb0701571dd6809601870dcc03c6b90726065e6d709d9033b111eda944826f2
MD5 d4227d6256780f0d2beeee58d926aaff
BLAKE2b-256 c6f4394c675c1f4e7262ea5f484b3c65b93d9e9d31adc1a103fe57eced63c6f4

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 62fd86b68c306cf6d6416b05c703eaebe19b5f5a4d5421344fb2713b7fcdf5bd
MD5 86c34229b72bbc05a74dde8d0ef8d918
BLAKE2b-256 a97eea3ecbe9a14741e3501164c4714535db877a3d16182cbb9ebda5d9a593e1

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 985ab06fab050967ee5b65ac59c4913c449a12cb20e1df84f0494be6f892b6af
MD5 65437e9afa4924e1d838154884077ae1
BLAKE2b-256 77b238e921616c91913573463cc5f85865a8c39a657214e126e435826fc37958

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2e91b9f4c206838cf3f26d75859f91128ab641d11b9e3aa3d108110aad9a3fa5
MD5 55d5deffc2ac9c95ef3f929c3a8371a9
BLAKE2b-256 c460feda9c5811d8f562e97eae4a4658996ccabba5f00cd2dee3fcefa39ffb4d

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 936d33b9e65e2031becba3875de3927d651ed0704607d9691c6ada88ae7e08fa
MD5 a7ca641b906ab100cf69261a419ddab7
BLAKE2b-256 e41114018a6e5c4bd3e18cdba9b2060f866ee9c0368ecb13d86929570b259222

See more details on using hashes here.

File details

Details for the file daytone-0.3.4-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for daytone-0.3.4-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3bb7af871eefd55617cfeaf0e543acae16a722d3c5b3e6b172f37adf05fb835d
MD5 52db5e6b940a12cf0f50235ed3ae041c
BLAKE2b-256 18cff88580e8b5ac96f690e02ecb732694e0b5e63c4147e60ef254c18c134779

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page