Skip to content

Instantly share code, notes, and snippets.

Last active December 10, 2015 02:48
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igrigorik/4370730 to your computer and use it in GitHub Desktop.
Save igrigorik/4370730 to your computer and use it in GitHub Desktop.
Home router latency (Linksys E1550) - quick test.

Quick, take a guess, what's the first hop latency to your home wireless router?

Below 1ms, right? Yeah, you wish!

Below are results from a quick test on my home router (Linksys E1550). Some lessons learned:

  • 3-8ms median
  • very different latency tails on different channels (1,6,11)
  • running in mixed mode helps tame the long tails (do it, if you can)
  • all tests on 2.4Ghz, unfortunately E1550 can't do 5Ghz
  • for whatever reason, lots of "phantom" devices seem to like channel 11

Started with channel 6, mixed mode. Now running on channel 1, with N-only.. 2x difference for 90 percentile, and 1ms shaved off the median. Of course, these settings will change as different devices come online...

P.S. Rough methodology: ping (5 minutes worth) | grep | cut | massage | R > results.gist

Copy link

inkel commented Dec 24, 2012

What's the massage program that you used? Can't find any references to it.

Copy link

dreww commented Dec 24, 2012

could the correlation with channel be due to particularities in your local RF environment? More contention on a given channel seems like it could have a measurable impact.

Copy link

@inkel nothing in particular, just combination of sed, cut, and some data munging in R to produce the graphs.

@dreww yeah, absolutely. the first diagram shows overlap of other, nearby clients that my computer picked up.. about ~10 networks. The latency and performance will obviously vary based on what they're up to.

Copy link

evnm commented Dec 26, 2012

Here's an example methodology. It's pretty basic compared to Ilya's setup, but can hopefully get you started.

A one-liner that teases out and prints the latency measurements unbuffered to stdout:

ping | grep --line-buffered time | awk '{ print $7; fflush(); }' | tr -u -d time=

If you've dumped this output in a file (say, /tmp/latency.txt), you can generate histograms in an R console:

$ r
> data <- readLines("/tmp/latency.txt")
> hist(as.numeric(data))

You can fiddle with the breaks parameter to hist() in order to vary the number of buckets in your histogram:

hist(as.numeric(data), breaks=25)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment