I don't have any swap partition/file on my machine, and only 2GB of RAM.
Sometimes it happens that the memory gets saturated by some process (Xorg+browser+compiler+...) and the system hangs indefinitely, and the only way to restart it (other than hard reset) is with SysRq.
I understood that the Out Of Memory Killer won't help me because when the memory is completely full, kernel cannot allocate the OOM Killer itself.
Is there any way to preload the OOM Killer, so that it can actually work when memory is completely full?
Or is it possible to tweak the kernel so that OOM Killer gets activated when my ram is full at ${TOTAL_RAM} - 10MB
?
dd
, runmkswap
on it, and just use that. There isn't a significant performance penalty for doing so (and anyway any such penalty would be lost under the weight of "they both are terribly slow"). – mattdm Feb 08 '11 at 16:24