Requesting 'real' memory
Posted Feb 2, 2008 2:00 UTC (Sat) by
giraffedata (subscriber, #1954)
In reply to:
Requesting 'real' memory by njs
Parent article:
Avoiding the OOM killer with mem_notify
Turning off overallocation just means that you get
a different error handling API
How is getting killed by the OOM Killer an error handling API? Turning off overallocation means you get an error handling API where you had none before.
It certainly doesn't stop you from running the system out of memory.
Turning off overallocation for one process doesn't stop you from running the system out of memory; that's why the OOM Killer is still there. But he only kills other processes. The connection is that if Process X is not overallocating memory (swap space), then the OOM Killer is guaranteed to be able to relieve memory pressure without having to kill Process X. You can't say that about an overallocating process.
Think of it as two separate pools of swap space; one managed by simple allocation; the other with optimistic overallocation and an OOM Killer. A process decides which one works best for it.
all you have to
do to force allocation is to touch pages after you allocate them,
No, that's not enough. In overallocating mode, the swap space does not get allocated until the kernel decides to steal a page frame. By then, the process is in no position to be able to deal with the fact that there's not enough swap space for him.
(
Log in to post comments)