I have a Ubuntu 18.04.2 on laptop HP Pavilion G6 with CPU AMD A8, 128 GB SSD, and 8GB RAM. I use it to work on web development daily with Firefox/Chromium, Atom, Skype and React.

It used to freeze almost daily. After days of probing, I figured the RAM was used up by the system. Because I couldn't add more RAM (8GB is the max size), I installed EarlyOOM to kill any excessive process. Guess what? It randomly kills either Atom, Skype, or the active browser (If I use Chromium, EarlyOOM will kill some of its tabs, but if I use Firefox, it will kill Atom).

This thing never happens if I play games. Should I setup a swapfile in the SSD or add a HDD to put the swap file in?

  • I would use swap on my SSD. Here is how to activate it: askubuntu.com/a/1100126/566421
    – pa4080
    Commented Mar 6, 2019 at 6:28
  • @pa4080, how big should I make it?
    – Dorklord
    Commented Mar 6, 2019 at 6:57
  • 1
    If you intend to use hibernation (it doesn't work with all laptops in Ubuntu) the swap should be at least equal to your RAM. Otherwise you can try with something smaller - 4G for example. Here is one related question: I have 16GB RAM. Do I need 32GB swap?
    – pa4080
    Commented Mar 6, 2019 at 7:03

1 Answer 1


You can try with adding the swap file in you ssd let say 8GB :

sudo dd if=/dev/zero of=/root/swapfile bs=1024 count=8M

sudo /sbin/mkswap /root/swapfile && /sbin/swapon /root/swapfile

In the end since you already are on ssd and you cannot add physical memory either you go for another hardware or you limit your processes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .