1

Every so often--usually when I have lots of programs open--my laptop starts doing what I think is an endless swap operation. The hard drive writes and reads like crazy, and the mouse stops being responsive. When I try to see what process is causing this, I press Ctrl+Alt+F1 to get a terminal, but I can't even log in because the operation is taking up all system resources, and letters appear several seconds, or even minutes, after I press the keys. Usually I have to hard-reboot the computer, which I know is bad for the HD, since it's spinning like crazy when I power it down.

So I can't identify what process is causing this, because I can't even open a terminal to run top when it happens.

I have 2G of memory, and a 5G swap partition.

What could be causing this, and how do I fix it?

  • I have the same problem. It was happening to me with 3GiB ram and 3 GiB swap even. 5 minutes ago happened again when I was opening a PDF in Firefox. Once I waited for 40 minutes just to see if it would stop, ..., nope. – tcak Apr 21 '14 at 6:00
0

Simply by exceeding RAM space you get everything else put in swap partition, which is way slower than RAM. Thus, resulting is slower system response.

So the solution would be having less programs open. On the other hand, there's swappiness

Swappiness is a property for the Linux kernel that changes the balance between swapping out runtime memory, as opposed to dropping pages from the system page cache

from wiki

and this thread explains how to use it.

  • 1
    The problem is not that the swap partition is used, it's that it completely freezes the computer, to the point where I have to hard-reboot it. That shouldn't happen on any operating system. So it's not that I have too many programs open, it's that my Ubuntu configuration can't handle swapping, has problems with RAM, or there's something else amiss. – Jonathan Aug 11 '13 at 13:28
  • I agree with this. I don't want to talk like I know the whole detail of Ubuntu's implementation, though it is obvious that there is an implementation problem some where. – tcak Apr 21 '14 at 6:02
  • The problem of having HDD mad spinning might be a swap partition problem, since it is HDD based. Please try setting your swappiness lower, this might help. – Paulius Šukys May 4 '14 at 16:00

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.