On 04/14/2011 10:10 PM, Hendrik Boom wrote:
[...]
No swap partition.  1 gig RAM.  Isn't Linux supposed to start killing 
off stuff by itself when it runs out of RAM?

-- hendrik

That depends of your oom killer parameters

"You can tune the OOM killer, to prefer certain processes. Each process has a score that indicates the likelihood of the process being killed in case the system runs in OOM situation. You can see the score of a process in /proc/${PID}/oom_score. You can bias the decision of the OOM killer using /proc/${PID}/oom_adj: a high value increases the probability that OOM killer is going to kill ${PID}. The value of oom_adj is inherited by children so you just set it in the master apache process at startup (in this case you should hava a watchdog that restarts apache); an alternative is to leave the master process at its default level and tune up each child so that the master stays alive and re-spawns the children as needed (in this case you need an external daemon that checks for new children and tunes oom_adj). Of course this assumes that you are using the multi process worker ;-)

Please note that the normal range of oom_adj values (-16,15) is only a bias, the heuristic of the OOM killer may still choose another process if its score is high enough. The special value -17 makes the process unkillable by OOM killer, but it's dangerous, because if the unkillable process (e.g. you DB) goes berserk the kernel may be unable to recover from the memory shortage."

(from  Luca Tettamanti's answer on serverfault)

-- 
Best Regards,
Sorin Toma 
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to