Re: RAM/Memory resources on 7 STABLE



On Fri, 16 Jan 2009 21:14:10 -0500
David Scheidt <dscheidt@xxxxxxxxx> 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.
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Illogical usage of swap
    ... >Free memory isn't the issue though. ... That only tells you how much swap space you have available, ... If it stays "inactive" long enough, and the "cache" ... a page may be moved to the "cache" queue. ...
    (freebsd-questions)
  • Re: How does disk caching work?
    ... instead of increasing the size of the cache queue it ... >>is actually the inactive queue that grows in size. ... You may want to study the kernel sources some more, ...
    (freebsd-performance)
  • Re: What happened to computer architecture (and comp.arch?)
    ... That doesn't really get rid of the looong pause when a CPU has to read a cache line into memory. ... Device has a queue of requests in memory. ...
    (comp.arch)
  • Re: How does disk caching work?
    ... I didn't claim that the cache queue were useless. ... This is because the kernel steals pages from the inactive queue when it ... The reason for this algorithm is that it is better to keep pages in the ...
    (freebsd-performance)
  • Re[2]: How does disk caching work?
    ... >> While you are correct that when cache is emtry kenrel will dip into the inactive queue. ... Pages on the cache queue still have the association. ... > You may want to study the kernel sources some more, ...
    (freebsd-performance)