On Sun, Jun 24, 2007 at 09:50:39PM +0200, Christopher Zimmermann wrote:
> Hi!
> 
> Sometimes I experience system hangs because of memory leaks. A process
> with a memory leak eats all memory till the system starts swapping.
> Only a few seconds after the process was started the system slows down
> till it is practically useless. I believe this could be prevented by
> deactivating swap so that the OOM killer would catch this process.
> But is there a better way to solve such issues?

Perhaps. And perhaps not.

You could play with "ulimit -v" - see your shell docs for info about 
ulimit (it's a built-in). This can put limits on the per-process 
resource usage.

I had good luck with adding e.g.:
    ulimit -v 512000

in my ~/.xsession .

Be careful not to set it too low though or weirdy stuff will happen.

Sometimes processes allocate loads of memory and never use it(!): This 
doesn't take up swap and is quite harmless. But it is still subject to 
ulimit size.  I had things like my browser Java plug-in failing silently 
until I increased the ulimit accordingly...

Hope this helps
-- 
Karl E. Jorgensen
[EMAIL PROTECTED]  http://www.jorgensen.org.uk/
[EMAIL PROTECTED]     http://karl.jorgensen.com
==== Today's fortune:
Modern man is the missing link between apes and human beings.

Attachment: signature.asc
Description: Digital signature

Reply via email to