Skip to content

Instantly share code, notes, and snippets.

@igrigorik
Last active Dec 10, 2015
Embed
What would you like to do?
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 192.168.1.1 (5 minutes worth) | grep | cut | massage | R > results.gist

@inkel

This comment has been minimized.

Copy link

@inkel inkel commented Dec 24, 2012

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

@dreww

This comment has been minimized.

Copy link

@dreww 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.

@igrigorik

This comment has been minimized.

Copy link
Owner Author

@igrigorik igrigorik commented Dec 24, 2012

@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.

@evnm

This comment has been minimized.

Copy link

@evnm 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 192.168.1.1 | 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