Need help with making my machine not freeze when memory is full
I am using my Ubuntu for my work purpose and my system is freezing as the memory is getting filled up pretty fast and I think that is because I set up my swap size less than half the size of my RAM . (Swap - 3.7 GB, RAM - 8 GB)
I am currently using a windows and Ubuntu dual booted system and here are the partitions that I set for them.
I thought I would use windows more and thus gave more space to windows while installing and soon after realized that Ubuntu> windows ,so I am planning to take some space from Windows and use that space to increase my swap memory to 8GB and add the remaining to etx4/
and etx4/home
.
I couldn't quite figure out how to do that with the partitions that I have set up.
I have read some posts regarding this, but couldn't figure which solution works bests in my case and I couldn't go on and experiment as I couldn't mess anything up, because the work setup from start will take a lot of time.
I could really use some help from some experienced people. Thank you in advance.
I am using my Ubuntu for my work purpose and my system is freezing as the memory is getting filled up pretty fast and I think that is because I set up my swap size less than half the size of my RAM . (Swap - 3.7 GB, RAM - 8 GB)
This is not correct. It is not because you set your swap size small that memory (=RAM, not swap) fills up fast. 8 GB RAM is a quite decent amount of RAM. If you are filling up RAM fast, then
- You may be using specific applications with very high needs of RAM;
- You may be keeping many, many applications open;
- You may be working with a problem application that has memory leaks.
You will not fundamentally solve the issue installing more swap. Rather, you should inspect your workflow, and see whether you can close applications more regularly, and identify memory hogging or faulty applications.
If you need more RAM for what you do, then install more RAM. Indeed, increasing the swap space may improve the situation somewhat, but will not fundamentally solve the issue.
Increasing the swap to will require you to repartition. You could decrease your /home, then move it to the right, then expand the swap partition to fill the space freed by home. If you are storing your data mostly on a shared ntfs partition, then you will be able to continue with a smaller /home.
This operation will require a move of the home partition (after reducing its size, it must be moved to the right. Such move operation is slow. In any case, make sure to have a good backup of your personal files before attempting any repartitioning.