[ltp] Latency with ssh connections

Bill Moseley linux-thinkpad@linux-thinkpad.org
Fri, 7 Dec 2007 09:57:22 -0800


Here's another odd one.  Anyone seen this?

I have a T60p running Gutsy and GNOME.  Every day I go to my office
and plugin the LAN cable and power the T60p up.

Then I use my desktop to ssh into the laptop for work.  Lots and lots
of ssh windows.

Now, the laptop is sitting there at a gdm login screen (doesn't
matter, same thing happens if I first login to GNOME on the laptop.)

After ten minutes, which is the 600 seconds that X waits before going
into screen saver "Blanking" mode my ssh sessions become hard to use
due to latency.

Normally if I hold a key down ( 'ddddddddd' ) it will repeat smoothly.
But, at the moment the screen blanks holding down a key results in very
jerky, not even repeating.  It become very annoying to type (anyone
remember 300 BAUD?).

I went thorough the normal stuff -- laptop is plugged and not in power
save mode, that I can see, and /proc/cpuinfo doesn't show any
throttling, /proc/interrupts shows nothing, stracing X, bash, sshd
shows nothing different.

Now, if I just wait long enough for dpms to kick in the latency goes away.
So I have a script that forces dpms off:

 XAUTHORITY=/var/lib/gdm/:0.Xauth sudo /usr/bin/xset -q -display :0.0 dpms force off

And the latency magically goes away.

Now it gets weirder.

I thought I'll just run that command as soon as I ssh in.  But, if I
run that *before* the screen has blanked at 10 minutes then it
*causes* the latency to start.  If I run it a second time then the
latency goes a way.  So, I have a script that runs it twice!

Weird shit.

Well, it's weirder.

After months of running xset dpms force off, and bugging the fine
folks on the xorg list a few times, I got smart and removed gdm so the
laptop boots without starting X.

Well, crap, the latency shows up as soon as I ssh into the laptop.
The laptop's console does not show the latency, just the ssh
connection.

Again, I don't see anything using resources or odd interrupts or
anything else other than the ssh session has weird latency.

Anyone by chance seen anything like this?  Short of a stiff drink, any
ideas what to try?


Thanks,


-- 
Bill Moseley
moseley@hank.org