swx-perf¶
WHAT TO EXPECT
swx-perf is a traffic generator, receiver and verifier for the cloudSwXtch overlay network. It sends streams, receives them, checks every packet for loss, order and content, and ends every run with a verdict.
In this article, users will learn how to send and receive traffic with swx-perf, how to read its results, and how to run coordinated tests across several VMs.
USING SWX-PERF FROM A V4.X RELEASE?
The swx-perf shipped with cloudSwXtch v5 (swx-perf 2.14) is a new tool. The producer and consumer commands are now tx and rx, the address is no longer given with --sendto / --recvfrom, and several flags were renamed or replaced. Command lines written for v4.x do not run. See Migrating from v4.x for the full mapping.
Overview¶
swx-perf runs in one of two basic roles. tx sends one or more streams; rx receives them and reports what arrived:
swx-perf tx <TARGET> [--nic <NETWORK_INTERFACE>] [options]
swx-perf rx <TARGET> [--nic <NETWORK_INTERFACE>] [options]
The 239.1.1.1:10000, or a range of them (see Targets). One swx-perf instance can send or receive many streams, several instances can run on the same VM, and they can run on as many VMs as needed.
The --nic is optional: by default (--nic auto) swx-perf uses the first active multicast interface whose name starts with swx, which is the swx0 interface of an xNIC Type 1 or Type 3. An xNIC Type 2 has no swx0 interface, so on Type 2 pass the data interface explicitly, for example --nic eth1.
NOTE
Regarding the multicast address, we recommend referring to the IANA IPv4 Multicast Address Space Registry. Currently, the xNIC can’t join a multicast stream on the reserved IP 224.0.0.1.
For example, on a VM with an xNIC Type 1 or Type 3, send to the multicast address 239.1.1.1 on port 10000 with:
On another VM, receive it with an xNIC Type 2 whose data interface is eth1:
swx-perf can also:
- send and receive UDP, RTP, SRT and RIST
- check every byte of every packet, not only the sequence
- send hundreds or thousands of streams from a single command
- use subnet broadcast or limited broadcast (255.255.255.255)
- filter multicast sources (SSM, IGMPv3)
- count traffic generated by another tool, such as iPerf
- measure round-trip and one-way latency, jitter and packet delay variation
- run for a fixed time or a fixed number of packets
- replay a packet capture or an MPEG-TS clip at its own timing
- end with a pass/fail verdict and a matching exit code, so scripts can act on the result
- coordinate a test across a whole fleet of VMs from one scenario file (see Advanced: scenarios and fleet runs)
Targets¶
A target has the form [proto://][@]IPS[:PORTS]. The address and the port each take a single value or a walk that expands into several streams:
| Target | Streams |
|---|---|
239.1.1.1:10000 |
One stream |
239.1.1.1+10:10000 |
10 streams, 239.1.1.1 to 239.1.1.10, port 10000 |
239.1.1.1-239.1.1.10:10000 |
The same 10 streams, with the last address written in full |
239.1.1.1,239.1.1.9:10000 |
An explicit list: 2 streams |
239.1.1.1:10000-10003 |
4 streams on one group: ports 10000 to 10003 |
239.1.1.1:10000+4x2 |
4 streams on ports 10000, 10002, 10004 and 10006 |
rtp://239.1.1.1+16:5000x2 |
16 RTP groups, each on its own port pair (a session uses port and port+1 for RTCP) |
bcast://subnet:10000 |
Broadcast to the subnet of the selected interface |
bcast://limited:10000 |
Broadcast to 255.255.255.255 |
Stream i pairs the i-th address with the i-th port, so only one part may declare the count: 239.1.1.1+4:10000-10003 is rejected. The end of an address range must be written in full — 239.1.1.1-10 is not accepted.
The protocol is udp (default), rtp, srt or rist, always in lower case. For SRT and RIST, @ means listen: tx srt://@:9000 waits for a caller, while tx srt://10.0.0.5:9000 calls out. Broadcast is plain UDP only.
swx-perf¶
For the complete reference of commands and options, run swx-perf -h (or --help, or swx-perf with no arguments). The reference is a single page covering every command; there is no separate help per command. To print the version, use swx-perf --version or swx-perf version:
$ swx-perf --version
swx-perf 2.14 protocols: udp,rtp,srt,rist modules: inspect:mpegts,inspect:timing,trace:.trace,trace:.cap,trace:.pcap,trace:.pcapng,trace:.ts,tap:udp,tap:unix,tap:file
swx-perf is installed with the xNIC: on Linux as /usr/bin/swx-perf (package swx-tools), on Windows as C:\Program Files\SwXtch.io\swx-xnic\swx-perf.exe.
Parameters¶
Common options¶
| Argument | Description | Default |
|---|---|---|
--nic <name|auto> |
Network interface to send or receive on. auto picks the first active multicast swx* interface. |
auto |
--seconds <s> |
Stop after this many seconds. --duration is a synonym. |
No limit |
--total-pkts <n> |
tx: exact number of packets to send. rx: stop after this many packets. | No limit |
--json |
Print a machine-readable report on stdout at the end of the run. Status lines go to stderr. | |
--quiet |
No live progress lines (same as --progress off). |
|
--progress <mode> |
Live output: line, table, csv or off. |
line |
--columns <list> |
Columns for table/csv. rx: time, pkts, pps, bps, missing, lost, dup, ooo, ovfl, bad, streams. tx: time, pkts, pps, bps, drop, enobufs, lag. |
rx: time,pkts,pps,bps,missing,dup,ovfl tx: time,pkts,pps,bps,drop,lag |
--progress-interval <dur> |
Time between live lines. | 1s |
--cpus <list|auto> |
Pin the worker threads to these CPUs, e.g. 2,3,6-8. auto lets swx-perf choose (see swx-perf topo); it may decline and say why. |
Unpinned |
--performance |
Hold the performance CPU governor and shallow C-states for the run. Linux only, needs root; restored on exit. | Off |
tx options¶
| Argument | Description | Default |
|---|---|---|
--pps <n> |
Packets per second per stream. The aggregate rate is this value times the number of streams. | 1 |
--payload <bytes> |
UDP payload size, including the 20-byte swx-perf header. Range 20 to 9216; 9188 gives a 9216-byte IPv4 packet, the largest the cloudSwXtch carries, and larger values are dropped. | 200 |
--fill <mode> |
Payload content: deterministic (the pattern rx verifies) or zero. |
deterministic |
--burst <1..128> |
Packets sent back to back per pacer tick. Lower values give smoother traffic. | Automatic |
--timestamp |
Stamp the send time into each packet, so the receiver can measure latency. | Off |
--encap <mode> |
perf-hdr or raw. With raw no swx-perf header is sent and the receiver needs --generic. |
perf-hdr |
--rate-mode <mode> |
cbr (constant rate from --pps), trace or media. |
cbr |
--trace <file> |
Replay a capture’s timing and sizes: file.pcap|file.trace[,speed=X][,loop]. |
|
--media <clip.ts> |
Replay an MPEG-TS clip at its own PCR rate: clip.ts[,loop]. |
|
--sndbuf <bytes> |
Socket send buffer to request. A kernel limit is reported. |
rx options¶
| Argument | Description | Default |
|---|---|---|
--verify <k=v,...> |
window=<n> reorder window in packets (power of two); integrity=fill checks every payload byte, integrity=off checks the sequence only; latency=off|one-way|rtt (needs tx --timestamp; rtt also needs a reflect in the path). |
window=65536, integrity=fill, latency=off |
--ssm <mode>=<ips> |
IGMPv3 source filter: include=10.0.0.7,10.0.0.8 or exclude=10.0.0.7. Multicast UDP only. |
|
--budget <k=v,...> |
What still passes, judged per stream: max-loss=<pkts>, max-latency=<us>, max-jitter=<us>, max-ipdv=<us>. |
No loss tolerated |
--generic |
Count packets without a swx-perf header (another tool, or tx --encap raw). Requires --verify integrity=off. |
|
--inspect <list> |
Extra analysis: timing, mpegts. |
|
--tap <url> |
Mirror every packet to udp://host:port, unix:///path (Linux only) or file:///x.pcap. |
|
--rcvbuf <bytes> |
Socket receive buffer to request. If the kernel caps it, swx-perf says so (raise net.core.rmem_max). |
8 MB |
SRT and RIST options can be passed through with --opt NAME=VALUE (SRTO_* / RISTO_*), repeatable.
Reading the results¶
Every run ends with a summary line and a verdict. On the receiver, the counters mean:
delivered— packets received, verified and counted oncelost— packets confirmed missing between the first and the last packet received on each stream. This is what the verdict uses.missing(live lines only) — gaps not yet confirmed, including packets that may still arrive out of orderdup,ooo— duplicated and out-of-order packetsintegrity_fail— packets whose content did not match what was sentrxq_ovfl— packets the receive socket dropped because its buffer was fullhead_first_seq_max— how many packets at the start of a stream were never seen. The sender numbers every stream from 0, so a receiver that starts after the sender, or joins late, reports its missed head here and not as loss.
START THE RECEIVER FIRST
Because packets missed at the head of a stream are not counted as lost, a receiver started after the sender still reports lost=0. Check head_first_seq_max, or start rx at least one second before tx. See example 6 below.
The exit code carries the verdict, so it can be used directly in scripts:
| Exit code | Meaning |
|---|---|
| 0 | Pass |
| 2 | Fail: loss or timing over budget, content check failed |
| 3 | Degraded: judged, with caveats |
| 4 | Zero delivery: packets offered, nothing counted |
| 5 | Aborted: the run never completed |
| 6 | Agent lost (fleet runs) |
| 7 | Interrupted by a signal |
| 64 | Usage error |
| 70 | The tool itself failed, or a coordinator refused |
Examples¶
Multicast¶
-
Single multicast stream: Run this command on a VM with an xNIC Type 1 to send 10 packets per second to
239.1.1.1, port10000, for 10 seconds:Example with output¶
$ swx-perf tx 239.1.1.1:10000 --pps 10 --seconds 10 tx: 1 stream(s) via swx0 (10.203.101.242), 10 pps/stream (10 aggregate), payload 200, fill deterministic warn: memory not locked (setrlimit RLIMIT_MEMLOCK: Operation not permitted) - page faults may add jitter tx: burst 1 pkt/tick (auto), ~0.0 kHz wakeups tx 11 pkts 11 pps tx 21 pkts 10 pps tx 31 pkts 10 pps tx 41 pkts 10 pps tx 51 pkts 10 pps tx 61 pkts 10 pps tx 71 pkts 10 pps tx 81 pkts 10 pps tx 91 pkts 10 pps tx 100 pkts 9 pps tx done: 100 offered, 100 sent in 10.0s (10 pps), verdict pass -
Run this command on another VM to receive the stream from the previous step. It is started first and runs a few seconds longer, so it sees the whole stream (here on Windows):
Example with output¶
$ swx-perf rx 239.1.1.1:10000 --seconds 15 rx: 1 stream(s) via swx0 (10.203.105.206), 1 socket(s), rcvbuf 8388608, verify window=65536 integrity=fill warn: memory not locked (not implemented on Windows) - page faults may add jitter rx 0 pkts 0 pps streams 0/1 rx 4 pkts 4 pps missing 0 rx 15 pkts 10 pps missing 0 rx 26 pkts 10 pps missing 0 rx 37 pkts 10 pps missing 0 rx 48 pkts 10 pps missing 0 rx 58 pkts 10 pps missing 0 rx 69 pkts 10 pps missing 0 rx 80 pkts 10 pps missing 0 rx 90 pkts 10 pps missing 0 rx 100 pkts 10 pps missing 0 rx 100 pkts 0 pps missing 0 rx done: 100 datagrams in 15.0s (perf=100 generic=0); delivered=100 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=0; verdict pass -
Multiple multicast streams: Send 10 streams, 239.1.2.1 to 239.1.2.10 on port 10000, at 1000 packets per second each (10 000 in total), with a 1316-byte payload:
Example with output¶
$ swx-perf tx 239.1.2.1+10:10000 --pps 1000 --payload 1316 --seconds 10 tx: 10 stream(s) via swx0 (10.203.101.242), 1000 pps/stream (10000 aggregate), payload 1316, fill deterministic warn: memory not locked (setrlimit RLIMIT_MEMLOCK: Operation not permitted) - page faults may add jitter tx: burst 1 pkt/tick (auto), ~10.0 kHz wakeups tx 10,005 pkts 10.0k pps tx 20,012 pkts 10.0k pps tx 30,019 pkts 10.0k pps tx 40,025 pkts 10.0k pps tx 50,032 pkts 10.0k pps tx 60,039 pkts 10.0k pps tx 70,047 pkts 10.0k pps tx 80,054 pkts 10.0k pps tx 90,061 pkts 10.0k pps tx 99,997 pkts 9.9k pps tx done: 99,997 offered, 99,997 sent in 10.0s (10000 pps), verdict passAnd receive all 10 with one command:
Example with output¶
$ swx-perf rx 239.1.2.1+10:10000 --seconds 16 rx: 10 stream(s) via swx0 (10.203.105.206), 1 socket(s), rcvbuf 8388608, verify window=65536 integrity=fill warn: memory not locked (not implemented on Windows) - page faults may add jitter rx 0 pkts 0 pps streams 0/10 rx 1,851 pkts 1.9k pps missing 0 rx 11,852 pkts 10.0k pps missing 0 rx 21,853 pkts 10.0k pps missing 0 rx 31,854 pkts 10.0k pps missing 0 rx 41,855 pkts 10.0k pps missing 0 rx 51,856 pkts 10.0k pps missing 0 rx 61,857 pkts 10.0k pps missing 0 rx 71,858 pkts 10.0k pps missing 0 rx 81,859 pkts 10.0k pps missing 0 rx 91,860 pkts 10.0k pps missing 0 rx 99,997 pkts 8.0k pps missing 0 rx 99,997 pkts 0 pps missing 0 rx done: 99997 datagrams in 16.0s (perf=99997 generic=0); delivered=99997 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=0; verdict pass -
Table output: Print the live counters as a table:
Example with output¶
$ swx-perf rx 239.1.1.4:10000 --seconds 14 --progress table rx: 1 stream(s) via swx0 (10.203.101.242), 1 socket(s), rcvbuf 16777216, verify window=65536 integrity=fill warn: memory not locked (setrlimit RLIMIT_MEMLOCK: Operation not permitted) - page faults may add jitter time pkts pps bps missing dup ovfl 0:01 0 0 0 0 0 0 0:02 0 0 0 0 0 0 0:03 0 0 0 0 0 0 0:04 0 0 0 0 0 0 0:05 95 95 151.9k 0 0 0 0:06 196 100 161.5k 0 0 0 0:07 296 100 159.9k 0 0 0 0:08 397 100 161.5k 0 0 0 0:09 497 100 159.9k 0 0 0 0:10 597 100 159.9k 0 0 0 0:11 697 100 159.9k 0 0 0 0:12 797 100 159.9k 0 0 0 0:13 898 100 161.5k 0 0 0 0:14 999 100 161.5k 0 0 0 0:14 1,000 1 16.0k 0 0 0 rx done: 1000 datagrams in 14.1s (perf=1000 generic=0); delivered=1000 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=0; verdict pass -
JSON report: Add
--jsonto get the full report on stdout, for example to feed a script or a CI job. The excerpt below shows the totals and the verdict:Report excerpt¶
{ "kind": "final", "elapsed_sec": 14.070480174, "rx": { "aggregate": { "delivered_pkts": 1000, "dup_pkts": 0, "integrity_fail": 0, "late_beyond_window": 0, "late_recovered": 0, "lost": 0, "lost_effective": 0, "ooo": 0, "rx_pkts": 1000, "truncated": 0, "truncated_first": 0, "unique_pkts": 1000, "wild_seq": 0 }, "head_first_seq_max": 0, "...": "..." }, "verdict": { "cause": "none", "exit_code": 0, "reasons": [], "status": "pass" } } -
Late receiver: Here the receiver was started 4 seconds after the sender. It still reports
lost=0— the 42 packets it missed at the start appear ashead_first_seq_max=42:Example with output¶
$ swx-perf rx 239.1.1.10:10000 --seconds 10 rx: 1 stream(s) via swx0 (10.203.105.206), 1 socket(s), rcvbuf 8388608, verify window=65536 integrity=fill warn: memory not locked (not implemented on Windows) - page faults may add jitter rx 0 pkts 0 pps streams 0/1 rx 9 pkts 0 pps missing 0 rx 20 pkts 10 pps missing 0 rx 30 pkts 10 pps missing 0 rx 41 pkts 10 pps missing 0 rx 52 pkts 10 pps missing 0 rx 62 pkts 10 pps missing 0 rx 73 pkts 10 pps missing 0 rx 78 pkts 5 pps missing 0 rx 78 pkts 0 pps missing 0 rx done: 78 datagrams in 10.1s (perf=78 generic=0); delivered=78 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=42; verdict pass
Other traffic¶
-
Traffic from another tool: To count packets that carry no swx-perf header — from iPerf, for example — use
--genericwith--verify integrity=off. With swx-perf itself,tx --encap rawsends such packets:swx-perf tx 239.1.1.7:10000 --encap raw --pps 10 --seconds 10 swx-perf rx 239.1.1.7:10000 --generic --verify integrity=off --seconds 15Example with output¶
$ swx-perf rx 239.1.1.7:10000 --generic --verify integrity=off --seconds 15 rx: 1 stream(s) via swx0 (10.203.105.206), 1 socket(s), rcvbuf 8388608, verify window=65536 integrity=off warn: memory not locked (not implemented on Windows) - page faults may add jitter rx 0 pkts 0 pps streams 0/1 rx 7 pkts 7 pps missing 0 rx 7 pkts 7 pps missing 0 rx 18 pkts 10 pps missing 0 rx 29 pkts 10 pps missing 0 rx 40 pkts 10 pps missing 0 rx 50 pkts 10 pps missing 0 rx 61 pkts 10 pps missing 0 rx 72 pkts 10 pps missing 0 rx 82 pkts 10 pps missing 0 rx 92 pkts 10 pps missing 0 rx 100 pkts 8 pps missing 0 rx 100 pkts 0 pps missing 0 rx done: 100 datagrams in 15.1s (perf=0 generic=100); delivered=0 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=0; verdict pass -
Broadcast: Send to the subnet broadcast address of the interface, or to 255.255.255.255:
-
Source-specific multicast: Accept the group only from source 10.0.0.7:
-
SRT: A listener that waits for a caller on port 9000, and a caller that connects to it:
Latency¶
Round-trip latency uses three commands: the sender stamps its packets, a reflect on the far VM sends each packet straight back on a second group, and a receiver on the sending VM measures the round trip. Because one clock measures both ends, the result is exact. One-way latency (--verify latency=one-way) needs no reflector but compares two clocks, so it is approximate and depends on time synchronization.
-
On the far VM, reflect everything received on 239.1.1.8:10000 back to 239.1.1.9:10001:
-
On the near VM, start the receiver for the returning stream:
-
On the near VM, send time-stamped packets:
Receiver output¶
$ swx-perf rx 239.1.1.9:10001 --verify latency=rtt --seconds 17 rx: inspect=seq,timing latency=rtt tap=none rx: 1 stream(s) via swx0 (10.203.101.242), 1 socket(s), rcvbuf 16777216, verify window=65536 integrity=fill warn: memory not locked (setrlimit RLIMIT_MEMLOCK: Operation not permitted) - page faults may add jitter rx 0 pkts 0 pps streams 0/1 rx 33 pkts 33 pps missing 0 rx 133 pkts 100 pps missing 0 rx 233 pkts 100 pps missing 0 rx 333 pkts 100 pps missing 0 rx 434 pkts 100 pps missing 0 rx 535 pkts 100 pps missing 0 rx 636 pkts 100 pps missing 0 rx 737 pkts 100 pps missing 0 rx 837 pkts 100 pps missing 0 rx 937 pkts 100 pps missing 0 rx 1,000 pkts 61 pps missing 0 rx 1,000 pkts 0 pps missing 0 rx done: 1000 datagrams in 17.1s (perf=1000 generic=0); delivered=1000 lost=0 dup=0 ooo=0 integrity_fail=0 rxq_ovfl=0 head_first_seq_max=0; verdict pass timing: 1000 pkts on 1 stream(s); ipdv mean 32.3 p99 86.0 max 296.6 us; jitter max 24.9 us; MDI DF max 1001.17 ms, MLR sum 0 latency (rtt, exact): 1000 samples; min 207.0 mean 240.6 p50 237.6 p99 262.1 max 597.6 us
Linux and Windows¶
swx-perf takes the same commands and options on both. The differences are:
--tap unix:///...is not available on Windows.swx-perf topocannot read the CPU layout on Windows, so--cpus autodoes not pin.--performanceis Linux only.swx-perf benchruns on Linux only.- In Windows PowerShell 5.1, the
>redirection writes UTF-16. To keep a--jsonreport as plain UTF-8, use| Out-File -Encoding utf8 report.json, or redirect fromcmd. - On Linux, a run as a non-root user prints
warn: memory not locked. It is informational; on Windows the same line reads(not implemented on Windows).
Migrating from v4.x¶
The table maps the v4.x commands and options to their v5 equivalents. The v4.x names are not accepted as aliases.
| v4.x | v5 |
|---|---|
swx-perf producer --sendto <T> |
swx-perf tx <T> |
swx-perf consumer --recvfrom <T> |
swx-perf rx <T> |
--nic (mandatory) |
--nic (optional, default auto) |
--payload_length <n> (excluding the header, default 100) |
--payload <n> (including the 20-byte header, default 200, maximum 9216) |
--total_pkts |
--total-pkts |
--json-report |
--json |
--no-perf-header |
tx --encap raw |
--generic |
rx --generic --verify integrity=off |
--random-payload |
Removed; --fill deterministic|zero |
--ssm_include A B / --ssm_exclude A B |
--ssm include=A,B / --ssm exclude=A,B |
--broadcast --broadcast-port P |
Target bcast://subnet:P |
--generic-broadcast |
Target bcast://limited:P |
--rtt-latency with --loopback |
tx --timestamp, swx-perf reflect and rx --verify latency=rtt |
--one-way-latency |
tx --timestamp and rx --verify latency=one-way |
--pcap "file,..." |
tx --trace file.pcap[,speed=X][,loop] to replay; rx --tap file:///x.pcap to record |
--latency-buckets |
Removed; latency percentiles are printed with every latency run |
--dbg, --show-full-packet-bps |
Removed |
-v (version) |
--version or swx-perf version (-v now prints the help) |
239.1.1.1-10:10000 |
239.1.1.1+10:10000 or 239.1.1.1-239.1.1.10:10000 |
UDP://… |
udp://… (lower case) |
NOTE
The default receiver now checks the content of every packet. A test that used --generic to count another tool’s traffic must add --verify integrity=off.
Advanced: scenarios and fleet runs¶
For tests across several VMs, swx-perf runs as an agent on every VM and a coordinator drives them all: it arms every agent, starts the traffic on all of them at the same instant, collects the counters and gives one verdict for the whole fleet. The simplest way to use it is from wXcked Eye. For scripted or CI use, the same engine is available from the command line with a scenario file.
Running traffic from wXcked Eye¶
In wXcked Eye, open System Management and select the Traffic tab. The fabric — one swx-perf agent per xNIC and one coordinator beside OMNI — starts down:

Before starting the fabric¶
The fabric is meant for testing a deployment, not for carrying production traffic. Before starting it:
- xNIC version: update the xNICs to the cloudSwXtch’s version. An agent on an xNIC from an earlier build may not start.
- Cloud rules: the coordinator runs inside the cloudSwXtch and calls each agent on its xNIC’s control interface, on TCP port 7113, for every xNIC type. The security group, NSG or security list of the control subnet must allow TCP 7113 from the cloudSwXtch to the xNICs.
- Host firewall:
| xNIC host | TCP 7113 in the host firewall |
|---|---|
| Windows, xNIC Type 1 | Opened by the xNIC when the fabric starts (rule SwXtchPerf-7113, for swx-perf only), and closed when it stops. |
| Windows, xNIC Type 2 | Not opened. Open it by hand, for example: netsh advfirewall firewall add rule name="swx-perf agent TCP 7113" dir=in action=allow protocol=TCP localport=7113 |
| Linux | Not opened. If the host runs a firewall such as firewalld, open it, for example: sudo firewall-cmd --add-port=7113/tcp (this lasts until the next reboot or firewall reload). |
An agent that can’t be reached shows as unreachable in the agents table, with the reason.
Running traffic¶
- Select Start fabric. Every xNIC starts its own swx-perf agent, and the agents table lists each one with its host, OS, address, version and state. On an xNIC Type 2, the agent sends and receives on the data interface. The fabric stays up for two hours (the TTL badge counts down); Stop fabric ends it sooner, and Reconcile re-checks the agents.
- Choose a preset: mesh (every xNIC sends its own stream and verifies every stream), fan-out (the first xNIC sends, every other one verifies) or fan-in (every other xNIC sends, the first one verifies).
- Set pps (per stream, default 1000), payload (bytes including the 20-byte header, default 1316) and duration (default: until stopped), then select Start traffic. The panel shows the run, packets offered, received and lost, live and when it ends.

Open console opens the coordinator’s own web console, with the full report of each run.
If an agent in the table can’t be reached, it is left out of the run, and the run ends degraded (exit code 3 in the report) even when nothing was lost. Make the agent reachable and select Reconcile before relying on the verdict.
HOSTS WITHOUT AN XNIC
A VM with no xNIC — for example a camera VM feeding a swXtchBridge — can take part too. Start an agent on it by hand (swx-perf agent) and add it under Extra agents as host:7113 or host:7113/nic; the fabric probes it and the presets run over it as well. That VM must accept TCP 7113 from the cloudSwXtch: open it in the security group and in the host firewall.
Stop fabric stops the agents the fabric started, not the ones started by hand: stop those on their hosts.
Running a scenario from the command line¶
The test is written as a scenario: a YAML file that declares the streams, their rates and sizes, which VMs send and which verify, and what counts as a pass.
-
On every VM that takes part, start an agent. It listens on TCP port 7113:
-
Write the scenario. This one sends 10 streams at 500 packets per second each, with a 1316-byte payload, for 10 seconds, and tolerates no loss:
-
Check it without sending anything.
--print-effectiveshows the scenario with every default filled in: -
Run it, naming the agents that send and the ones that verify:
Example with output¶
$ swx-perf run scn.yaml --agents producer=172.31.85.32,consumer=172.31.93.172 --out report.json scenario scn.yaml: 10 stream(s) in 1 group(s) registered ip-172-31-85-32 (172.31.85.32:7113) role=both nic=swx0 protocols=udp,rist,rtp,srt state=idle registered EC2AMAZ-D1B9A0G (172.31.93.172:7113) role=both nic=swx0 protocols=udp,rist,rtp,srt state=idle run run-20260928-160025-000-17668e470062: 10 stream(s) in 1 group(s); 1 producer(s), 1 consumer(s) assigned; fanout 1, per_consumer 10 armed ip-172-31-85-32 | producer nic swx0 (10.203.101.242) armed EC2AMAZ-D1B9A0G | consumer nic swx0 (10.203.105.206) sockets=1 started: traffic begins in 2.0 s t= -1.0s tx offered 0 (0 pps) sent 0 | rx 0 (0 pps) delivered 0 lost 0 dup 0 ovfl 0 | agents 2/2 t= 0.0s tx offered 14 (14 pps) sent 14 | rx 0 (0 pps) delivered 0 lost 0 dup 0 ovfl 0 | agents 2/2 t= 1.0s tx offered 5021 (5000 pps) sent 5021 | rx 5002 (0 pps) delivered 5002 lost 0 dup 0 ovfl 0 | agents 2/2 t= 2.0s tx offered 10029 (5000 pps) sent 10029 | rx 10003 (5000 pps) delivered 10003 lost 0 dup 0 ovfl 0 | agents 2/2 t= 3.0s tx offered 15037 (5000 pps) sent 15036 | rx 15004 (5000 pps) delivered 15004 lost 0 dup 0 ovfl 0 | agents 2/2 t= 4.0s tx offered 20044 (4999 pps) sent 20044 | rx 20005 (5000 pps) delivered 20005 lost 0 dup 0 ovfl 0 | agents 2/2 t= 5.0s tx offered 25051 (5000 pps) sent 25051 | rx 25006 (5000 pps) delivered 25006 lost 0 dup 0 ovfl 0 | agents 2/2 t= 6.0s tx offered 30059 (5001 pps) sent 30059 | rx 30007 (5000 pps) delivered 30007 lost 0 dup 0 ovfl 0 | agents 2/2 t= 7.0s tx offered 35066 (5000 pps) sent 35066 | rx 35008 (5000 pps) delivered 35008 lost 0 dup 0 ovfl 0 | agents 2/2 t= 8.0s tx offered 40074 (5000 pps) sent 40074 | rx 40009 (5000 pps) delivered 40009 lost 0 dup 0 ovfl 0 | agents 2/2 t= 9.0s tx offered 45082 (5000 pps) sent 45082 | rx 45010 (5000 pps) delivered 45010 lost 0 dup 0 ovfl 0 | agents 2/2 t= 10.0s tx offered 50000 (4911 pps) sent 50000 | rx 45010 (5000 pps) delivered 45010 lost 0 dup 0 ovfl 0 | agents 2/2 every producer finished; stopping the consumers after the tail grace t= 11.2s tx offered 50000 (0 pps) sent 50000 | rx 50000 (0 pps) delivered 50000 lost 0 dup 0 ovfl 0 | agents 2/2 run run-20260928-160025-000-17668e470062 done: offered 50000 unique-delivered 50000 | verdict pass cameras count 10 offered 50000 unique 50000 missing 0 failing 0 degraded 0 report: report.json
NOTE
Agents started by hand must be reachable on TCP 7113 from the machine running run: open it in the cloud security group and in the VM’s own firewall. On Windows, for example:
netsh advfirewall firewall add rule name="swx-perf agent TCP 7113" dir=in action=allow protocol=TCP localport=7113
To stop anyone else from driving the agents, start them and the coordinator with the same --token <t> (or the SWX_PERF_TOKEN environment variable), and optionally --coordinator <ip> on the agents — which is how the agents wXcked Eye starts are configured.
Scenario examples¶
swx-perf scenario --example lists ready-made scenarios, and swx-perf scenario --example <name> prints one to start from. swx-perf scenario prints the complete grammar.
| Name | What it shows |
|---|---|
minimal |
The smallest scenario that runs: one group, one stream |
fleet |
A roster, a fan-out and defaults every group inherits |
stress |
2000 streams at rate, with the verifier’s cheapest settings |
sweep |
Find the fabric’s maximum clean rate: ramp, bisect, confirm |
latency-ab |
The same producer and consumer through the fabric and straight over the NIC |
media |
An MPEG-TS clip replayed at its own PCR rate, checked against TR 101 290 |
protocols |
SRT, RIST and RTP alongside plain UDP |
tunnel |
swXtch tunnel encapsulation, including an HA fan-out to two paths |
trace |
A capture’s own timing and sizes, replayed at a chosen rate |
ssm |
IGMPv3 source filters on the consumer’s joins |
explicit |
How many agents take each share, and the streams each one takes |
Measuring the tool’s own ceiling¶
Before looking for the fabric’s limit, measure swx-perf’s own. swx-perf bench sends and receives over the loopback interface, with no xNIC or cloudSwXtch involved, and reports the highest rate the tool itself sustains cleanly on this VM for each payload size. A result near that ceiling says more about the VM than about the fabric. Run it with the same --cpus pinning the real test will use, and keep the result with --out:
Example with output (Linux, 4 vCPU)¶
$ swx-perf bench --payloads 100,1316 --cpus auto --out bench.json
warn: memory not locked (setrlimit RLIMIT_MEMLOCK: Operation not permitted) - page faults may add jitter
bench: loopback, --cpus 1,2 - 2 quiet physical core(s), one logical each, no sibling isolated or busy
bench payload 100: clean at 362,500 pps, dirty at 375,000: generator behind (offered 360430 of ~374975) [cpu_us/pkt tx 2.76 rx 2.14]
bench payload 1316: clean at 325,000 pps, dirty at 337,500: generator behind (offered 333710 of ~337469) [cpu_us/pkt tx 3.00 rx 2.47]
bench: written to bench.json
NOTE
swx-perf bench runs on Linux only. On Windows it stops with bench is not built for Windows yet (exit code 70); the Linux result is the reference.
Finding the maximum clean rate¶
--sweep turns a run into a search: swx-perf raises the rate of every stream step by step, then narrows down to the highest rate that still runs clean, and confirms it. Pass the bench result with --bench: it caps the search at what the generator can drive, and a step the tool itself could not keep up with is reported as limited by the instrument, never as the fabric’s ceiling. Without it, the report says bench: absent.
The search can be tuned with --sweep start=xN,factor=N,max=xN,resolution=N%,step=<dur>,warmup=<dur>,confirm=N, or with a sweep: block in the scenario. swx-perf scenario --example sweep shows an annotated one.
Scripted control¶
Outside wXcked Eye, swx-perf serve keeps a coordinator running with the same web console (by default on 127.0.0.1:7113; --listen 0.0.0.0:7113 exposes it to the network). swx-perf ctl drives it from a script — load and start a scenario, change a group’s rate while it runs, pause, stop, and fetch the report:
swx-perf serve --agents-file roster.txt --listen 0.0.0.0:7113
swx-perf ctl --coordinator 10.0.0.9:7113 start scn.yaml
swx-perf ctl --coordinator 10.0.0.9:7113 rate cameras x2
swx-perf ctl --coordinator 10.0.0.9:7113 wait
ctl wait and ctl report exit with the run’s verdict code, so a pipeline can gate on them. The full list of ctl commands is in swx-perf -h.