sfnt-pingpong

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English

Description

The sfnt-pingpong application measures TCP and UDP latency by creating a single socket between two servers and running a simple message pattern between them. The output identifies latency and statistics for increasing TCP/UDP packet sizes.

Usage

sfnt-pingpong [options] [<tcp|udp|pipe|unix_stream|unix_datagram> [<host[:port]>]]

Options

The following table lists the sfnt-pingpong options:

Table 1. sfnt-pingpong Options
Option Description
--port server port
--sizes single message size (bytes)
--connect connect() UDP socket
--spin spin on non-blocking recv()
--muxer select, poll or epoll
--serv-muxer none, select, poll or epoll (same as client by default)
--rtt report round-trip-time
--raw dump raw results to files
--percentile percentile
--minmsg minimum message size
--maxmsg maximum message size
--minms min time per msg size (ms)
--maxms max time per msg size (ms)
--miniter minimum iterations for result
--maxiter maximum iterations for result
--mcast use multicast addressing
--mcastintf

set the multicast interface. The client sends this parameter to the server.

--mcastintf=eth2 both client and server use eth2

--mcastintf='eth2;eth3' client uses eth2 and server uses eth3 (quotes are required for this format)

--mcastloop IP_MULTICAST_LOOP
--bindtodev SO_BINDTODEVICE
--forkboth fork client and server
--n-pipe include pipes in file descriptor set
--n-unix-d include Unix datagrams in the file descriptor set
--n-unix-s include Unix streams in the file descriptor set
--n-udp include UDP sockets in file descriptor set
--n-tcpc include TCP sockets in file descriptor set
--n-tcpl include TCP listening sockets in file descriptor set
--tcp-serv host:port for TCP connections
--timeout socket SND/RECV timeout
--affinity

'<client-core>;<server-core>' Enclose values in quotes. This option should be set on the client side only. The client sends the <server_core> value to the server. The user must ensure that the identified server core is available on the server machine.

Important: This option will override any value set by taskset on the same command line.
--n-pings number of ping messages
--n-pongs number of pong messages
--nodelay enable TCP_NODELAY

The following table lists the standard options:

Table 2. Standard Options
Option Description
-? --help this message
-q --quiet quiet
-v --verbose display more information

Example TCP Latency Command Lines

[server]# onload --profile=latency taskset -c 1 ./sfnt-pingpong
[client]# onload --profile=latency taskset -c 1 ./sfnt-pingpong \
                      --maxms=10000 --affinity "1;1" tcp <server-ip>

Example UDP Latency Command Lines

[server]# onload --profile=latency taskset -c 9 ./sfnt-pingpong
[client]# onload --profile=latency taskset -c 9 ./sfnt-pingpong \
                      --maxms=10000 --affinity "9;9" udp <server_ip>

Example Output

# version: 1.5.0
# src: 8dc3b027d85b28bedf9fd731362e4968
# date: Tue  9 Feb 13:15:46 GMT 2016
# uname: Linux dellr210g2q.uk.level5networks.com 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
# cpu: model name       : Intel(R) Xeon(R) CPU E3-1280 V2 @ 3.60GHz
# lspci: 05:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
# lspci: 05:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
# lspci: 83:00.0 Ethernet controller: Solarflare Communications SFC9020 [Solarstorm]
# lspci: 83:00.1 Ethernet controller: Solarflare Communications SFC9020 [Solarstorm]
# lspci: 85:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
# eth0: driver: igb
# eth0: version: 3.0.6-k
# eth0: bus-info: 0000:05:00.0
# eth1: driver: igb
# eth1: version: 3.0.6-k
# eth1: bus-info: 0000:05:00.1
# eth2: driver: sfc
# eth2: version: 3.2.1.6083
# eth2: bus-info: 0000:83:00.0
# eth3: driver: sfc
# eth3: version: 3.2.1.6083
# eth3: bus-info: 0000:83:00.1
# eth4: driver: e1000e
# eth4: version: 1.4.4-k
# eth4: bus-info: 0000:85:00.0
# virbr0: driver: bridge
# virbr0: version: 2.3
# virbr0: bus-info: N/A
# virbr0-nic: driver: tun
# virbr0-nic: version: 1.6
# virbr0-nic: bus-info: tap
# ram: MemTotal:       32959748 kB
# tsc_hz: 3099966880
# LD_PRELOAD=libonload.so
# server LD_PRELOAD=libonload.so
# onload_version=201205
# EF_TCP_FASTSTART_INIT=0
# EF_POLL_USEC=100000
# EF_TCP_FASTSTART_IDLE=0
#
#       size    mean    min     median  max     %ile    stddev  iter
        1       2453    2380    2434    18288   2669    77      1000000
        2       2453    2379    2435    45109   2616    90      1000000
        4       2467    2380    2436    10502   2730    82      1000000
        8       2465    2383    2446    8798    2642    70      1000000
        16      2460    2380    2441    7494    2632    68      1000000
        32      2474    2399    2454    8758    2677    71      1000000
        64      2495    2419    2474    12174   2716    77      1000000

The output identifies mean, minimum, median and maximum (nanosecond) ½ RTT latency for increasing packet sizes including the 99% percentile and standard deviation for these results. In the above example a message size of 32 bytes has a mean latency of 2.4 microseconds with a 99%ile latency less than 2.7 microseconds.