From owner-freebsd-questions@FreeBSD.ORG Sat Jan 17 04:43:27 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9666D106564A for ; Sat, 17 Jan 2009 04:43:27 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.freebsd.org (Postfix) with ESMTP id 24D878FC16 for ; Sat, 17 Jan 2009 04:43:26 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by nf-out-0910.google.com with SMTP id h3so292286nfh.33 for ; Fri, 16 Jan 2009 20:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=gohLu4BBBBugXvtUfVzr8HHWDjS85BgUA0CT+AxqHuY=; b=flK3JBsjydFEkf3dPn5UtQGqP4Z8UQJ+65BHSta2t2tT1/4JgygJ1zYZauwPC5g3RX IB8xjFzaKpT1Ea3Tqvs0T6GP47ZwbI4R1aT08MxNqqcHIkRKhFIR0KFMccgTTdWVlRmG VS4euu9Qqi7haVRXIs2APtQ1bhjwFnhJDqOZo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=UhnxRRiH2Ste6qK+OAvfzbsORF6ZsPdlL0XdEkZtXBknPEme0A5r8K058pHZnj92Vn JkDftdVwMBRkQ6dLaIDd7Za3Y4iV9Cnee0jBHWZIs9Lnl7QXUm0+ytXyTwxn9lYpwJHk 6gnFiEZ2ttSUcxnhHlDVQ41+tuXY57RVW/1gA= Received: by 10.210.144.3 with SMTP id r3mr4110977ebd.141.1232167406271; Fri, 16 Jan 2009 20:43:26 -0800 (PST) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id b36sm3398795ika.7.2009.01.16.20.43.22 (version=SSLv3 cipher=RC4-MD5); Fri, 16 Jan 2009 20:43:25 -0800 (PST) Date: Sat, 17 Jan 2009 04:43:11 +0000 From: RW Cc: freebsd-questions@freebsd.org Message-ID: <20090117044311.691ec3ed@gumby.homeunix.com> In-Reply-To: <20090117021409.GA3730@panix.com> References: <4970C565.1000304@njit.edu> <20090116222249.S10333@wojtek.tensor.gdynia.pl> <20090117012519.71feb293@gumby.homeunix.com> <20090117021409.GA3730@panix.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: RAM/Memory resources on 7 STABLE X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2009 04:43:28 -0000 On Fri, 16 Jan 2009 21:14:10 -0500 David Scheidt wrote: > On Sat, Jan 17, 2009 at 01:25:19AM +0000, RW wrote: > > Although, looking at the output of top, most of the memory is in the > > inactive state. As I understand it cache pages go from active to > > cached, and the inactive queue contains pages that need to be > > written out to swap before they can be reused. > > No. It just means they're not active -- nothing has touched them > "recently". They may be dirty. They may not be. Do you know that for a fact, because it contradicts the description in Matt Dillon's VM-design article. The article say that clean pages go to the cache queue and dirty pages go to the inactive queue, and emphasizes the need to keep then separated. If clean pages do go to the inactive queue I'd be interested to know the reason. > Since I'm not doing anything with it (I'm > writing this from another machine), and its just hanging out, this is > what I'd expect. Should it do something that requires memory, the > pager will toss clean inactive pages to the free list, and they'll be > reused. IIRC, according to the article when you're short of free memory (i.e. most of the time) it's allocated from the cache queue. The queues are rebalanced by flushing inactive pages and moving then to the cache queue, and by pages coming off the active queue. AFAIK pages are taken off the active queue when there is a significant need for rebalancing. I've seen memory hang about there pretty much indefinitely after I shut down kde/xorg - much longer than 20-60 seconds.