Why Lubuntu 20.04 is running slow when I use Opera or LibreOffice

My Lubuntu is wirking exscellent, even when I open Opera, but in a while, may be 30 mins, may be earlier it becomes stucked completely, mouse isn’t moving and I can’t even open a terminal Alt+Ctrl+F2 sometimes. I don’t see any logic in that, because after that I reboot the computer and opera and libreoffice work normally. Also when the computer is running slowly the fan begin to work hard, so some process is on, but I cant catch it. I swithched off the autoupdate. But nothing helps.
What could be the preferences for Linux to avoid this?

free -h:

             total        occupied        free      total  buf./time.   available
Memory       2,8Gi       1,7Gi       160Mi       198Mi       956Mi       718Mi
Swap:          0B          0B          0B

vm.swappiness=60

top:

op - 23:26:15 up  7:10,  1 user,  load average: 0,75, 1,19, 1,39
Tasks: 193 total,   1 running, 192 sleeping,   0 stopped,   0 zombie
%Cpu(s): 22,6 us,  8,0 sy,  0,0 ni, 67,6 id,  1,7 wa,  0,0 hi,  0,0 si,  0,0 st
МиБ Mem :   2833,9 total,    152,5 free,   1721,7 used,    959,7 buff/cache
МиБ Swap:      0,0 total,      0,0 free,      0,0 used.    714,9 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND  

  53780 hydronik  20   0  350188  90924  61388 S  32,9   3,1  22:14.48 code                                               
  53805 hydronik  20   0  900604 184116  44600 S  12,6   6,3  12:30.27 code                                               
    689 root      20   0  802932  98824  46576 S  10,3   3,4   8:27.60 Xorg                                               
 111501 hydronik  20   0  592112  56236  45176 S   3,0   1,9   0:02.11 qterminal                                          
  87267 hydronik  20   0  599424  57004  44500 S   2,7   2,0   0:44.77 qps                                                
 130268 hydronik  20   0   11924   3664   3144 R   0,7   0,1   0:00.12 top                                                
    387 root      20   0    8296   5040   1908 S   0,3   0,2   0:05.00 haveged                                            
    892 hydronik  20   0  267836  15692  11260 S   0,3   0,5   0:01.55 lxqt-session                                       
    991 hydronik  20   0  977844  75424  25072 S   0,3   2,6   0:18.73 lxqt-panel                                         
   1180 hydronik  20   0  283588  20292  13556 S   0,3   0,7   0:01.10 lxqt-powermanag                                    
  54130 hydronik  20   0   11,7g 151724  35180 S   0,3   5,2   3:25.64 code                                               
  81541 hydronik  20   0  675244  37900  26532 S   0,3   1,3   0:04.07 featherpad                                         
 111230 root      20   0       0      0      0 I   0,3   0,0   0:00.49 kworker/u4:8-phy0                                  
 111522 hydronik  20   0  536236 169896 120564 S   0,3   5,9   0:10.76 opera                                              
      1 root      20   0  167572   8320   5304 S   0,0   0,3   0:02.09 systemd                                            
      2 root      20   0       0      0      0 S   0,0   0,0   0:00.00 kthreadd                                           
      3 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 rcu_gp                                             
      4 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 rcu_par_gp                                         
      6 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 kworker/0:0H-kblockd                               
      8 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 mm_percpu_wq                                       
      9 root      20   0       0      0      0 S   0,0   0,0   0:00.89 ksoftirqd/0                                        
     10 root      20   0       0      0      0 I   0,0   0,0   0:05.55 rcu_sched                                          
     11 root      rt   0       0      0      0 S   0,0   0,0   0:00.20 
 migration/0   

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; 
  this may
# be used with UUID= as a more robust way to name devices that works 
  even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  
  <pass>
UUID=b2d3ce06-03b1-4251-adbf-bd143dd8a213 /  ext4    defaults   0 1
/swapfile    none    swap    sw      0   0

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

swap

You have no swap. This is what’s causing your slow downs and freezes.

free -h

             total        occupied        free      total  buf./time.   available
Memory       2,8Gi       1,7Gi       160Mi       198Mi       956Mi       718Mi
Swap:          0B          0B          0B

Let’s create a 4G /swapfile.

Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 3G RAM and 4G swap

Edit /etc/fstab.

sudo -H gedit /etc/fstab

Confirm/add this line in /etc/fstab… and confirm no other “swap” lines…

/swapfile    none    swap    sw      0   0

reboot                    # reboot and verify operation

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply