Home › Topics › Jitter & Real-Time Traffic › Measuring Jitter

Measuring Jitter Properly


Here is an experience that makes new admins doubt their sanity. You test the same link with two different tools, back to back. One reports jitter of 2.8 ms. The other reports 31 ms. Neither tool is broken. Neither is lying. And until you know why they disagree, every jitter number anyone hands you is a rumor. Meanwhile the users on that link report that calls are fine except when they suddenly are not, which no single number seems to capture either.


Measuring jitter properly means knowing three things. The first is what the tools actually compute (there are several different recipes hiding behind the one word "jitter"). The second is how to collect samples that include the moments users actually feel. The third is which classic mistakes produce confident, meaningless numbers. None of it requires spending money. The two workhorses of this guide are a free traffic tester and the humble ping, plus about six lines of scripting.


If you have not yet read jitter explained, start there for the mental model. This guide assumes you know that jitter is variation in packet arrival spacing and that real-time streams live or die by it. Here we put numbers on it, defensibly.


In this guide

  • What tools actually compute when they say "jitter"
  • Why averages hide the problem
  • Method 1: iperf3 in UDP mode
  • Method 2: a long ping and a little math
  • Method 3: your monitoring platform
  • The four pitfalls that invalidate measurements
  • The measurement runbook

What tools actually compute when they say "jitter"


All jitter measurements start from the same raw material: a stream of test packets sent at known times, and the moments they arrive. From identical raw material, different tools cook different dishes. Two recipes dominate.


Recipe 1: the smoothed running estimate

The recipe used by RTP — the protocol that carries most voice and video — and by tools that imitate it works like a cautious moving average. The tool keeps one running jitter estimate. Each time a packet arrives, it checks how much that packet's spacing deviated from the ideal. It compares the deviation to the current estimate. Then it nudges the estimate a small fraction of the way toward the new value. The standard's recipe moves it one-sixteenth of the gap. In plain words: every packet gets a vote, but no single packet gets to swing the election. If the estimate currently reads 4 ms and a packet arrives a startling 20 ms off-rhythm, the estimate moves to 5 ms, not 20. It takes a sustained run of bad spacing to drag the number up, and a sustained calm to bring it down.


The design is deliberate. It describes the ongoing character of the path without panicking over one hiccup. That is what a jitter buffer needs to know to size itself. The price is that it politely understates isolated spikes — the very events users report as glitches.


Recipe 2: the simple spread

The second family of tools takes the same deviations and reports blunt statistics on them. These statistics are the average of the deviations, or simply the spread between the fastest and slowest samples (max minus min). No smoothing, no memory — one terrible packet in an otherwise perfect minute can dominate the answer. Blunt is not wrong; it answers a different question: "how bad did it get?" rather than "what is it usually like?"


Now the mystery from the intro dissolves. Watch both recipes eat the same data. These are ten inter-arrival gaps from a stream sent at a perfect 20 ms rhythm, in ms: 20, 20, 21, 19, 20, 45, 20, 20, 6, 20. One packet got stuck (the 45), then its successor arrived bunched (the 6). Every other gap was essentially perfect.


RecipeComputation on this dataReported "jitter"The question it answers
Smoothed running estimateeach deviation nudges the estimate 1/16 of the way~2–3 msWhat is this path usually like?
Average deviationmean of deviations from 20 ms: (0+0+1+1+0+25+0+0+14+0)/104.1 msHow wobbly is it overall?
Max–min spreadlargest gap minus smallest: 45 − 639 msHow bad did the worst moment get?

One link, one minute, three honest answers ranging from 2 to 39. The practical rules that follow: never compare jitter numbers from different tools as if they were the same quantity. When someone hands you a jitter figure, ask which recipe produced it. And when judging whether calls will hurt, respect the spread-style numbers. Buffers and ears live in the worst moments, not the average ones.


Why averages hide the problem


That last point deserves its own section, because it is the most common way jitter measurement goes wrong even with good tools. Jitter is not experienced continuously. A path can hold a beautiful 3 ms for fifty-five minutes and detonate for five. Users will describe that path as "terrible," because human memory keeps the glitches and discards the smoothness. An hourly average faithfully reports 5 ms and misleads everyone. The complaint and the measurement are both accurate; they are just answering different questions.


The fix is the same one used for latency and loss everywhere in monitoring. Keep the individual samples and look at percentiles and maximums, not just the mean. The 95th percentile (the value only the worst 5% of samples exceed) tells you what a bad-but-normal moment looks like. The maximum tells you what the worst moment did. For real-time traffic, a useful report is three numbers side by side — median, p95, max — over a window that includes the complaint period. A median of 1 ms with a p95 of 4 ms is a calm link. A median of 1 ms with a p95 of 40 ms is a link with a part-time job hurting your calls. The average would never have told you.


Method 1: iperf3 in UDP mode


The free tool iperf3 is the closest thing to a purpose-built jitter instrument most shops need. It sends a controlled stream of UDP packets from a client to a server you run at the far end. It reports what arrived: throughput, loss, and a jitter figure computed with the smoothed RTP-style recipe. Because you control both ends, it measures a specific path of your choosing rather than a path to someone's arbitrary test server. Examples are office to data center or branch to headquarters.


The trick is to make the test stream resemble a call instead of a firehose. A voice stream is small packets at a modest steady rate. So ask for exactly that: 200-byte datagrams at 64 kbit/s, which works out to roughly a voice call's 40–50 packets per second. On the far-end machine, start the listener; from the near end, run the client for a full minute:


# far end (server)
iperf3 -s

# near end (client): UDP, voice-like profile, 60 seconds
iperf3 -c testsrv.example.internal -u -b 64k -l 200 -t 60

The lines that matter arrive at the end of the run:


[ ID] Interval          Transfer    Bitrate        Jitter    Lost/Total Datagrams
[  5] 0.00-60.00 sec    469 KBytes  64.0 Kbits/sec 0.000 ms  0/2400 (0%)     sender
[  5] 0.00-60.00 sec    467 KBytes  63.7 Kbits/sec 2.914 ms  11/2400 (0.46%) receiver

Read the receiver row — it is the far end's account of what actually arrived. 2.914 ms is the smoothed jitter estimate over the run: this path is usually calm. 11/2400 (0.46%) says eleven of the 2,400 datagrams never arrived. That is genuine loss, worth its own investigation against the thresholds in the acceptable packet loss guide. Two caveats before you frame the result. First, this measured one direction: client toward server. Run it again with -R (reverse) to test the other way. Jitter is routinely worse in one direction than the other, because the queues live on different equipment. Second, remember which recipe this is: a smoothed figure. A clean 2.9 ms can coexist with a handful of nasty spikes that the smoothing forgave. The per-second interval lines above the summary give you a rough view of whether any second stood out.


Tip: resist the temptation to also crank -b to line rate "to really stress it." A full-rate UDP blast is not a measurement. It is a denial-of-service test against your own users. It manufactures queues and then measures the queues it made. Keep fitness tests at workload-like rates; create load separately and deliberately, as described in the pitfalls section.


Method 2: a long ping and a little math


No server at the far end? Ping can be turned into a serviceable jitter instrument. Ping measures round-trip time, and jitter appears in it as sample-to-sample variation. If consecutive pings report 12, 13, 12, 48, 12 ms, the 48 is a jitter event of about 35 ms. In that case, somewhere out there a packet waited in a queue. Computing the differences between consecutive round-trip times gives you a delta series, and percentiles of that series are your jitter numbers. It is cruder than iperf3 — sparser samples than a real call, and the two directions blended into one figure. But it works against any pingable target, needs no cooperation, and can run for hours. That turns out to be its superpower.


On Linux or macOS, collect five samples per second for five minutes, extract the times, then compute consecutive deltas and their percentiles:


# 1. Collect 1500 samples (5/sec for 5 min) and keep just the ms values
ping -i 0.2 -c 1500 voice-gw | sed -n 's/.*time=\([0-9.]*\).*/\1/p' > rtt.txt

# 2. Consecutive |differences|, sorted, then median / p95 / max
awk 'NR>1{d=$1-p; if(d<0)d=-d; print d} {p=$1}' rtt.txt | sort -n \
  | awk '{a[NR]=$1} END{printf "median delta: %.1f ms\np95 delta:    %.1f ms\nmax delta:    %.1f ms\n", a[int(NR*0.50)], a[int(NR*0.95)], a[NR]}'

A healthy wired path prints something like median 0.4 / p95 2.1 / max 9.8. A path with a part-time problem prints median 0.6 / p95 4.0 / max 52.3. That path is calm almost always, with spikes big enough to glitch a call. Now you know to hunt for what is periodic. On Windows, PowerShell does the same job (one sample per second, millisecond resolution — coarser, but fine for spotting trouble):


$r = (Test-Connection voice-gw -Count 300).ResponseTime
$d = for ($i = 1; $i -lt $r.Count; $i++) { [math]::Abs($r[$i] - $r[$i-1]) }
$s = $d | Sort-Object
"p95 delta: " + $s[[int]($s.Count * 0.95)] + " ms"
"max delta: " + $s[$s.Count - 1] + " ms"

The long-run trick: leave the collection running across the whole window when users say calls hurt — a morning, a workday. Note the timestamps of the biggest deltas. Spikes that recur on a schedule are a signature (backup jobs, sync clients, a Wi-Fi channel scan); spikes that track busy hours point at load. The diagnosing jitter guide picks up exactly there.


Method 3: your monitoring platform


Manual tests answer "what is happening right now?" A monitoring platform answers the question that actually settles arguments: "what is normal, and when did it change?" The typical jitter or quality sensor in monitoring software works like a miniature version of Method 2. Each polling cycle it sends a short burst of probes — pings or UDP packets — to a target. It computes the variation within that burst using one of the recipes above. Then it stores the number and draws the trend. Some platforms also read quality statistics that phone systems and gateways expose.


