User: Password:
Subscribe / Log in / New account

Respite from the OOM killer

Respite from the OOM killer

Posted Oct 5, 2004 4:12 UTC (Tue) by mbp (guest, #2737)
Parent article: Respite from the OOM killer

Turning off overcommit will cause the process that tried to allocate the last page to fail. This was considered for the OOM killer earlier on, and rejected as an insufficient solution: it may happen that the unlucky process is the most important one on the system.

If I remember correctly, it can be theoretically demonstrated that it is impossible to avoid exhaustion unless all resource requirements are known in advance. That is to say, the kernel always needs to handle the possibility of being unable to complete all the operations that are underway. There are various responses: panicing, killing various tasks, failing operations, etc, but there is no perfect solution.

If you want to avoid exhaustion, then turn off overcommit and design critical applications to avoid resource exhaustion: they must allocate or reserve everything up front, and handle failure gracefully. It may be hard to design general-purpose machines to do that, but it might be done in an embedded machine.

(Log in to post comments)

Respite from the OOM killer

Posted Oct 7, 2004 8:10 UTC (Thu) by oever (subscriber, #987) [Link]

This seems like a robust approach. Unfortunately, it requires all vital
programs to be adapted to allocate memory in advance. It would be nice to
be able to allocate an amount of memory for vital processes that cannot
be taken by other programs without needing to change the code.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds