I use Ubuntu 14.04 on my Lenovo E531 with 4GB installed. The problem is that when the RAM is about 70% full the system starts swapping. After swap is used (even if only 10MB is in swap) the system starts lagging and is absolutely unusable. After that I tried to empty the swap (swapoff -a) and it helped, but only for a while and then Ubuntu again started lagging. I used only basic applications like Chrome, Thunderbird, Pidgin, PhpStorm, nothing more. I've just run Memtest to test the RAM but it looks to be ok. Please, could anybody give me an advice to solve my problem? Thanks.
Asked
Active
Viewed 1,614 times
4
-
1This is because Ubuntu begins to swap out portions of the RAM into swap before the RAM is completely full. The "swappiness" determines when to begin this process. See this question on how to change the swappiness value, and this page on more information about swap. That being said, 10 MB shouldn't cause much of a lag. – saiarcot895 May 09 '14 at 18:09
-
1Excessive lagging with such a small swap is unlikely. Possible cause: Failing sector(s) in swap partition. You could use Disks (Disk Utility) to check the SMART status of your drive or better yet something like MHDD or Victoria to do a more extensive test. – Elder Geek May 09 '14 at 18:43
-
1I've just completed the test of the HDD and it seems to be ok. I'll check out the 'swappiness'. But for me, the most interesting thing is that lagging starts immediately after starting using swap. – gabriel May 09 '14 at 20:23
1 Answers
1
The reason people should use swap memory is only if there is a lack of RAM on your system. Swap is basically your hard drive being used instead of RAM, therefor it's comparatively very slow (RAM vs hard drive).
There are a few things you can do, one including upgrading your RAM ammount to 6 or 8GB or more. You could also disable swap altogether or change when to start swap
If you are running a mechanical hard drive you could also upgrade it to an SSD as that may help a little bit if you are bound to use swap.