LinuxXLII · Network PerformanceBandwidth latency
Bandwidth and latency - the two network metrics
What you'll learn
- Define bandwidth and latency
- Measure both with iperf3 and ping
- Recognise bandwidth vs latency problems
- Read network stats from /proc/net
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
Network performance is measured by two primary metrics: bandwidth (how much data per second?) and latency (how long does a packet take?). Both matter; one may be the bottleneck while the other is fine.
Bandwidth
Bandwidth is the data rate of a network path. Measured in bits per second (bps), kilobits (kbps), megabits (Mbps), or gigabits (Gbps).
For example:
- 1 Gbps Ethernet: 125 MB/s maximum throughput.
- 10 Gbps Ethernet: 1.25 GB/s.
- Internet: varies, often 10-1000 Mbps.
Latency
Latency is the time for a packet to travel from source to destination. Measured in milliseconds (ms) or microseconds (µs).
- LAN: <1 ms typical.
- Metro: 1-10 ms.
- Transcontinental: 50-100 ms.
- Satellite: 500+ ms.
Latency is dominated by:
- Speed of light (geographic distance).
- Hop count (routers, switches).
- Queueing in switches and routers.
Measure bandwidth with iperf3
# Server
iperf3 -s
# Client
iperf3 -c server
Output:
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.09 GBytes 935 Mbits/sec 0
- Transfer: total data transferred.
- Bitrate: throughput.
- Retr: retransmissions (0 is ideal).
Measure latency with ping
ping -c 5 server
Output:
64 bytes from server (10.0.0.5): icmp_seq=1 ttl=64 time=0.123 ms
64 bytes from server (10.0.0.5): icmp_seq=2 ttl=64 time=0.156 ms
...
Latency: round-trip time (RTT). <1 ms on LAN, varies by distance for WAN.
Bandwidth vs latency problems
| Symptom | Likely cause |
|---|---|
| Low throughput, normal latency | Bandwidth bottleneck |
| High latency, normal throughput | Path issue (routing, congestion) |
| Both low | Severe problem (congestion, failure) |
| Variable latency | Jitter (queueing) |
For most applications, latency is more important than bandwidth. A 100 ms latency kills interactive response time even on a 1 Gbps link.
Read /proc/net
cat /proc/net/dev
Output:
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier
eth0: 1234567 12345 0 0 0 0 0 0 1234567 12345 0 0 0 0 0
Per-interface:
- bytes: total bytes.
- packets: total packets.
- errs: receive errors.
- drop: receive drops (queue full).
- fifo: FIFO overruns.
- frame: frame errors.
High error or drop counts indicate a problem.
Knowledge check
Knowledge check · 3 questions
Q1. What is the typical latency on a LAN?
Q2. For interactive workloads, bandwidth matters more than latency.
Q3. Which of the following are valid ways to measure network performance? Select all that apply.
Passing score: 75%. Answers are checked in this browser.