Used well, this gives you the two things one-off tests cannot. One is a baseline (your paths' normal jitter, per hour of day). The other is a timestamp for when things went sideways to correlate with everything else the platform watches — link utilization, device CPU, interface errors. Two limits to respect. A burst of ten probes every five minutes samples a tiny slice of time. Short jitter storms between polls can hide entirely. So a clean sensor graph does not overrule complaining users. It just tells you the storms are shorter than your polling interval. And the sensor's number comes from a recipe like any other tool's. Find out which one yours uses before comparing its output to iperf3's or a phone's call statistics.


The four pitfalls that invalidate measurements


Pitfall 1: measuring over TCP

TCP-based tests — ordinary speed tests, file copies, iperf3 without -u — cannot measure jitter, full stop. TCP retransmits missing pieces, reorders arrivals, and buffers everything before delivery. So the arrival timing your application sees has been laundered clean of the network's actual timing. Real-time media rides UDP precisely to escape that machinery, so test with UDP (or raw ping timing). A TCP test that reports a "jitter" number is reporting something, but not the thing your calls experience.


Pitfall 2: assuming one direction tells the whole story

Jitter is directional, because queues are directional. An office with a congested upstream link can show pristine downstream jitter while upstream audio — your users' voices — arrives at the far end shredded. That produces the maddening complaint pattern "they sound fine to us, we sound terrible to them." That sentence, translated, is a direction. Test both ways (iperf3 with and without -R). And remember ping blends the two directions into one round-trip number — useful, but unable to say which side is guilty.


Pitfall 3: short samples

A ten-second test is a coin flip against a problem that spikes for twenty seconds every five minutes. And periodic spikes are astonishingly common: sync clients, backup windows, wireless scans, a duplicate-address fight. Short tests are for confirming a path is currently awful, never for certifying it healthy. Certification takes minutes at minimum, ideally a run that spans the times users complain about. If the complaint says "every morning around nine," measure through nine.


Pitfall 4: measuring an idle link when the problem is load

The most popular error of all: testing at a quiet moment, finding 2 ms of jitter, and declaring the network innocent. Queues — the engine of jitter — only form under load. So an idle link is on its best behavior and proves nothing about Tuesday's 10 AM all-hands. The honest test is a loaded one. Start a big transfer to saturate the link, run your ping-delta logging alongside, and watch what the deltas do. If they leap from single digits to hundreds, your link's queues are the villain. That is the classic bufferbloat signature. That guide's loaded-latency test is the full procedure with fixes attached.


The measurement runbook


Everything above, folded into the table you will actually use. Start from the question you are trying to answer, run the method beside it, and judge against the right-hand column. The full per-workload bands live in the jitter targets guide.


QuestionMethodWhat good looks like
Is this path fit for voice right now?iperf3 UDP, voice profile, 60+ sec, both directionsJitter in low single digits ms; loss near zero
Does load break it?Saturate the link while logging ping deltas (loaded test)p95 delta stays in low tens of ms even under load
Is it constant or periodic?Long ping-delta log across the complaint window; timestamp the spikesNo repeating spike pattern; max near p95
Is Wi-Fi the culprit?Identical test from a wired and a wireless client at the same spotWired clean; any large gap between the two is the radio's share
What changed, and when?Monitoring platform jitter/response-time sensor trendFlat baseline; excursions correlate with known events
What goes in the report?Median, p95, and max over the window — never the average aloneAll three within the workload's target band

One habit turns this table from a checklist into leverage: write down your results when things are healthy. A measured "normal" for each important path — even a text file of median/p95/max per path — converts every future complaint from "is this bad?" into "is this different?" That is a far easier question to answer at speed.


Where to go next


The craft in one paragraph: "jitter" is one word for several computations, so know your tool's recipe before trusting its number. Averages flatter, so report median, p95, and max. The tool iperf3 with a voice-shaped UDP stream measures the path like a call would. A long ping plus six lines of math turns any target into a jitter probe. And the four pitfalls — TCP, one-direction thinking, short samples, idle links — account for most confidently wrong measurements in the wild.


With trustworthy numbers in hand, the next questions are what they should be — jitter targets by workload — and what to do when they are too high. The guide to diagnosing jitter walks the isolation sequence. And the rest of the Jitter & Real-Time Traffic topic carries on through buffers, QoS, and quality scoring.


Put this into practice with SysPeep Monitor

Manual jitter tests answer "what is happening right now?" A monitoring system answers "what is normal, and when did it change?" SysPeep Monitor polls your devices and paths around the clock, graphs response times, link utilization, and device health over SNMP and WMI. It alerts you when a path drifts from its baseline. So complaints arrive with context already attached. The free trial installs on a Windows machine in minutes.

Download Free TrialLearn About SysPeep