Subject: How do I supress/shrink VM Page Cache for large files?
To: None <,>
From: None <>
List: tech-kern
Date: 06/13/2003 04:45:52
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,