From owner-freebsd-arch Wed May 9 12:41:57 2001 Delivered-To: freebsd-arch@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 278DC37B424 for ; Wed, 9 May 2001 12:41:55 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.2/8.11.2) id f49JfdD98861; Wed, 9 May 2001 12:41:39 -0700 (PDT) (envelope-from dillon) Date: Wed, 9 May 2001 12:41:39 -0700 (PDT) From: Matt Dillon Message-Id: <200105091941.f49JfdD98861@earth.backplane.com> To: Peter Jeremy Cc: Kirk McKusick , Rik van Riel , arch@FreeBSD.ORG, linux-mm@kvack.org, sfkaplan@cs.amherst.edu Subject: Re: on load control / process swapping References: <200105082052.NAA08757@beastie.mckusick.com> <200105090018.f490IGR87881@earth.backplane.com> <20010509120743.Y59150@gsmx07.alcatel.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I don't think this follows. A program that does something like: :{ : extern char memory[BIG_NUMBER]; : int i; : : for (i = 0; i < BIG_NUMBER; i += PAGE_SIZE) : memory[i]++; :} :will thrash nicely (assuming BIG_NUMBER is large compared to the :currently available physical memory). Occasionally, it will be :runnable - at which stage it has a footprint of only two pages, but Why only two pages? It looks to me like the footprint is BIG_NUMBER bytes. :after executing a couple of instructions, it'll have another page :fault. Old pages will remain resident for some time before they age :enough to be paged out. If the VM system is stressed, swapping this :process out completely would seem to be a win. Not exactly. Page aging works both ways. Just accessing a page once does not give it priority over everything else in the page queues. :... :you ignore spikes due to process initialisation etc, a process that :faults very quickly after being given the CPU wants a working set size :that is larger than the VM system currently allows. The fault rate :would seem to be proportional to the ratio between the wanted WSS and :allowed RSS. This would seem to be a useful parameter to help decide :which process to swap out - in an ideal world the VM subsystem would :swap processes to keep the WSS of all in-core processes at about the :size of non-kernel RAM. : :Peter Fault rate isn't useful -- maybe faults that require large disk seeks would be useful, but just counting the faults themselves is not useful. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message