Using sockperf with XLIO
Sockperf is XLIO's sample application for testing latency and throughput over a socket API. The precompiled sockperf binary is located in /usr/bin/sockperf.
For detailed instructions on how to optimally tune your machines for XLIO performance, please see the Tuning Guide and XLIO Performance Tuning Guide.
For more information, please refer to Appendix: Sockperf – UDP/TCP Latency and Throughput Benchmarking Tool v3.40 and sockperf help using sockperf -h.
To determine the maximum bandwidth and highest message rate for a single-process, single-threaded network application, sockperf attempts to send the maximum amount of data in a specific period of time.
TCP
Server side:
Increase RX buffer. With privileged permissions run:
sysctl -w net.ipv4.tcp_rmem="16777216 16777216 16777216"
sysctl -w net.core.rmem_default=16777216
To run the server, use
sudo LD_PRELOAD=libxlio.so XLIO_LRO=
1
XLIO_TCP_QUICKACK=1
sockperf sr -i <server ip> --msg-size=65507
--tcp
To run the client, use:
sudo LD_PRELOAD=libxlio.so XLIO_TSO=
1
XLIO_TX_BUF_SIZE=16384
sockperf tp -i <server ip> --msg-size=65507
--tcp -t4
UDP
To run the server, use:
sudo LD_PRELOAD=libxlio.so sockperf sr -i <server ip> --msg-size=
65507
To run the client, use:
sudo LD_PRELOAD=libxlio.so sockperf tp -i <server ip> --msg-size=
65507
For more sockperf Server or Ping-pong options run:
# sockperf sr –h
# sockperf tp –h
Example - Running sockperf Ping-pong Test (Measure latency)
To measure latency statistics, after the test completes, sockperf calculates the route trip times (divided by two) between the client and the server for all messages, then it provides the average statistics and histogram.
UDP
Run sockperf server on Host A:
sudo LD_PRELOAD=libxlio.so sockperf sr
Run sockperf client on Host B:
sudo LD_PRELOAD=libxlio.so sockperf pp –i <server_ip>
TCP
To run the server, use
sudo LD_PRELOAD=libxlio.so XLIO_SPEC=latency sockperf sr -i <server ip> --tcp
To run the client, use:
sudo LD_PRELOAD=libxlio.so XLIO_SPEC=latency sockperf pp -i <server ip> --tcp -t4
For more sockperf Server or Ping-pong options run:
# sockperf sr -h
# sockperf pp –h