From owner-cvs-all Fri Mar 14 12:18:29 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB38637B409 for ; Fri, 14 Mar 2003 12:18:25 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 08D4343FBF for ; Fri, 14 Mar 2003 12:18:22 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 22122 invoked from network); 14 Mar 2003 20:18:20 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 14 Mar 2003 20:18:20 -0000 X-pair-Authenticated: 209.68.2.70 Date: Fri, 14 Mar 2003 14:15:07 -0600 (CST) From: Mike Silbersack To: Garance A Drosihn Cc: Poul-Henning Kamp , "Daniel C. Sobral" , Juli Mallett , Eivind Eklund , David Schultz , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm ... SIGDANGER In-Reply-To: Message-ID: <20030314140414.V4480@odysseus.silby.com> References: <8023.1047662161@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 14 Mar 2003, Garance A Drosihn wrote: > The web page I gave in my other message also talks about a > 'psdanger' routine, which sounds like it might be what you're > talking about. > > [of course, as a userland-type-of-programmer, I'm hoping some > kernel-type will get excited about the idea and implement the > same set of ideas for FreeBSD. :-)] > > -- > Garance Alistair Drosehn = gad@gilead.netel.rpi.edu > Senior Systems Programmer or gad@freebsd.org > Rensselaer Polytechnic Institute or drosih@rpi.edu I'm really not sure how much of a help this SIGDANGER or whatever will be. As I see it, there are two cases of OOM: 1. Heavy load, lots of busy processes, all legitimate. - Nobody has complained about this case having problems. 2. Light load, then some program goes crazy and forks / chews up ram. X gets killed. - I think this is what people are complaining about. In case #2, SIGDANGER wouldn't help much; how much ram can the actively running, legitimate programs really save? What might be a good solution is to use some sort of statistics basic heuristic when determining what to kill. For example, say we have these processes: sshd - 2916K XFree86 - 21876K kdeinit - 13424K lots more kdeinits... Then we'll have 300 of: forkbomb - 2000K Clearly, our OOM killer would start killing X, then kdeinit, and only then start working on the forkbombs. What might work well is to have additional fields somewhere which store what a process's memory usage has been on average over time. The top three processes listed would all have averages == current memory usage, and would be ignored. Instead, the OOM killer would concentrate on the forkbombs, which would have 2000 - 0 = 2000 as their short-term memory usage increase. I think a system like that have a behavior closer to what is desired. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message