Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2009 04:43:11 +0000
From:      RW <>
Subject:   Re: RAM/Memory resources on 7 STABLE
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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.

Want to link to this message? Use this URL: <>