keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.92k stars 1.23k forks source link

Keybase is awfully laggy after upgrading to 2.0.0.x on Linux Mint #12154

Open hanshchou opened 6 years ago

hanshchou commented 6 years ago

Keybase GUI Version: 2.0.0-20180531221959+e59b6ec60d

Linux Mint Info: RELEASE=18.3 CODENAME=sylvia EDITION="Xfce 64-bit" DESCRIPTION="Linux Mint 18.3 Sylvia"

It lags when starting up the app, but it is most painful when entering text in chat -- it takes 2 seconds after key-press for the entry to show up. I tried to purge the installation and re-install, but the behavior is as before. What happened?!

strib commented 6 years ago

If you do a keybase log send, and post the resulting ID here, I can take a look.

strib commented 6 years ago

By the way, make sure you restarted Keybase (via run_keybase) after upgrading, otherwise you wouldn't be running the newest KBFS version. (A recent older version had some slowness issues that we fixed in the latest release.)

hanshchou commented 6 years ago

Great, thanks -- here it is: b27f0af45c49bfbb6a7a311c

hanshchou commented 6 years ago

I killed all keybase processes and re-started keybase with run_keybase and the lag persisted. response of each key press and drop down menus are still ~2 seconds.

maxtaco commented 6 years ago

Can you look at top to see which process is taking the most CPU?

hanshchou commented 6 years ago

Can you look at top to see which process is taking the most CPU

top - 12:46:14 up 1 day, 49 min,  1 user,  load average: 0.25, 0.51, 0.49
Tasks: 388 total,   1 running, 387 sleeping,   0 stopped,   0 zombie
%Cpu0  :  1.3 us,  0.3 sy,  0.0 ni, 98.0 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu1  :  0.7 us,  1.0 sy,  0.0 ni, 98.0 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  5.0 us,  4.0 sy,  0.0 ni, 91.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.3 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  1.3 us,  6.7 sy,  0.0 ni, 91.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  1.7 us,  0.0 sy,  0.0 ni, 98.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  0.3 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  1.0 us,  0.3 sy,  0.0 ni, 98.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu8  :  0.3 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu9  :  0.3 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu10 :  0.3 us,  0.7 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu11 :  0.3 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 49432448 total, 30570656 free,  8668860 used, 10192932 buff/cache
KiB Swap: 50313212 total, 50313212 free,        0 used. 39441524 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                  
 8808 root      20   0  554288 221680 121040 S   9.6  0.4  44:35.66 Xorg                                                                                     
10236 chouh     20   0 1769552 749824  83836 S   9.3  1.5  26:09.55 plugin-containe                                                                          
 9358 chouh     20   0 3261240 694040 198936 S   2.0  1.4  34:19.20 firefox                                                                                  
10055 chouh     20   0 2136468 403780  82508 S   2.0  0.8  45:00.58 Web Content                                                                              
 9875 chouh     20   0 2785096 612316 151632 S   1.0  1.2  30:49.84 Web Content                                                                              
 7423 chouh     20   0 1546996 111760  55864 S   0.7  0.2   0:15.21 remmina                                                                                  
    9 root      20   0       0      0      0 S   0.3  0.0   0:31.36 rcu_sched                                                                                
 3566 chouh     20   0 4435472 1.153g 143180 S   0.3  2.4  38:48.17 chromium-browse                                                                          
 4851 chouh     20   0 1823428 169688  70644 S   0.3  0.3   1:37.39 chromium-browse                                                                          
 7194 chouh     20   0 2067308 418552 146608 S   0.3  0.8  12:47.57 chromium-browse                                                                          
 9371 chouh     20   0  596896  44064  31072 S   0.3  0.1   0:09.80 xfce4-terminal                                                                           
 9409 chouh     20   0  317300  16748  14664 S   0.3  0.0   4:02.83 panel-11-system                                                                          
10047 chouh     20   0 2203984 270848  89220 S   0.3  0.5  19:10.79 Web Content                                                                              
26131 root      20   0       0      0      0 S   0.3  0.0   0:00.27 kworker/u66:0                                                                            
28340 root      20   0       0      0      0 S   0.3  0.0   0:00.24 kworker/6:1                                                                              
29332 chouh     20   0  167092  13084  10420 S   0.3  0.0   0:02.35 VBoxXPCOMIPCD                                                                            
30043 chouh     20   0   42100   3968   3176 R   0.3  0.0   0:00.07 top                                                                                      
    1 root      20   0  185604   6280   4036 S   0.0  0.0   0:03.22 systemd                                                                                  
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.10 kthreadd                                                                                 
    4 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H                                                                             
    7 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 mm_percpu_wq                                                                             
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.56 ksoftirqd/0                                                                              
   10 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh                                                                                   
   11 root      rt   0       0      0      0 S   0.0  0.0   0:00.02 migration/0                                                                              
   12 root      rt   0       0      0      0 S   0.0  0.0   0:00.15 watchdog/0                                                                               
   13 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0                                                                                  
   14 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/1                                                                                  
   15 root      rt   0       0      0      0 S   0.0  0.0   0:00.13 watchdog/1                                                                               
   16 root      rt   0       0      0      0 S   0.0  0.0   0:00.02 migration/1                                                                              
   17 root      20   0       0      0      0 S   0.0  0.0   0:00.49 ksoftirqd/1    
