Score:0

Laptop becomes slow

ru flag

I had attached my laptop specifications. I use chromium browser, microsoft teams for work. In an 8 hrs of work, my laptop slowly becomes slower by around 3 - 4hrs of work.

When I restart my laptop, it gets speed. How to resolve this without restarting everytime? Do I need to clean ram memory frequently?

enter image description here

enter image description here

enter image description here

heynnema avatar
ru flag
Edit your question and show me `free -h` and `sysctl vm.swappiness` and `swapon -s`. Start comments to me with @heynnema or I'll miss them.
Unix avatar
cn flag
If it's a RAM problem caused by web browsers, just close some tabs and you will see how it gets fast. If you close the browsers or even clean the swap memory and the computer it's still slow, then it would not be a RAM problem.
Raffa avatar
jp flag
4GB RAM is barely enough these days ... [zram](https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html) might actually help in your case ... to enable zram support run `sudo apt install zram-config` then reboot.
us flag
@heynnema OP updated the question, but mistakenly tagged you in a comment in the answer below, and you probably did not get a notification.
heynnema avatar
ru flag
@ArchismanPanigrahi Thanks for the heads up!
Score:2
us flag

This is most likely happening because the physical RAM is getting filled up, and the computer is using a part of the Hard Disk as memory. This is known as swap.

Increasing the swap or changing the amount of swappiness may not help much, as swap is inherently slow, and it is quite clear that you are not running out of swap (then the computer would freeze).

You can try the following.

  1. When the computer becomes slow, close Chromium and Teams, and open a Terminal. Temporarily move the memory from swap to RAM with the command

    sudo swapoff -a && sudo swapon -a
    

And the computer should become more responsive again.

  1. Using alternatives - as per my experience, Firefox consumes less RAM per tab than Chromium. Also, the web interface of Teams at https://teams.microsoft.com consumes less memory than the Teams client (irrespective of whether you use Firefox or Chromium).

  2. Switch to a lighter distro like Lubuntu. However, this may not change the scenario too much in case you are using several Chromium tabs and Microsoft Teams simultaneously.

  3. Consider upgrading the amount of RAM.

sivasdpi avatar
ru flag
Can I execute above command without closing chromium, teams ? Because it requires continuous work flow
us flag
@sivasdpi You can try, but in case Chromium + Teams consume more memory than your RAM, it might freeze your computer. Check the updated answer.
sivasdpi avatar
ru flag
Web interface of teams also don't navigate within them quickly. It responds slowly. Will install Lubuntu and see how it works.
us flag
@sivasdpi You can try the command `sudo swapoff -a && sudo swapon -a` once. If it works and does not freeze your computer, you may not have to switch operating systems.
sivasdpi avatar
ru flag
Thanks @Archisman. Will check and inform you.
sivasdpi avatar
ru flag
@heynnema I had executed your commands and posted above results . Pls check and do the needful
sivasdpi avatar
ru flag
I executed ur command. It doesn't give any result . Felt little improvement in performance . Will check for another 2 - 3 days and inform
Score:0
ru flag

You have too little RAM, and too little SWAP. Ultimately you should add more RAM.

Let's try and compensate by increasing your /swapfile from 2G to 4G...

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

In the terminal...

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 4G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation
sivasdpi avatar
ru flag
I feel difficult to execute above command. Let's do it using remote computer logging in. We shall arrange a time to do. My email id is [email protected]. pls send ur email address
heynnema avatar
ru flag
@sivasdpi As long as you copy/paste the commands into `terminal`, you should be able to do this yourself. Everything after the # is a comment, so you don't need to copy that part of the line, only the command part. The whole process takes less than 5 minutes.
heynnema avatar
ru flag
@sivasdpi Status please...
sivasdpi avatar
ru flag
Will update soon @heynnema
sivasdpi avatar
ru flag
I had uploaded the result above. Pls check if I did correct.
heynnema avatar
ru flag
@sivasdpi It all looks good except for the last step, where you verify the /swapfile line in /etc/fstab. It's probably ok, but go ahead and review it. If the slowness situation is improved, please remember to accept my answer by clicking on the checkmark icon that appears just to the left of my answer. Thanks!
sivasdpi avatar
ru flag
I will work for 4 days and see how it performs. Then sure will accept your answer. Thanks
sivasdpi avatar
ru flag
After a week of usage I found laptop didn't freezed too much. It improved. It freezes 2 times only browser freezed. I just restarted browser rather than restarting laptop. It is okay for me. Thanks. I gave a check mark to your answer. Pls share your personal email address to ask doubts.
heynnema avatar
ru flag
@sivasdpi Good news! Thanks for the update. Consider adding more RAM.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.