- Red Hat Enterprise Linux
- How to use
qperfto measure network bandwidth and latency performance?
- Is there a supported alternative to
iperfto measure network throughput?
- How do I test performance of RDMA?
qperf from the RHEL server channel on both the qperf Server and qperf Client:
[root@yourQperfServer ~]# yum install qperf [root@yourQperfClient ~]# yum install qperf
Checking for Bandwidth
Server (Receiving Data)
Have one system listen as a qperf server:
[root@yourQperfServer ~]# qperf
The server listens on TCP Port 19765 by default. This can be changed with the
This port will need to be allowed in any firewall present. On iptables:
[root@yourQperfServer ~]# iptables -I INPUT -m tcp -p tcp --dport 19765 -j ACCEPT && iptables -I INPUT -m tcp -p tcp --dport 19766 -j ACCEPT
Or on firewalld, once qperf makes a connection, it will create a control port and data port , the default data port is 19765 but we also need to enable a data port.
[root@yourQperfServer ~]# firewall-cmd --permanent --add-port=19765/tcp --add-port=19766/tcp success [root@yourQperfServer ~]# firewall-cmd --reload success [root@yourQperfServer ~]#firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: enp0s25 sources: services: ssh dhcpv6-client http https ports: 19765/tcp 19766/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
Have the other system connect to qperf server as a client:
[root@yourQperfClient ~]# qperf -ip 19766 -t 60 --use_bits_per_sec <server hostname or ip address> tcp_bw
Results are printed on the client only, the following result shows throughput between these two systems is 16.1 gigabit per second:
tcp_bw: bw = 16.1 Gb/sec
--use_bits_per_sec option is not used, the throughput is supplied in GiB per second (or other applicable IEC binary unit):
tcp_bw: bw = 1.94 GB/sec
Checking for latency
[root@yourQperfClient ~]# qperf -vvs <server hostname or ip address> tcp_lat
Results are printed on the client only, the following result shows latency value is
311 Microseconds and then there are few other details as well.
loc_xx shows details from local system perspective and
rem_xx shows the same from remote system perspective. Refer
man qperf for more options / verbosity.
tcp_lat: latency = 311 us msg_rate = 3.22 K/sec loc_send_bytes = 3.22 KB loc_recv_bytes = 3.22 KB loc_send_msgs = 3,218 loc_recv_msgs = 3,217 rem_send_bytes = 3.22 KB rem_recv_bytes = 3.22 KB rem_send_msgs = 3,217 rem_recv_msgs = 3,217
Other tests are available, including UDP bandwidth and latency, SCTP bandwidth and latency, and other protocols which run on RDMA.
TESTS section of
man qperf for more details.
- qperf is a network bandwidth and latency measurement tool which works over many transports including TCP/IP, RDMA, UDP, and SCTP.
- Red Hat Enterprise Linux
- Learn more
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.