Understanding Network Latency
Table of Contents
What Is Latency?
Network latency is the time it takes for a small piece of data (a packet) to travel from your device to a remote server and back. It is measured in milliseconds (ms) and is often called "ping" or "round-trip time" (RTT). Unlike bandwidth, which measures how much data can be transferred at once, latency measures how long each individual piece of data takes to arrive.
Latency is one of the most important factors in perceived internet responsiveness. When you click a link, your browser sends a request to the server. The server processes it and sends back the response. Each leg of this journey takes time — and that time is latency.
A useful analogy: if bandwidth is the width of a pipe, latency is the length of the pipe. A wide pipe (high bandwidth) can carry a lot of water, but if it's very long (high latency), it takes a long time for water to reach the other end. Conversely, a short, narrow pipe (low bandwidth, low latency) delivers water quickly, but only a small amount at a time.
For many applications, latency matters more than bandwidth. A 10 Mbps connection with 10ms latency will feel more responsive for web browsing than a 1 Gbps connection with 200ms latency, because each request-response cycle completes faster.
Speed of light sets the absolute minimum latency. Light travels through fiber optic cable at about 200,000 km/s (roughly 2/3 the speed of light in vacuum). A packet traveling from New York to London (5,570 km) through undersea fiber takes at least 28ms one way, or 56ms round trip — and that's the theoretical minimum with no processing delays at any point along the route.
Causes of Latency
Latency is caused by multiple factors, each adding delay to the total round-trip time. Understanding these causes helps you identify and address latency problems.
1. Propagation delay (distance): The single biggest factor. Data travels at a finite speed through physical media. The farther the distance, the higher the latency. Fiber optic signals travel at roughly 200,000 km/s; electrical signals in copper are slightly slower. Wireless signals travel at the speed of light but are limited by routing and processing.
2. Transmission delay: The time it takes to push a packet onto the wire. Larger packets take longer to transmit. A 1500-byte packet on a 100 Mbps link takes 0.12ms to transmit; on a 10 Mbps link, it takes 1.2ms.
3. Processing delay: Each router along the path must examine the packet header, decide where to forward it, and update internal data structures. Modern routers process packets in microseconds, but with many hops, this adds up.
4. Queuing delay: When a router is busy, packets wait in a queue before being forwarded. During congestion, queues fill up, and packets may wait milliseconds — or be dropped entirely. This is the primary cause of latency spikes.
5. Protocol overhead: TCP requires a three-way handshake (SYN, SYN-ACK, ACK) before data transfer begins. This adds at least one full round trip before any application data is sent. TLS adds another round trip (or two for TLS 1.2). DNS lookups add additional round trips.
6. Serialization and deserialization: At each network hop, the receiving device must decode the signal (electrical, optical, or radio) into digital data and re-encode it for the next link. This adds small but measurable delays.
7. Wireless-specific delays: WiFi and cellular connections add latency due to medium access control (waiting for a clear channel), retransmissions of lost frames, and signal processing. WiFi typically adds 1–10ms over wired Ethernet; cellular can add 10–50ms.
Ping Explained
Ping is both a tool and a measurement. The ping command sends ICMP (Internet Control Message Protocol) echo request packets to a target and measures how long it takes to receive echo replies.
Example ping output:
$ ping -c 5 google.com
PING google.com (142.250.80.46): 56 data bytes
64 bytes from 142.250.80.46: icmp_seq=0 ttl=117 time=12.3 ms
64 bytes from 142.250.80.46: icmp_seq=1 ttl=117 time=11.8 ms
64 bytes from 142.250.80.46: icmp_seq=2 ttl=117 time=13.1 ms
64 bytes from 142.250.80.46: icmp_seq=3 ttl=117 time=12.0 ms
64 bytes from 142.250.80.46: icmp_seq=4 ttl=117 time=11.5 ms
--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 11.5/12.1/13.1/0.6 ms
Key information in ping output:
- time: Round-trip time for each packet (the main latency measurement)
- min/avg/max: Statistics across all packets — useful for seeing variation
- stddev: Standard deviation — essentially the jitter. Lower is better.
- packet loss: Percentage of packets that never received a reply
- ttl: Time-to-live — decremented at each router hop, can indicate path length
Important caveat: ICMP ping measures latency to the server, but some networks deprioritize or block ICMP traffic. This means ping results may not perfectly represent the latency experienced by actual application traffic (TCP/UDP). However, ping remains a useful baseline measurement.
Different types of ping measurements:
- ICMP ping: Uses echo request/reply. Most common. Blocked by some firewalls.
- TCP ping: Measures time to complete a TCP connection. More representative of real application behavior.
- UDP ping: Sends UDP packets and measures response time. Used by some gaming protocols.
Jitter: Latency's Evil Twin
Jitter is the variation in latency over time. If you send 10 ping packets and get responses of 10ms, 12ms, 11ms, 10ms, and 13ms, your jitter is low (about 1ms). If the responses are 10ms, 80ms, 15ms, 200ms, and 12ms, your jitter is high — even though the average latency might be similar.
High jitter is often worse than consistently high latency for real-time applications. Here's why:
- Audio/video calls: Applications buffer a small amount of data to smooth out jitter. If jitter exceeds the buffer size, you get gaps, stuttering, or robotic-sounding audio.
- Online gaming: Games use prediction algorithms to handle consistent latency. When latency varies unpredictably (high jitter), predictions fail, causing rubber-banding or teleporting characters.
- Streaming: Video streaming services buffer several seconds of content. Moderate jitter is absorbed by the buffer, but extreme jitter can cause rebuffering.
Jitter causes:
- Network congestion causing variable queue depths
- Route changes (BGP reconvergence)
- WiFi interference and medium contention
- Bufferbloat (see below)
- Load balancing across multiple paths with different characteristics
Acceptable jitter levels:
| Jitter | Quality | Impact |
|---|---|---|
| < 5 ms | Excellent | Imperceptible to all applications |
| 5–15 ms | Good | Acceptable for most real-time apps |
| 15–30 ms | Fair | Noticeable on voice calls, gaming |
| 30–50 ms | Poor | Audio dropouts, gaming lag |
| > 50 ms | Very Poor | Severe quality issues across apps |
Bufferbloat: The Hidden Killer
Bufferbloat is a common but often undetected cause of high latency. It occurs when network equipment (routers, modems) uses excessively large buffers to queue packets. When the connection is saturated, these buffers fill up, adding hundreds of milliseconds of latency — even though your bandwidth test might look fine.
How bufferbloat happens:
When your upload bandwidth is fully utilized (e.g., someone uploading a large file), outgoing packets queue in your router's buffer. If the buffer is large (which many consumer routers have by default), packets wait seconds instead of milliseconds. Meanwhile, TCP acknowledgment packets for your downloads also get queued, slowing down download speed too.
How to detect bufferbloat:
- Run a speed test while simultaneously pinging a server. If latency spikes dramatically (from 10ms to 300ms+) during the speed test, you have bufferbloat.
- Use the Waveform Bufferbloat Test or similar tools that specifically measure latency under load.
Bufferbloat grades and what they mean:
| Grade | Latency Under Load | Meaning |
|---|---|---|
| A+ | < 5ms increase | Excellent — SQM is working perfectly |
| A | 5–30ms increase | Great — minimal bufferbloat |
| B | 30–60ms increase | Good — noticeable but acceptable |
| C | 60–200ms increase | Fair — noticeable lag under load |
| D | 200–400ms increase | Poor — significant quality issues |
| F | > 400ms increase | Terrible — severe bufferbloat |
Fixing bufferbloat: Install custom firmware (OpenWrt) with SQM (Smart Queue Management) using the fq_codel or CAKE algorithm. These algorithms keep queues short by intelligently managing which packets get sent first, dramatically reducing latency under load without significantly impacting throughput. Many users report going from grade F to grade A+ by enabling SQM.
Latency Requirements by Application
Different applications have vastly different latency tolerances:
| Application | Ideal Latency | Acceptable | Maximum Tolerable | Why It Matters |
|---|---|---|---|---|
| Competitive FPS gaming | < 20 ms | 20–50 ms | 80 ms | Milliseconds determine hit registration |
| Casual online gaming | < 50 ms | 50–100 ms | 150 ms | Turn-based games tolerate more |
| VoIP / voice calls | < 50 ms | 50–150 ms | 300 ms | Over 150ms causes people to talk over each other |
| Video conferencing | < 50 ms | 50–150 ms | 300 ms | Lip sync issues and conversation overlap |
| Cloud gaming | < 20 ms | 20–40 ms | 60 ms | Input lag makes games unplayable above 60ms |
| Remote desktop (RDP) | < 30 ms | 30–80 ms | 150 ms | Mouse lag becomes frustrating |
| Web browsing | < 50 ms | 50–100 ms | 300 ms | Each request waits for latency |
| Video streaming | < 100 ms | 100–250 ms | 500 ms | Buffering absorbs latency |
| File downloads | Any | Any | N/A | Bandwidth matters more than latency |
Key insight: Applications that require real-time interaction (gaming, calls, remote desktop) are latency-sensitive. Applications that transfer bulk data (downloads, streaming) are bandwidth-sensitive. Many modern applications fall somewhere in between.
How to Reduce Latency
While you can't change the speed of light, there are several practical steps to minimize latency on your connection:
Use wired connections: Ethernet eliminates WiFi's variable latency. WiFi adds 1–10ms on average, but interference can cause spikes of 50ms+. If you must use WiFi, use 5 GHz or 6 GHz bands, stay close to the router, and minimize interference.
Choose nearby servers: In games and applications, select servers geographically close to you. Each 100 km of distance adds roughly 1ms of latency through fiber.
Fix bufferbloat: Enable SQM (fq_codel or CAKE) on your router. This is often the single most impactful change you can make. OpenWrt firmware makes this straightforward on many router models.
Use a wired mesh or MoCA: If running Ethernet isn't practical, MoCA (Multimedia over Coax) adapters use existing coaxial wiring with only 3–5ms added latency. WiFi mesh systems add more latency and are less consistent.
Upgrade your router: Older routers may have slow processors that increase processing delay. Modern routers with hardware NAT and powerful CPUs process packets faster.
Minimize network hops: Use a quality ISP with good peering arrangements. ISPs that peer directly with major content providers (Google, Netflix, Amazon) have fewer hops and lower latency to those services.
Disable unnecessary features: Some router features like deep packet inspection, parental controls, and traffic logging add processing delay. Disable them if latency is a priority.
Use a VPN wisely: VPNs typically add 5–30ms of latency due to encryption overhead and routing through the VPN server. However, in some cases (poor ISP routing), a VPN can actually reduce latency by providing a more direct path.
Tools to Measure Latency
Several tools are available for measuring and monitoring network latency:
Command-line tools:
ping— Built into every OS. Measures basic RTT to a host. Useping -t(Windows) orping [host](continuous on Linux/Mac).traceroute/tracert— Shows latency at each hop along the route. Useful for finding where delays occur.mtr— Combines ping and traceroute, showing real-time latency statistics per hop. Excellent for diagnosing intermittent issues.iperf3— Measures throughput and jitter between two endpoints on your network.
Graphical and web-based tools:
- Speedtest.net — Reports ping along with download/upload speeds. Shows latency to the test server.
- Cloudflare Speed Test — Reports latency, jitter, and packet loss in addition to throughput.
- Waveform Bufferbloat Test — Specifically measures latency under load to detect bufferbloat.
- PingPlotter — Visual traceroute tool that monitors latency over time, excellent for identifying intermittent problems.
- WinMTR — Free Windows tool combining ping and traceroute with continuous monitoring.
Gaming-specific tools:
- Most games have built-in network statistics overlays showing ping, jitter, and packet loss.
- ExitLag / NoPing / Mudfish — Gaming VPN/optimization tools that find the lowest-latency route to game servers.
- Game server browsers often show ping to each server, helping you choose the closest one.
Latency by Connection Type
Different internet technologies have fundamentally different latency characteristics due to their physical medium and architecture:
| Connection Type | Typical Latency | Best Case | Worst Case | Notes |
|---|---|---|---|---|
| Fiber (FTTH) | 1–5 ms | 0.5 ms | 10 ms | Lowest latency technology available |
| Cable (DOCSIS 3.1) | 5–15 ms | 3 ms | 40 ms | Increases with congestion |
| DSL | 10–25 ms | 5 ms | 50 ms | Distance-dependent from DSLAM |
| 5G (mmWave) | 5–15 ms | 1 ms | 30 ms | Theoretically very low, varies with load |
| 5G (sub-6) | 10–30 ms | 5 ms | 50 ms | Similar to good 4G in practice |
| 4G LTE | 20–50 ms | 10 ms | 100 ms | Highly variable with tower load |
| Starlink (LEO satellite) | 30–60 ms | 20 ms | 100 ms | Improving with more satellites |
| Traditional satellite (GEO) | 600–800 ms | 500 ms | 1200 ms | 35,786 km orbit = huge latency |
| Fixed wireless (FWA) | 10–30 ms | 5 ms | 60 ms | Depends on technology and distance |
Why satellite latency is so high: Geostationary satellites orbit at 35,786 km above the equator. A signal must travel up to the satellite, back down to a ground station, then return via the same path. Even at the speed of light, this round trip of ~143,000 km takes about 480ms. Add processing delays, and you get 600ms+ total.
Why fiber is king: Light in fiber travels at about 200,000 km/s. For a connection to a server 50 km away, the round-trip propagation time is only 0.5ms. The remaining latency comes from router processing and queuing — both of which are minimal on modern fiber infrastructure.
For latency-sensitive applications like competitive gaming, VoIP, and remote desktop, fiber is the clear winner. If fiber isn't available, cable is the next best option, followed by 5G fixed wireless. Satellite internet, despite improving bandwidth, remains challenging for real-time applications due to fundamental physics constraints.