Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756234Ab0BDJu4 (ORCPT ); Thu, 4 Feb 2010 04:50:56 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60520 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592Ab0BDJuz (ORCPT ); Thu, 4 Feb 2010 04:50:55 -0500 Date: Thu, 4 Feb 2010 10:50:50 +0100 (CET) From: Jiri Kosina To: David Rientjes Cc: Lubos Lunak , Balbir Singh , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , KOSAKI Motohiro , Nick Piggin Subject: Re: Improving OOM killer In-Reply-To: Message-ID: References: <201002012302.37380.l.lunak@suse.cz> <20100203170127.GH19641@balbir.in.ibm.com> <201002032355.01260.l.lunak@suse.cz> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1669 Lines: 41 On Wed, 3 Feb 2010, David Rientjes wrote: > > > /* Forkbombs get penalized 10% of available RAM */ > > > if (forkcount > 500) > > > points += 100; > > > > As far as I'm concerned, this is a huge improvement over the current code > > (and, incidentally :), quite close to what I originally wanted). I'd be > > willing to test it in few real-world desktop cases if you provide a patch. [ ... ] > 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. Why does OOM killer care about forkbombs *at all*? If we really want kernel to detect forkbombs (*), we'd have to establish completely separate infrastructure for that (with its own knobs for tuning and possibilities of disabling it completely). The task of OOM killer is to find the process that caused the system to run out of memory, and wipe it, it's as simple as that. The connection to forkbombs seems to be so loose that I don't see it. (*) How is forkbomb even defined? Where does the magic constant in 'forkcount > 500' come from? If your aim is to penalize server processes on very loaded web/database servers, then this is probably correct aproach. Otherwise, I don't seem to see the point. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/