Subject: Re: Bad response...
To: None <>
From: Simon Burge <>
List: current-users
Date: 09/07/2004 14:36:16
Simon Burge wrote:

> I was talking to Soda offline and we made the following observation:
> $ vmstat -s | egrep 'managed|anonymous|cached' | grep -v scanned
>    127992 pages managed
>    490879 anonymous pages
>     14622 cached file pages
>     12453 cached executable pages
> A little program that walks the kernel page lists says that there are
> 48595 anon pages and 27179 pages attached to objects.  The sum of file
> and exec pages is close to the pages backed by objects.
> Obviously there are not more anon pages than total pages.  These
> numbers match gdb run on the live kernel and querying uvmexp directly,
> so it's not some silly reporting bug in vmstat.
> At least for the current knobs on this box the page daemon will think
> that both anon and file pages are available for reclaim.
> uvmexp.anonpages is only changed in a handful of places in
> uvm/uvm_page.c and they all look right at a glance.  However, there
> must be some accounting problem lurking there somewhere.

YAMAMOTO Takashi has committed one fix to anonpages accounting, in
sys/uvm/uvm_page.c rev.1.99.  I'm trying that now on my 2.0 branch box,
and so far so good:

$ vmstat -s | egrep 'managed|anonymous|cached' | grep -v scanned
   127989 pages managed
    53385 anonymous pages
    22550 cached file pages
    11733 cached executable pages

I can also wc a 180MB file and the system still remains responsive and
mpd doesn't pause when playing an mp3 - something that certainly would
have happened last week.  Galeon is also not paging itself out all the
time and when switching back to that workspace after wc'ing the big
file galeon redraws in a second or less instead of the minutes it did

This is with vm.{anon,exec,file}{min,max} = {10,80,15,50,10,25}. I've
just reverted this to the defaults and will see how it goes.  My box had
been up for around 100 days previously, so I'll keep an eye on anonpages
too and see that it doesn't become incorrect.

Simon Burge                            <>
NetBSD Support and Service: