Skip to main content

Usage

voraus-rt-ipc-eval has two configuration layers:

  • CLI flags: control how the tool is invoked (results location, verbosity, …). These can be passed on the command line or set via environment variables.
  • Test settings: control the test itself (duration, load, cyclictest parameters). These cannot be set via CLI flags and are read from a JSON config file, environment variables, or built-in defaults (in that order of precedence).

In general the defaults are just fine and you only need to change/set:

  • DURATION (e.g. to do a longer test)
  • ENABLE_NETWORK_RTT_TEST (to enable or disable the network round trip time test)
  • NETWORK_RTT_TEST__INTERFACE (to set the network interface for the test)
  • NETWORK_RTT_TEST__CPU_AFFINITY (to set the CPU affinity for the networking thread)
  • CYCLICTEST__CPU_AFFINITY (to set the CPU affinity for cyclictest threads, if necessary)

If you enable the network round trip time test, make sure to set the CPU affinity to the same isolated CPU that the respective network interface is pinned to. Also make sure, that cyclictest does not spawn a measurement thread on this CPU to not interfere with the network test. This can be achieved by setting CYCLICTEST__CPU_AFFINITY to all non-isolated CPUs (e.g. 0,2,3 or !1 if CPU 1 is isolated).

CLI Options​

OptionEnv variableDefaultDescription
--results-dir PATHRESULTS_DIR./resultsDirectory where result files are written.
--config-file PATHCONFIG_FILE(none)Path to a JSON configuration file (see below).
--create-results-subdirCREATE_RESULTS_SUBDIRfalseCreate a timestamped subdirectory in the results dir.
--verboseVERBOSEfalseEnable debug-level logging.
--versionVERSION-Print the tool version and exit.

Configuration File​

It is possible to use a config file for the test settings. Mount the file into the container with an additional -v flag:

docker run --rm ... \
-v "$(pwd)/config.json:/config.json" \
-v "$(pwd)/results:/results" \
voraus.jfrog.io/docker/voraus-rt-ipc-eval \
--config-file /config.json --results-dir /results

Config file reference​

{
"duration": "15m",
"snapshot_interval": "auto",
"load_args": ["stress-ng", "--cpu", "50%", "--io", "50%", "--pipe", "50%", "--vm", "25%", "--timeout", "0"],
"cyclictest": {
"interval": 250,
"priority": 80,
"lock_memory": true,
"histogram_size": 500,
"cpu_affinity": "0,2,3",
"distance": 0,
"break_threshold": null
},
"enable_network_rtt_test": true,
"network_rtt_test": {
"interface": "eth0",
"cycletime": 1000,
"priority": 49,
"cpu_affinity": 1,
"lock_memory": true,
"prevent_sleep_states": true,
"stats_frequency": null
}
}
SettingDefaultDescription
duration15mTotal test duration. Accepts a number followed by a unit: s, m, h, or d.
snapshot_intervalautoHow often intermediate results of cyclictest and the network RTT test are written to the log while the test is running. Accepts a duration like 30s or 5m. auto derives the interval from duration so that roughly 200 snapshots are taken over the whole run, but never more often than every 60 s. Set to null to disable snapshots.
load_argsstress-ng …Command and arguments used to generate system load during the test.
cyclictest.interval250Measurement interval between cyclictest samples in µs.
cyclictest.priority80SCHED_FIFO priority for the cyclictest threads (1–99).
cyclictest.lock_memorytrueLock process memory (mlock) to prevent page-fault latency spikes.
cyclictest.histogram_size500Maximum latency bucket in the output histogram in µs.
cyclictest.cpu_affinityall CPUsThe cpu affinity to use for cyclictest.
cyclictest.distance0Per-thread interval offset in µs. Set to 0 to use the same interval on all threads.
cyclictest.break_threshold(none)Stop the test immediately if a latency sample exceeds this value in µs. Omit or set to null to disable.
enable_network_rtt_testfalseEnable the network round trip time test.
network_rtt_test.interface(none)Network interface to use for the EtherCAT loopback test (e.g. eth0).
network_rtt_test.cycletime1000Cycle time to test with in µs.
network_rtt_test.priority49SCHED_FIFO priority for the network RTT test thread (1–99). -1 uses SCHED_OTHER.
network_rtt_test.cpu_affinity-1CPU index on which the network RTT test thread is pinned. -1 means no affinity.
network_rtt_test.lock_memorytrueLock process memory (mlock) to prevent page-fault latency spikes during the test.
network_rtt_test.prevent_sleep_statestrueRequest that the kernel keeps CPUs out of deep C-states for the duration of the test.
network_rtt_test.stats_frequency(none)How often intermediate statistics are logged. Omit or set to null to disable.

Environment Variables​

Every setting from the config file can also be set via environment variable, which is particularly convenient for Docker deployments. Pass variables with -e in the docker run command.

Nested settings use __ (double underscore) as delimiter (e.g. cyclictest.interval → CYCLICTEST__INTERVAL).

Environment variableEquivalent config keyExample
DURATIONdurationDURATION=1h
SNAPSHOT_INTERVALsnapshot_intervalSNAPSHOT_INTERVAL=5m
CYCLICTEST__INTERVALcyclictest.intervalCYCLICTEST__INTERVAL=500
CYCLICTEST__PRIORITYcyclictest.priorityCYCLICTEST__PRIORITY=90
CYCLICTEST__LOCK_MEMORYcyclictest.lock_memoryCYCLICTEST__LOCK_MEMORY=true
CYCLICTEST__HISTOGRAM_SIZEcyclictest.histogram_sizeCYCLICTEST__HISTOGRAM_SIZE=1000
CYCLICTEST__CPU_AFFINITYcyclictest.cpu_affinityCYCLICTEST__CPU_AFFINITY="0,1,2,3", CYCLICTEST__CPU_AFFINITY="!1"
CYCLICTEST__DISTANCEcyclictest.distanceCYCLICTEST__DISTANCE=0
CYCLICTEST__BREAK_THRESHOLDcyclictest.break_thresholdCYCLICTEST__BREAK_THRESHOLD=200
ENABLE_NETWORK_RTT_TESTenable_network_rtt_testENABLE_NETWORK_RTT_TEST=true
NETWORK_RTT_TEST__INTERFACEnetwork_rtt_test.interfaceNETWORK_RTT_TEST__INTERFACE=eth0
NETWORK_RTT_TEST__CYCLETIMEnetwork_rtt_test.cycletimeNETWORK_RTT_TEST__CYCLETIME=1000
NETWORK_RTT_TEST__PRIORITYnetwork_rtt_test.priorityNETWORK_RTT_TEST__PRIORITY=80
NETWORK_RTT_TEST__CPU_AFFINITYnetwork_rtt_test.cpu_affinityNETWORK_RTT_TEST__CPU_AFFINITY=1
NETWORK_RTT_TEST__LOCK_MEMORYnetwork_rtt_test.lock_memoryNETWORK_RTT_TEST__LOCK_MEMORY=true
NETWORK_RTT_TEST__PREVENT_SLEEP_STATESnetwork_rtt_test.prevent_sleep_statesNETWORK_RTT_TEST__PREVENT_SLEEP_STATES=true
NETWORK_RTT_TEST__STATS_FREQUENCYnetwork_rtt_test.stats_frequencyNETWORK_RTT_TEST__STATS_FREQUENCY=5s
note

A config file takes precedence over environment variables for any setting defined in both.