I've got an eeePC 900a: it has a 8GB flash as disk and only 1GB of RAM. The Linux distribution installed on it is ArchLinux.
When the system runs out of memory it becomes extremely unresponsive: it takes several seconds/minutes to do things like switching to TTY1 or even moving the mouse pointer. Sometimes it looks like the system just freezes: three ours ago I let it alone and nothing at all is changed so far.
I'd rather avoid creating a swap partition/file on this eeePC since the disk is already that small, and also because the many writes on the swap space would shorten a lot the flash card life. Moreover I think that a swap file/partition would just move the problem, rather than definitely fixing it.
Isn't the kernel supposed to kill some random applications when it runs out of memory? Why does it fail (or takes ages) at doing that?
A few months/years ago I already tried to look further into this, but couldn't find anything that would actually work...
while(true){ if( $FREE_MEMORY<10MB ){ kill -9 $RANDOM_PID; } }
. This would definitely fix my problem. But wait, isn't the kernel supposed to do that (and in a far better way than my script)? Why isn't it doing its job?