Date: Sat, 17 Jan 2009 04:43:11 +0000 From: RW <rwmaillists@googlemail.com> Cc: freebsd-questions@freebsd.org Subject: Re: RAM/Memory resources on 7 STABLE 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Jan 2009 21:14:10 -0500 David Scheidt <dscheidt@panix.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090117044311.691ec3ed>