From owner-freebsd-arch Fri May 18 19:57:15 2001 Delivered-To: freebsd-arch@freebsd.org Received: from helium.chromatix.org.uk (turnover.lancs.ac.uk [148.88.17.220]) by hub.freebsd.org (Postfix) with ESMTP id BA2E837B42C for ; Fri, 18 May 2001 19:57:11 -0700 (PDT) (envelope-from chromi@cyberspace.org) Received: from dolphin.chromatix.org.uk ([192.168.239.105]) by helium.chromatix.org.uk with esmtp (Exim 3.15 #5) id 150wuv-0008A3-00; Sat, 19 May 2001 03:56:33 +0100 X-Sender: chromi@helium.chromatix.org.uk Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sat, 19 May 2001 03:56:14 +0100 To: Rik van Riel From: Jonathan Morton Subject: Re: on load control / process swapping Cc: Matt Dillon , Terry Lambert , Charles Randall , Roger Larsson , arch@FreeBSD.ORG, linux-mm@kvack.org, sfkaplan@cs.amherst.edu Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> FWIW, I've been running with a 2-line hack in my kernel for some weeks >> now, which essentially forces the RSS of each process not to be forced >> below some arbitrary "fair share" of the physical memory available. >> It's not a very clean hack, but it improves performance by a very >> large margin under a thrashing load. The only problem I'm seeing is a >> deadlock when I run out of VM completely, but I think that's a >> separate issue that others are already working on. > >I'm pretty sure I know what you're running into. > >Say you guarantee a minimum of 3% of memory for each process; >now when you have 30 processes running your memory is full and >you cannot reclaim any pages when one of the processes runs >into a page fault. Actually I already thought of that one, and made it a "fair share" of the system rather than a fixed amount. IOW, the guaranteed amount is something like (total_memory / nr_processes). I think I was even sane enough to lower this value slightly to allow for some buffer/cache memory, but I didn't allow for locked pages (including the kernel itself). The deadlock happened when the swap ran out, not the physical RAM, and is independent of this particular hack - remember I'm running with some out_of_memory() fixes and some other hackery I did a month or so ago (remember that massive "OOM killer" thread?). I should try to figure those out and present cleaned-up versions for further perusal... -------------------------------------------------------------- from: Jonathan "Chromatix" Morton mail: chromi@cyberspace.org (not for attachments) big-mail: chromatix@penguinpowered.com uni-mail: j.d.morton@lancaster.ac.uk The key to knowledge is not to rely on people to teach you it. Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/ -----BEGIN GEEK CODE BLOCK----- Version 3.12 GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*) -----END GEEK CODE BLOCK----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message