Subject: Re: How do I supress/shrink VM Page Cache for large files?
To: None <tech-embed@netbsd.org>
From: Ivo Vachkov <ivo@unilans.net>
List: tech-embed
Date: 06/13/2003 12:15:53
Try sync()ing the vm cache with sync()/fsync()

I'm not currnetly sure but I think there are some sysctl variables that 
also may be usefull ... try looking at sysctl's man page

	Ivo Vachkov
	Network Administrator
	Unilans Networking

Davef1624@aol.com wrote:
> I've got an application that generates logging events
> to a file-- this file continually grows and can consume
> over 1 Gbyte of disk space.
> 
> Unfortunately, as the file grows, so does the VM Page Cache
> (and as a result the free memory on my system approaches 0!).
> 
> For my application, I will *never* read back the file,
> and all file write operations will always be sequential.
> 
> How can I either:
> 1) disable caching of such file system write-only operations
>    so that the VM Page Cache doesn't eat up memory?
> 2) Purge/shrink the VM Page Cache of all entries
>    for a particular vnode?  Is there a routine to do this?
> 
> In genfs_getpages(), there is a call to uvn_findpages() --
> which I believe eventually calls uvm_pagealloc() if the 
> page wasn't already in the page cache.   
> Would this be the reason the memory on my system
> approaches 0 when write to large files?
> 
> Thanks for your help,
> Dave 
> 
> 
>