[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1002041339220.6071@chino.kir.corp.google.com>
Date: Thu, 4 Feb 2010 13:48:59 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Rik van Riel <riel@...hat.com>
cc: Lubos Lunak <l.lunak@...e.cz>,
Balbir Singh <balbir@...ux.vnet.ibm.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Nick Piggin <npiggin@...e.de>, Jiri Kosina <jkosina@...e.cz>
Subject: Re: Improving OOM killer
On Wed, 3 Feb 2010, Rik van Riel wrote:
> > Do you have any comments about the forkbomb detector or its threshold that
> > I've put in my heuristic? I think detecting these scenarios is still an
> > important issue that we need to address instead of simply removing it from
> > consideration entirely.
>
> I believe that malicious users are best addressed in person,
> or preemptively through cgroups and rlimits.
>
Forkbombs need not be the result of malicious users.
> Having a process with over 500 children is quite possible
> with things like apache, Oracle, postgres and other forking
> daemons.
>
It's clear that the forkbomb threshold would need to be definable from
userspace and probably default to something high such as 1000.
Keep in mind that we're in the oom killer here, though. So we're out of
memory and we need to kill something; should Apache, Oracle, and postgres
not be penalized for their cost of running by factoring in something like
this?
(lowest rss size of children) * (# of first-generation children) /
(forkbomb threshold)
> Killing the parent process can result in the service
> becoming unavailable, and in some cases even data
> corruption.
>
There's only one possible rememdy for that, which is OOM_DISABLE; the oom
killer cannot possibly predict data corruption as the result of killing a
process and this is no different. Everything besides init, kthreads,
OOM_DISABLE threads, and threads that do not share the same cpuset, memcg,
or set of allowed mempolicy nodes are candidates for oom kill.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists