Very long lag time using SSH via Wifi in factory Debian OS
#1
When I SSH into my PBP everything runs like it is in super slow motion.  Logging in is slow, but where the lag really stands out is even a single keystroke takes 10-30 seconds to register after logging in.  This is the case ssh'ing in from both my linux desktop and using an SSH client on my android tablet.  From the web searching I've done I gather that the issue is usually due to the local network.  However, I don't have the same issue ssh'ing into my raspberry pi on the same network, or to my linux desktop from my tablet.  After poking around for a while, I've narrowed it down some.  I made a bootable SD card with Manjaro (Manjaro-ARM-xfce-pbpro-19.12.1.img.xz).  Using Manjaro I can connect to the PBP via SSH with the PBP connected either via wifi or via a usb to LAN adapter and I don't experience the lag.  I've also found that the lag goes away in the factory version of Debian if I am connected via usb/LAN.  

Interestingly, I can SSH into the PBP running Debian over wifi if the PBP is also connected to the USB/LAN adapter*.  For example, with the PBP disconnected  from the USB/LAN adapter, I can SSH into the IP address for the PBP wireless connection.  The connection has the normal lag, until I connect the USB/LAN adapter.  Then after the PBP is connected to both network connections, SSH responds normally, without the extreme lag.  If I disconnect the USB/LAN adapter, the SSH connection remains open, but the lag returns.  

I was able to duplicate the issue booting from an SD card with a fresh image of the latest Debian stock build (pinebookpro-debian-desktop-mrfixit-191123.img).  I booted from this image and without making any changes hand typed in my wifi password to connect it to the network (to rule out if my using a wired connection first was part of the issue).  The lag was there when I connected from my linux desktop.  Here is the output from when I did this.  Obviously it doesn't show the lag, but it shows that I'm connecting via the wireless IP address of the PBP, confirmed by the output of "ip a" (Note, I've replaced my desktop user name with "redbeardsdesktop"):


Code:
redbeardsdesktop@redbeardsdesktop-TH67B:~$ sudo rm /home/redbeardsdesktop/.ssh/known_hosts
[sudo] password for redbeardsdesktop:               
redbeardsdesktop@redbeardsdesktop-TH67B:~$ ssh rock@192.168.254.205
The authenticity of host '192.168.254.205 (192.168.254.205)' can't be established.
ECDSA key fingerprint is SHA256:hHR69CVU/VgxLl3RJdmQx0renmV3P0F/uZ1HWXL2D/c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.254.205' (ECDSA) to the list of known hosts.
rock@192.168.254.205's password: 
Linux Debian-Desktop 4.4.202 #1 SMP Thu Nov 21 20:47:27 EST 2019 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
rock@Debian-Desktop:~$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  smplayer
rock@Debian-Desktop:~$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  smplayer
rock@Debian-Desktop:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c0:84:7d:25:1b:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.205/24 brd 192.168.254.255 scope global dynamic wlan0
       valid_lft 14219sec preferred_lft 14219sec
    inet6 fe80::a8fe:eb59:341f:1e31/64 scope link 
       valid_lft forever preferred_lft forever
rock@Debian-Desktop:~$ 


At this point, I was able to connect but had the previously mentioned lag.  Then, I connected my USB/LAN adapter and waited until the PBP had established a wired network connection as well.  In the same SSH session (over wifi), the lag then went away.  Again during the same session, I unplugged the wired connection and the lag reappeared.  Here is the remainder of the output from the SSH session:


Code:
rock@Debian-Desktop:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c0:84:7d:25:1b:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.205/24 brd 192.168.254.255 scope global dynamic wlan0
       valid_lft 14143sec preferred_lft 14143sec
    inet6 fe80::a8fe:eb59:341f:1e31/64 scope link 
       valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:e0:4c:68:04:1e brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.19/24 brd 192.168.254.255 scope global dynamic eth0
       valid_lft 14390sec preferred_lft 14390sec
    inet6 fe80::fb0d:8281:2421:80fc/64 scope link 
       valid_lft forever preferred_lft forever
rock@Debian-Desktop:~$ echo "now it is fast"
now it is fast
rock@Debian-Desktop:~$ echo "removing wired connection now"
removing wired connection now
rock@Debian-Desktop:~$ echo "now it is very slow"
now it is very slow
rock@Debian-Desktop:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c0:84:7d:25:1b:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.205/24 brd 192.168.254.255 scope global dynamic wlan0
       valid_lft 13972sec preferred_lft 13972sec
    inet6 fe80::a8fe:eb59:341f:1e31/64 scope link 
       valid_lft forever preferred_lft forever
rock@Debian-Desktop:~$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  smplayer
rock@Debian-Desktop:~$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  smplayer
rock@Debian-Desktop:~$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  smplayer
rock@Debian-Desktop:~$ exit
logout
Connection to 192.168.254.205 closed.

Can anyone else duplicate this issue?  If you SSH into your PBP running the factory Debian with only a wireless connection, do you experience a long lag time?  Any suggestions?

Thanks!

*I didn't know it was possible to have more than one active network connection/IP address at any given time.
#2
I've experienced similar lags using ssh. I assumed it was the CPUs running "on-demand". Could that be what's going on here? I've been meaning to try setting the system to performance mode and see if that keeps things running smoothly. Seems unnecessary to keep the machine in a frugal power-saving mode if it's plugged in.
#3
I just checked with putty,, using ssh protocol. Seemed fine, normal
Perhaps you could try that?
#4
(02-15-2020, 09:12 AM)rleasle Wrote: I've experienced similar lags using ssh.  I assumed it was the CPUs running "on-demand".  Could that be what's going on here? I've been meaning to try setting the system to performance mode and see if that keeps things running smoothly. Seems unnecessary to keep the machine in a frugal power-saving mode if it's plugged in.

That was something I wondered about too.  I tried upping the CPUs to 2 GHz and on my machine at least it didn't solve the issue.  I would be curious if it makes a difference on your machine.

wdt
Quote:I just checked with putty,, using ssh protocol.  Seemed fine, normal

Perhaps you could try that?

Great idea.  I wouldn't have thought to try it.  It definitely is faster, but there is still a noticeable lag when the PBP is connected only to wifi.  Instead of taking 10-30 seconds to appear, individual keystrokes come onto the screen in 1-3 seconds, so it is 10x faster.  If all else fails, this will be a helpful workaround.  Out of curiosity I tried connecting the USB/LAN adapter part way into a putty session, and it made the lag go away.  

When you use putty connecting to the PBP (with the PBP only connected to the network via wifi), does it keep up with your typing, or does it have a small lag?
#5
>does it keep up with your typing, or does it have a small lag?
Only wifi, no apparent lag, didn't type a lot,, just now typed a long line, no lag
No special setup with putty


Possibly Related Threads…
Thread Author Replies Views Last Post
  Official Debian support moonwalkers 64 64,176 07-08-2024, 01:40 PM
Last Post: Humid Stylus
  Debian on Pinebook Pro u974615 7 2,861 03-31-2024, 10:11 AM
Last Post: u974615
  Pinebook Pro upgrading from the factory image yamsoup 12 4,106 02-22-2024, 04:02 PM
Last Post: tllim
  install debian on pbp jsch 7 5,391 11-22-2023, 04:22 PM
Last Post: TRS-80
  Manjaro ARM: enabling external monitors & fixing Broadcom WiFi after updating trifleneurotic 2 1,632 11-14-2023, 10:57 AM
Last Post: trifleneurotic
  How to mainline kernel on daniel thompson's debian installer? hellojack 14 9,817 09-07-2023, 09:38 PM
Last Post: Der Geist der Maschine
  Unable to install Debian Bullseye because of missing wifi firmware Pino64 7 5,362 07-15-2023, 02:58 PM
Last Post: u974615
  5GHz wifi not working snorwood 11 7,483 01-16-2023, 03:41 PM
Last Post: ehcorn
Question Debian (Vanilla) no output on display after Kernel update (6.0.8-1) as365n4 1 1,649 12-09-2022, 12:43 PM
Last Post: as365n4
  Unsuccessful using danielt's unofficial Debian installer on the PBP joeDoe 2 2,933 12-09-2022, 05:04 AM
Last Post: ndp

Forum Jump:


Users browsing this thread: 1 Guest(s)