Subject: Re: UBC indications
To: None <jsarkes@tiac.net>
From: Chuck Silvers <chuq@chuq.com>
List: current-users
Date: 11/06/2000 20:05:15
On Mon, Nov 06, 2000 at 08:51:08AM -0500, Joseph Sarkes wrote:
> > right, the UBC code doesn't print anything during the boot process.
> > 
> > the way to tell that it's there is to do a bunch of file access
> > that didn't fit in the cache before but that does fit now.
> > the amount of memory available for cached file data under UBC is
> > currently about 85% of the amount listed in the "avail memory = X" line.
> > 
> > another way to tell that it's there is to access data via both
> > read()/write() and via mmap() and see that these two interfaces
> > to the filesystem now return the same data, whereas before
> > you'd see cache incoherency.  I've put a program to demonstrate
> > this named "vmtest.c" in the same directory with the diffs.
> 
> The test program does show the difference. systat/bufcache will
> fault if it isn't rebuilt, and after rebuild, it shows the just the
> normal 5% size buffer cache. Does the ubc tie in differently, or 
> are there just updates that need to be done on utilities that 
> check memory usage?

in UBC, the traditional buffer cache is no longer used to hold regular
file data, only meta-data.  regular file data is now stored in the
"page cache" which is composed of memory from the same VM page pool
as anonymous memory.  so the amount of memory used to hold cached
regular file data will change over time depending on system usage.
eventually we should add a way to display the current balance of vnode
pages vs. anonymous pages, but that hasn't been a priority.

-Chuck