Re: Clearing the I/O caches? (for benchmark tests)

Tom M. Kroeger (tmk@cse.ucsc.edu)
14 Jul 1999 16:42:47 -0700


"Stephen C. Tweedie" <sct@redhat.com> writes:
> Hi,
Hey Stephen,

> On 13 Jul 1999 16:10:38 -0700, tmk@cse.ucsc.edu (Tom M. Kroeger) said:
> > My problem is that while I'm able to apparently clear the page
> > directory and inode caches, I'm unable to completely clear the buffer
> > cache. This is indicated by the fact that my benchmark sees a buffer
> > cache hit ratio of 74% right after a reboot, but after the test has
> > been run once I'm unable to get the buffer cache hit ratio below 78%.
> > I understand that data that some data (e.g. open file meta data) can't
> > be cleared, but once my benchmark test is finished, all of the data
> > should be unlocked and freeable? correct?
>
> Nearly. The ext2 filesystem keeps a cache of recently-accessed bitmap
> buffers pinned in memory, and once that cache is primed you can't flush
> it unless you unmount the filesystem. If you have any processes still
> cd'ed to the active filesystem, then they will also be keeping directory
> inodes pinned in the inode cache.

ahhh.... ;-) thank you for the light!

OK I can unmount /home, but is it reasonable to unmount /usr. I
suspect a reboot might be the simplest thing.

In any case the memory exhausting approach still cleared far more
space than sys_sync & invalidate_buffers etc... (are these buffers
taken from ext2 when memory becomes very low?) Any idea as to why?

You said ext2 keeps "recently-accessed bitmap buffers pinned", can
I just wait 30 second ( or however long) and then re-run the test?

Again thanks for you time and help,

-- 

tmk

----------------------------------------------------------------------- Tom M. Kroeger Pray for wind Graduate Student, UC Santa Cruz \ Pray for waves e-mail: tmk@cs.ucsc.edu |\ and Pray it's your day off! http://www.cse.ucsc.edu/~tmk |~\ (831) 459-4458 |__\ (831) 426-9055 home ,----+--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/