Hello everybody ! I have this problem for a long time. I have 4 Gb of Ram and 4 Gb of swap space. When my ram is about 80% full, my computer starts swapping. Problem is, while swapping , my computer freezes, SSD Disk indicator stops blinking and system is showing 100% disk use. Does anybody has solution for this. Thanks !
Sounds like you’re using your entire installed RAM as a swap. Reduce the swap partition by using Gparted. Try 1GB RAM to a max of 2GB for your swap size.
If Dino_Bosnjic is using suspend/hibernate, then this is a really bad advise.
If you leave it, will it resume normal operation after a while?
It could be a trashing/swappiness issue. Could you post the output of:
It will likely be 60. You could try changing it to a lower number and see how that works out as this:
sudo sysctl vm.swappiness=10
- If I were you, I would take a look a your usage patterns. What sort of applications are you running when this happens? Is the majority of the memory used by a single application?
- Perhaps you just need more RAM…
- The disk could in theory be failing. You might want to test it.
I have tested disk and it says about 76% disk is healthy. And you are right, after 5-6 second of freeze time, everything is back to normal for some time, and it starts again. I know I need more ram but this freezing aren’t suppose to happen.
I have put
sysctl vm.swappiness on 10. I’ll let you now if this helped.
Changing swappiness can certainly help, as well as considering the type of applications you’re running within your system capabilities.
On a system with only 4GB RAM, you have very little choice but to allocate some swap space. However, just be aware that if you “chose” to suspend/hibernate alot in addition to running programs that constantly fill your memory, you run the risk of eating up a SSD drive more quickly with consistant extra writes. That may be the reason your disk health is at 76%.
That said, 4GB RAM is plenty to run a basic usage UM system on without putting the pedal to the metal all the time.
If you’re experienceing that, you’ll eventually have to adapt your computing habits and/or upgrade your hardware.
Swap will work great if you have a healthy hdd/ssd and a fast one. Doing swap on a ssd it’s a bad ideea and it will kill your ssd much much faster. I recomend buying another 2 gb of ram minimum and kill the swap if you have a ssd.