maxtaco commented 6 years ago

Weird, I don't see any of our processes on there...

hanshchou commented 6 years ago

Weird, I don't see any of our processes on there... They are just so low on the but they are there...

$ ps -ef | grep keybase
root     28613  9042  0 12:37 pts/9    00:00:00 keybase-redirector /keybase
chouh    29781  8927  0 12:44 ?        00:00:02 /usr/bin/keybase --debug --log-file=/home/chouh/.cache/keybase/keybase.service.log service
chouh    29801  8927  0 12:44 ?        00:00:00 bash -c /opt/keybase/Keybase &>> /home/chouh/.cache/keybase/Keybase.app.log
chouh    29803 29801  0 12:44 ?        00:00:01 /opt/keybase/Keybase
chouh    29849 29803  0 12:44 ?        00:00:00 /opt/keybase/Keybase --type=zygote --no-sandbox
chouh    29888 29803  4 12:44 ?        00:00:12 /opt/keybase/Keybase --type=gpu-process --no-sandbox --supports-dual-gpus=false --gpu-driver-bug-workarounds=7,24,76 --disable-gl-extensions=GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_NV_path_rendering --disable-webrtc-hw-encoding --gpu-vendor-id=0x10de --gpu-device-id=0x039e --gpu-driver-vendor=Nvidia --gpu-driver-version=304.135 --gpu-driver-date --service-request-channel-token=01171BFED56E73FBB95A1746ED9C82B7
chouh    29894 29849  0 12:44 ?        00:00:00 /opt/keybase/Keybase --type=renderer --no-sandbox --primordial-pipe-token=7CBD224A9DF91BF532CA518D2CD9491D --lang=en-US --app-path=/opt/keybase/resources/app --node-integration=true --webview-tag=true --no-sandbox --enable-pinch --num-raster-threads=4 --enable-main-frame-before-activation --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553
chouh    29897 29849  1 12:44 ?        00:00:03 /opt/keybase/Keybase --type=renderer --no-sandbox --primordial-pipe-token=1F45C83FB45706ACEA6C4FAE0172B254 --lang=en-US --app-path=/opt/keybase/resources/app --node-integration=true --webview-tag=true --no-sandbox --enable-pinch --num-raster-threads=4 --enable-main-frame-before-activation --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553
chouh    30320  9588  0 12:49 pts/9    00:00:00 grep --color=auto keybase
maxtaco commented 6 years ago

What happens if you use the keybase app in one window and watch top in the other -- do the keybase processes spike?

it might have something to do with graphics acceleration

cc @oconnor663

hanshchou commented 6 years ago

yup!

top - 12:52:22 up 1 day, 55 min,  1 user,  load average: 0.89, 0.53, 0.48
Tasks: 391 total,   2 running, 389 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.7 us,  0.0 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  : 99.3 us,  0.3 sy,  0.0 ni,  0.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  0.7 us,  0.7 sy,  0.0 ni, 98.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  1.3 us,  0.7 sy,  0.0 ni, 98.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  1.3 us,  2.0 sy,  0.0 ni, 96.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu8  :  1.7 us,  0.3 sy,  0.0 ni, 98.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu9  :  1.3 us,  0.7 sy,  0.0 ni, 98.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu10 :  4.0 us,  6.7 sy,  0.0 ni, 89.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu11 :  2.0 us,  1.3 sy,  0.0 ni, 96.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 49432448 total, 30829884 free,  8438436 used, 10164128 buff/cache
KiB Swap: 50313212 total, 50313212 free,        0 used. 39685328 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                  
29888 chouh     20   0  460932  98432  63956 R  99.7  0.2   0:24.85 /opt/keybase/Keybase --type=gpu-process --no-sandbox --supports-dual-gpus=false --gpu-d+ 
29803 chouh     20   0 1395172 101524  80168 S   5.3  0.2   0:02.03 /opt/keybase/Keybase                                                                     
29897 chouh     20   0 1244536 133796  70108 S   5.3  0.3   0:03.66 /opt/keybase/Keybase --type=renderer --no-sandbox --primordial-pipe-token=1F45C83FB4570+ 
29781 chouh     20   0  985524  44536  26348 S   0.3  0.1   0:02.26 /usr/bin/keybase --debug --log-file=/home/chouh/.cache/keybase/keybase.service.log serv+ 
28613 root      20   0  350924   4704   3788 S   0.0  0.0   0:00.01 keybase-redirector /keybase                                                              
29801 chouh     20   0   12508   2932   2744 S   0.0  0.0   0:00.00 bash -c /opt/keybase/Keybase &>> /home/chouh/.cache/keybase/Keybase.app.log              
29849 chouh     20   0  318324  29584  26584 S   0.0  0.1   0:00.02 /opt/keybase/Keybase --type=zygote --no-sandbox                                          
29894 chouh     20   0 1059176  93456  63660 S   0.0  0.2   0:00.66 /opt/keybase/Keybase --type=renderer --no-sandbox --primordial-pipe-token=7CBD224A9DF91+ 
hanshchou commented 6 years ago

I enabled the --disable-gpu flag for Chromium, and now Keybase is running just fine. Could somebody explain that? :smile_cat: