Summary: Which processes get killed off when you run out of swap?

From: <alan.garde_at_transport.uk.eds.com>
Date: Wed, 15 Sep 1999 17:04:59 +0100

Thanks to:

Luchini, Marco
T. S. Horsnell
Serguei Patchkovskii
Lavelle, Bryan

Apart from a few people who agreed with me that its very annoying that the
machine is likely to drop off the network (and so will require physical
access to reboot it/or a remote dialin), the answer seems to be as follows:

It's the first process which asks for memory after the swap runs out.
There is an additional precaution for root-owned programs: a last few
pages (vm-page-free-reserved in sysconfig) will only be handed to
root-owned processes. This *somewhat* decreases the probability of
a critical daemon getting killed, but not by all that much.

As inetd is continually trying to spawn stuff when it receives network
connections, it's
a prime candidate for dying. Other times sendmail dies first. Occasionally
you're in luck and a user process gets zapped but usually the user doesn't
take the hint and tries again...


--
We are currently using over-commit mode for swapping on our development
alpha running 4.0D.  Once in awhile someone will run something up which will
push the machine over its swap space and processes will get killed off. Does
anyone know HOW it decides which processes to kill off?  Largest?  Newest?
Or whatever?  We always identify the machine doing this by no one being able
to telnet into the machine as its killed off all the needed daemons.  From
the console the machine looks fine, it just drops off the network...
Received on Wed Sep 15 1999 - 16:08:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT