Re: What to do when out of memory

From: Andreas Bombe (andreas.bombe@munich.netsurf.de)
Date: Sat Jan 22 2000 - 12:39:17 EST


On Sat, Jan 22, 2000 at 04:13:33AM +0000, Aaron Lehmann wrote:
> The basic problem is that if I run a program that eats up all the memory
> on the system than the kernel will start swapping crazilly and make the
> system completely unresponsive.
[...]
> I know that your first impulse will be to tell me to set PAM's limits.conf
> or a limits option within my shell. I think this is irrelevant. Regardless
> of userspace settings, the kernel should handle OOM situations more
> gracefully than swapping to death. This may be a gross oversimplification
> of the problem (as I have no kernel hacking experience or knowledge), but
> can't the kernel just deny memory allocations if all the memory on the
> system is in use?

2.2 and later don't allocate more memory to user space than is
available unless overcommit_memory is explicitly set. And if you don't
want the kernel to swap when memory gets tight then don't add a swap
partition/file in the first place, easy.

-- 
          Andreas E. Bombe <andreas.bombe@munich.netsurf.de>
http://home.pages.de/~andreas.bombe/                DSA key 0x04880A44

The Apocalypse has been postponed - we apologize for the inconvenience.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:28 EST