Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I sometimes find that when I run a process that I know uses up a great deal of system resources, it terminates unexpectedly. Is this because it becomes unresponsive, or is it because Ubuntu can't cope with the demands? Is there a way to circumvent this, for example, by increasing the virtual memory? If so, how?

Note that I am running Version 11.04 of Ubuntu on a single Pentium 4 processor with 4GB of RAM. If it's any help, my computer is a DELL Optiplex 210L.

share|improve this question
up vote 1 down vote accepted

It's likely the resources issue: out of memory. When Ubuntu runs our of memory, the OOM killer kicks in and kills some processes until it has enough memory again. If your program consumes loads of memory, perhaps there is a bug in it. (e.g. it would not make sense to take 500MB for reading a PDF.) Sometimes, other programs are responsible for eating memory. On KDE, kmix and knotify4 is known to use a lot memory under certain conditions wihout giving it back. To solve that, I've a cron running restarting these processes use excess memory.

Solution: upgrade your RAM and/ or add more swap. More RAM will definitely help more, swap is much slower and just delays the death of your application.

share|improve this answer
Thanks for that Lekensteyn. I figured as much. Unfortunately, I have reached my motherboard's capacity of expanding the memory, so the next step would be for me to increase the virtual memory. As for the application that I have written, it could have a memory leak but, I am inclined to think that it is an out of memory issue since it does continually allocate, and reallocate a LOT of memory at each iteration of the algorithm which is intended for testing purposes only. – Bill Aug 31 '11 at 8:40
P.S. Furthermore, I do not have the option of restarting the process as the data that is stored in this allocated memory is required for the next iteration of the algorithm. In retrospect, I could have written the program to temporarily write the data to a file but, could you imagine it's size???? – Bill Aug 31 '11 at 8:43
As for your algoritm, can't you free some memory by free-ing obsolete data or write part of it to a disk? – Lekensteyn Aug 31 '11 at 9:23
I probably can, however, hardly worth the effort in doing so. As I said, the program that I have written is for testing purposes only. I will more than likely extrapolate the results that I obtained up to the point where it terminated. I appreciate your suggestion, though. – Bill Aug 31 '11 at 12:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.