Wireless lag

I found that running a server on a wireless device was causing a great deal of network latency. For example, I had MySQL running on a wi-fi’ed laptop and was connecting from a desktop, where I was doing the main development work. The reason for this arrangement is that I keep switching computers and it’s easy to transport Access databases and PHP code files and such from one machine to the other, but it’s more of a pain to move back-end databases around, so I figured I’d just leave it on the laptop and use that as a server. I worked with it that way for a while, but didn’t think to test why the connection seemed so laggy until this morning.

Here’s what happens when I ping my laptop when it’s connected wirelessly:

Pinging 192.168.0.106 with 32 bytes of data:

Reply from 192.168.0.106: bytes=32 time=267ms TTL=128
Reply from 192.168.0.106: bytes=32 time=187ms TTL=128
Reply from 192.168.0.106: bytes=32 time=107ms TTL=128
Reply from 192.168.0.106: bytes=32 time=27ms TTL=128
Reply from 192.168.0.106: bytes=32 time=254ms TTL=128
Reply from 192.168.0.106: bytes=32 time=176ms TTL=128
Reply from 192.168.0.106: bytes=32 time=97ms TTL=128
Reply from 192.168.0.106: bytes=32 time=324ms TTL=128
Reply from 192.168.0.106: bytes=32 time=245ms TTL=128
Reply from 192.168.0.106: bytes=32 time=165ms TTL=128
Reply from 192.168.0.106: bytes=32 time=86ms TTL=128
Request timed out.
Reply from 192.168.0.106: bytes=32 time=134ms TTL=128
Reply from 192.168.0.106: bytes=32 time=55ms TTL=128
Reply from 192.168.0.106: bytes=32 time=283ms TTL=128
Reply from 192.168.0.106: bytes=32 time=203ms TTL=128

Ping statistics for 192.168.0.106:
Packets: Sent = 16, Received = 15, Lost = 1 (6% loss),
Approximate round trip times in milli-seconds:
Minimum = 27ms, Maximum = 324ms, Average = 174ms

Of course when the laptop is wired in I see this:

Pinging 192.168.0.101 with 32 bytes of data:

Reply from 192.168.0.101: bytes=32 timeReply from 192.168.0.101: bytes=32 timeReply from 192.168.0.101: bytes=32 timeReply from 192.168.0.101: bytes=32 timeReply from 192.168.0.101: bytes=32 time
Ping statistics for 192.168.0.101:
Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

So that’s interesting, because when I go the other way around and use the wirelessly connected laptop to ping the wired desktop, the latency is 6ms on average as compared to the average 174ms we saw going the other way.

Well, that’s why it was so laggy, but I can’t tell you why the connection itself behaved that way or if in general that’s how wi-fi works. Anyone know?

This entry was posted in Uncategorized by . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>