What can I help you with?
NVIDIA Accelerated IO (XLIO) Documentation Rev 3.40.2

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

      Copy
      Copied!
                  

      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:

    Copy
    Copied!
                

    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:

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so sockperf sr -i <server ip> --msg-size=65507

  • To run the client, use:

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so sockperf tp -i <server ip> --msg-size=65507

Note

For more sockperf Server or Ping-pong options run:

Copy
Copied!
            

# 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

  1. Run sockperf server on Host A:

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so sockperf sr

  2. Run sockperf client on Host B:

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so sockperf pp –i <server_ip>

TCP

  • To run the server, use

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so XLIO_SPEC=latency sockperf sr -i <server ip> --tcp

  • To run the client, use:

    Copy
    Copied!
                

    sudo LD_PRELOAD=libxlio.so XLIO_SPEC=latency sockperf pp -i <server ip> --tcp -t4

Note

For more sockperf Server or Ping-pong options run:

Copy
Copied!
            

# sockperf sr -h # sockperf pp –h

© Copyright 2025, NVIDIA. Last updated on Feb 24, 2025.