Prevent OOM from killing init
Quoted 3 lines · Szabolcs Szakacsits
But if you start
to think you get the conclusion that process killing can't be avoided if you want the system keep running.
What's the point in keeping the OS running if the applications are silently killed?
If your box is running for example a mail server, and it appears that another process is juste eating the free memory, do you really want to kill the mail server, just because it's the main process and consuming more memory and CPU than others?
Well, fine, your OS is up, but your application is not here anymore.
I just think there's no general solution, users must have the chance to choose processes not to be killed, or malloc() returning errors.
----
Benoît GARNIER
Quoted 6 lines · you
If your box is running for example a mail server, and it appears that another process is juste eating the free memory, do you really want to kill the mail server, just because it's the main process and consuming more memory and CPU than others?
Well, fine, your OS is up, but your application is not here anymore.
If you have a mission-critical application running on your box, add it to the inittab file with the RESPAWN attribute. That way, OOM killer kills it, init notices it, and init restarts your server.
By the way, are the people working on the OOM-killer also working to avoid killing task 1?
Satch
Quoted 7 lines · Stephen Satchell
Quoted 5 lines · you
If your box is running for example a mail server, and it appears that another process is juste eating the free memory, do you really want to kill the mail server, just because it's the main process and consuming more memory and CPU than others?
Quoted 5 lines
Quoted 1 line
Well, fine, your OS is up, but your application is not here anymore.
If you have a mission-critical application running on your box, add it to the inittab file with the RESPAWN attribute. That way, OOM killer kills it, init notices it, and init restarts your server.
That makes me actually rolling on by back... Just try to add oracle to inittab
crash it and watch it grabefully restarting by repawn!!!!!!!!!
Quoted 2 lines
By the way, are the people working on the OOM-killer also working to avoid killing task 1?
Already done.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · Stephen Satchell
If you have a mission-critical application running on your box, add it to the inittab file with the RESPAWN attribute. That way, OOM killer kills it, init notices it, and init restarts your server.
Ah, that's great for simple daemons. Now tell me how to help an app like this (Oracle exampled here):
oracle 89 0.0 0.4 41076 1776 ? S Mar22 0:00 ora_pmon_slash oracle 91 0.0 0.6 40676 2620 ? S Mar22 0:00 ora_dbw0_slash oracle 93 0.0 0.4 40544 1788 ? S Mar22 0:00 ora_lgwr_slash oracle 95 0.0 0.4 40544 1744 ? S Mar22 0:00 ora_ckpt_slash oracle 97 0.0 1.1 40556 4404 ? S Mar22 0:00 ora_smon_slash oracle 99 0.0 0.5 40536 2188 ? S Mar22 0:00 ora_reco_slash oracle 101 0.0 0.4 40656 1756 ? S Mar22 0:00 ora_arc0_slash
In this example, when oom_kill reaps one of these autonomous threads, Oracle opts to crash and burn. Database corruption is almost guaranteed.
In all reality, I'm sure any daemon (threads or no) that works heavily with disk files is likely to screw itself and its data if it gets sigkilled for no reason. And in our environment, there is no reason for it to get sigkilled.
I'm going to severely hurt the first person that says such a program should be *expecting* random untrappable annihilation of its threads. (And what happens when the master process *is* the target?)
- --
Stephen Clouse <[email protected]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBOr2XDgOGqGs0PadnEQK0rACfQELDid11+m90bS/DrGyrsHW45ZEAn19G mL3fSCdi2TeHDxGLA8uXT8l5
=oQPV
-----END PGP SIGNATURE-----
Quoted 7 lines · Benoit Garnier
Quoted 3 lines · Szabolcs Szakacsits
But if you start
to think you get the conclusion that process killing can't be avoided if you want the system keep running.
Quoted 7 lines
What's the point in keeping the OS running if the applications are silently killed?
If your box is running for example a mail server, and it appears that another process is juste eating the free memory, do you really want to kill the mail server, just because it's the main process and consuming more memory and CPU than others?
Yes bloody dumn, becouse I can then go no to the box, blacklist the smapper causing this with ipchains (or whatever it's called) and restart sendmail - WITHOUT DRIVING 1900km.