(NB: i'm quoting niall, but i'm not reacting to niall, though it
might like look it.)
On Mon, 6 Mar 2000, Niall wrote:
there wasn't enough memory to run kill. My fault because I hadn't
implemented process/memory usage restriction (I did then :-) ).
ah.. so solaris needs resource limits set? just like linux? The
solaris fanciers forgot to acknowledge that fact.....
know what Linux does when this OOM condition occurs because I've never had
this problem with a Linux box (but perhaps it explains one unexplained
crash of a remotely hosted web server). The discussion here seems to imply
that Solaris kills processes itself to recover.
as do later versions of 2.2. Just that 2.2.14 is not at all clever,
and tends to kill the wrong things.
However - as i pointed out before - when your OS has to start killing
things, then you are already OOM!!!! so solaris isn't much cleverer
than linux about avoiding OOM (although perhaps more conservative),
it's just solaris' post-OOM process killer is cleverer from the
sounds of things.
(2.2.15pre should be a lot better viz killing)
Niall O Broin
also, someone asked why we need overcommit at all. Well, the answer
i've been told, is that otherwise lots of common stuff wouldn't work
anymore.. eg, if a process with big big allocated address spaces
(DB/image programmes/simulation) wanted to fork to do a simple task
like exec /usr/bin/mail, the OS would have allocate 500MB of swap for
the child. (that's why solaris does overcommit too).
so overcommit is nice, it saves you a lot of overhead at fork time.
It saves you a lot of disk space in swap (which is handy for desktop
machines). But there's a catch: you risk OOM. (and this risk is *not
So if this risk is unacceptably high, then you just might consider
taking some preventative action, cause if you don't you'll have:
a) a deadlocked machine (pre 2.2.14 linux)
b) a machine where the OS has killed some of your processes - perhaps
innocent and/or important ones.. (linux 2.2.14+/solaris/etc..)
neither option is nice. As i've been trying to point out (only to be
drowned out in shouts of "but solaris..") as an admin you need to
know the benefit/risk tradeoff, and how to minimise the risk part
of the equation. The fact that that benefit/risk ratio is different
on linux compared to Unix xyz is irrelevant. (but you need to be
aware of it).
If it's a desktop, where you don't want to waste a whole hdd on swap,
then use limits to make sure netscape doesn't expand to take up all
If it's a server, allocate 4GB of swap + fine tuned limits. and if
it's a commercial Unix investigate 'hard' memory allocation and
consider the performance/swap hit.
Paul Jakma paul at clubi.ie
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
nohup rm -fr /&
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!