From: Theodore Tso <tytso@mit.edu>
To: Pedro <linux_user@izecksohn.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: tmpfs and the OOM killer
Date: Thu, 12 Apr 2007 07:25:45 -0400 [thread overview]
Message-ID: <20070412112545.GA28148@thunk.org> (raw)
In-Reply-To: <200704120219.03171.linux_user@izecksohn.com>
On Thu, Apr 12, 2007 at 02:19:02AM -0300, Pedro wrote:
> > OOM isn't an application matter. The kernel has to choose between
> > allowing overcommit on the basis it might run out of memory and have to
> > kill stuff, or that it won't in which case an applicatio which correctly
> > handles malloc() and similar failures will not be killed (unless it is
> > out of space on a stack grow which is a C language flaw as you can't
> > catch that event in C)
> >
> > It's configured by /proc/sys/vm/overcommit_memory
> >
> > 0 - try and spot obviously dumb allocations
> > 1 - anything goes
> > 2 - strictly control resource commit
>
> I deduce that a fail-safe application must scanf overcommit_memory, warn
> the user and waitpid.
If a fail-safe applicaion is running on a system which is that close
to the edge in terms of available physical memory and swap, it's not
likely going to be in deep trouble anyway. Even if you disable the
OOM killer, now random malloc()'s will start returning NULL because
your system doesn't have enough memory. Do you have intelligent error
handling and recovery mechanisms for every single malloc() failure?
Also, the machine will likely be thrashing so badly that any service
level performance guarantees that the application might have will
probably be totally trashed.
- Ted
next prev parent reply other threads:[~2007-04-12 11:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-11 5:23 tmpfs and the OOM killer Pedro
2007-04-11 19:48 ` Willy Tarreau
2007-04-11 21:05 ` Mouawad, Tony
2007-04-11 22:27 ` Pedro
2007-04-11 22:39 ` Alan Cox
2007-04-12 5:19 ` Pedro
2007-04-12 9:42 ` Alan Cox
2007-04-12 15:08 ` Pedro
2007-04-12 11:25 ` Theodore Tso [this message]
2007-04-12 14:35 ` Pedro
2007-04-12 20:31 ` Willy Tarreau
2007-04-12 20:56 ` Mouawad, Tony
2007-04-12 21:09 ` Willy Tarreau
2007-04-12 8:13 ` Jan Engelhardt
2007-04-12 8:19 ` Willy Tarreau
-- strict thread matches above, loose matches on Subject: below --
2007-04-12 5:04 Al Boldi
2007-04-12 5:39 ` Pedro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070412112545.GA28148@thunk.org \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_user@izecksohn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox