Strange intermittent lag phenomenon over wireless LAN

0

I'm connecting to computer Y on my wireless LAN at home. Y is a newly-assembled machine running Kubuntu 14.04; it's wireless adapter is "Realtek RTL8192CE PCIe (rev 01)". Between other machines on the WLAN I get reasonable behavior, no strange delays etc (specifically, typing in a terminal over an SSH connection is responsive). However, when SSHing to Y, the establishing the connection takes longer than expected, and later on there are occasional delays between the time a key was pressed and the time it shows up on screen. 'lag', if you will. Except that it is inconsistent, and sometimes the lag goes away for a few seconds and resumes again.

I'm not seeing something particularly interesting in the logs, but I may well be overlooking a hint somewhere.

My suspicion is that this has something to do with the network stack, maybe the wireless driver. What can I do to pinpoint the problem?

Notes:

  • Seeing timeouts also when using CIFS/SMB.
  • Another machine that is very close-by doesn't exhibit the same behavior when I connect to it.
  • Load average is very low, the machine is mostly idle.
  • Just tried connecting machine Y with Ethernet to one of my other machines - and that makes the problem go away (!). I still want to connect via WLAN though.

Contents of /proc/lan/wireless:

Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
 wlan0: 0000   46.  -64.  -256        0      0      0      0   4313        0

link ranges from 34 to 58, level from -246 to -50, noise is -256 all the time. Discarded packets figure is for 7.5 hours of uptime.

top 4 powertop entries:

     Usage       Events/s    Category       Description
   1.4 ms/s     101.2        Process        kwin -session 10146e4d
   3.7 ms/s      33.6        Process        /usr/lib/firefox/firef
 640.7 µs/s      32.4        Process        /usr/bin/java -Dosgi.r
  48.8 µs/s      21.7        kWork          ieee80211_iface_work

einpoklum

Posted 2015-04-25T16:30:54.060

Reputation: 5 032

1There are some other machines that use the same wireless channel, example Microwaves, TV signal repeaters, etc. You can start by checking the wireless signal with:

watch -n 1 cat /proc/net/wireless< – cfreire – 2015-04-25T18:15:36.817

@cfreire: Added results of that to the question. – einpoklum – 2015-04-25T18:35:20.907

Apparently you have a poor WI-fi connection (link 34 / level -256) good values (link 70 / level -30). Noise -256 indicates no outside interference. Try, if possible move equipment to increase these values – cfreire – 2015-04-25T19:00:12.457

@cfreire: Playing with the antennae and moving the box around improves the values - but behavior remains the same. – einpoklum – 2015-04-25T19:09:49.770

OK. In another direction. Is your loadvg (first value) above the number of cores?

watch -n -1 cat /proc/loadavg< – cfreire – 2015-04-25T19:19:21.723

1Can you try the conection with another link, ex. ethernet? – cfreire – 2015-04-25T19:25:03.013

@cfreire: Ethernet make the problem go away. Load average is very small (0.02), I don't do much with the box right now - just hooked it up... – einpoklum – 2015-04-25T19:39:31.333

If possible verify the power saving for the wireless link

powertop

and

iwlist wlan0 power< – cfreire – 2015-04-25T19:53:23.130

On #powertop (3TAB - STATS) see if wifi card is using all the power at 100% try disabe with #sudo iw wlan0 set power_save off – cfreire – 2015-04-25T20:16:36.853

No answers