Operations 7 min read

How to Measure Network Bandwidth and Latency with qperf

This guide explains why bandwidth and latency matter for network servers, introduces the qperf tool, shows how to install and run it on Linux, and demonstrates advanced options for testing different message sizes and protocols to uncover performance bottlenecks.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Measure Network Bandwidth and Latency with qperf

When building network servers, bandwidth determines the maximum load while latency limits the achievable QPS for request‑response protocols. Real‑world measurements often differ from theoretical values because of driver settings, switch hops, packet loss, protocol‑stack configuration, and physical link speed.

Installing qperf

qperf is included in the RHEL 6 distribution, so installation is straightforward:

yum install qperf

Basic usage

Run qperf without arguments on one host to start it in server mode: $ qperf On a second host, invoke qperf with the server’s address and the test name, e.g.: $ qperf 10.232.64.yyy tcp_bw tcp_lat conf The command returns bandwidth, latency, and CPU utilization for the TCP test, along with configuration details of both nodes.

Sample output

tcp_bw: bw = 118 MB/sec
tcp_lat: latency = 31.9 us
loc_node = xxx.sqa.cm4
loc_cpu = 16 Cores: Intel Xeon L5630 @ 2.13GHz
loc_os = Linux 2.6.32-131.21.1.tb477.el6.x86_64
loc_qperf = 0.4.6
rem_node = yyy.sqa.cm4
rem_cpu = 16 Cores: Intel Xeon L5630 @ 2.13GHz
rem_os = Linux 2.6.32-131.21.1.tb477.el6.x86_64
rem_qperf = 0.4.6

Advanced options – looping over a variable

qperf can repeat a test while varying a parameter using the -oo (or -loop) option: $ qperf -oo msg_size:1:64K:*2 10.232.64.yyy tcp_bw tcp_lat This runs the TCP bandwidth test for message sizes from 1 byte up to 64 KB, doubling each step. Sample results show bandwidth rising from 2.43 MB/s for 1 B messages to 118 MB/s for 64 KB messages, while latency remains low for small messages and grows sharply as the size approaches 1 KB.

Observations

The measurements reveal that bandwidth plateaus around 118 MB/s, and latency jumps dramatically when the packet size exceeds roughly 1 KB, providing useful thresholds for performance tuning.

Other protocols

Besides TCP, qperf can test RDMA, UDP, SCTP, and other common network transports, making it a versatile tool for network performance analysis.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

network performanceLinux networkingbandwidth measurementlatency testingqperf
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.