1

Ever since upgrading to Ubuntu 18 from 16 on my machine (2GB RAM) I am experiencing slowdowns of the system and freezes of the current program (Chrome, for example) whenever the physical RAM memory is maxed out and Ubuntu starts using swap.

I downgraded and installed Ubuntu 16 but the problem persisted.

I can hear the HHD 'grinding' when the problem happens. And so I created a swap partition on a USB disk on key, which I set to higher priority than the swap on the HHD. The problem persists.

I wanted to ask for guidance in diagnosing or fixing the problem.

P.S. there is 27GB of free space. SMART parameters AFAICT don't indicate a problem (except for 'old age')

2

With 2GB of RAM this is hardly surprising. You may want to switch to a lighter desktop environment, such as xfce. To install xfce, execute

sudo apt install xubuntu-desktop

Log out, select XFCE DE, and log in again. This will give you some more headroom memory wise.

Note that any modern browser is a memory hog. At the machine I'm using currently, Chrome consumes approx 2GiB memory with 6 open tabs. Getting more memory is the real cure for your problem, as 2GiB is simply not enough for multitasking with a modern OS and modern applications. A suggested minimum is 4GiB.

  • I installed Xubuntu as you suggested and instantly got 290 MB! Thank you. Will order more memory. – amba2 Dec 26 '18 at 3:54
1

The "grinding" noise from the HDD indicates you've got a bad HDD. It's trying to re-calibrate.

You also don't have enough RAM.

0

The problem is...as you have noticed SWAP ;)

SWAP is a "file" on your HDD that is used as RAM (when physical RAM is over). Since HDDs are REALLLYYY slow (comparing to RAM) this is why you are experiencing Your problems.

Advises:

  • add more RAM
  • don't use so many application at once ;)
  • disable SWAP
  • disable background services
  • monitor memory usage top htop free (those are console programs) or Ubuntu System Monitor

How to enable/disable SWAP:

sudo swapoff -a # turns it OFF
sudo swapon -a  # turns it ON again

How to install htop:

 sudo apt-get install htop
  • With 2G RAM, you certainly don't want to disable swap. Depending on how big swap is set for now, you may even want to increase it. But... this isn't a swap problem anyway... it's a bad HDD. – heynnema Dec 22 '18 at 16:49
  • Disabling swap has made browser tabs crash for me when there is not enough memory, with no slowdown whatsoever. All in all- slightly better than freezing to a halt. – amba2 Dec 26 '18 at 3:59
  • (I may have messed around with other settings as well to get to this result, like installing Early OOM, and messing with swapiness settings.) @heynnema may very well be true, I'll order some other drive (SSD) and report back. – amba2 Dec 26 '18 at 4:34
  • @amba2 please describe the Early OOM and vm.swappiness things that you did. You should probably undo these and just add more RAM. 2G isn't enough. Make sure that you end up with pairs of equal spec RAM sticks so you can get the speed advantage of "memory interleaving". – heynnema Dec 26 '18 at 14:26
  • @heynnema I installed Early OOM by following the instructions from github.com/rfjakob/earlyoom#download-and-compile : git clone github.com/rfjakob/earlyoom.git -> cd earlyoom -> make -> sudo make install About the Swappiness, after creating a 2GB SWAP partition on a pen drive with GParted, I set the priority of the created SWAP partition to be higher than the system SWAP partition by adding the following line to /etc/fstab: UUID=807435c0-6da1-4c25-b13d-c199a7f15135 none swap sw,pri=5 0 0 – amba2 Jan 11 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.