What to do when out of memory

Andreas Bombe andreas.bombe en munich.netsurf.de
Dom Ene 23 03:13:49 CST 2000


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 en 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 en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda