Re: how to knock a page out of file cache

2009-10-21 Thread Ishwor Gurung
[...] > Also, are you looking for sync(2) http://linux.die.net/man/2/sync? Also, maybe mmap.flush([offset, size]) @ http://docs.python.org/library/mmap.html ? Get the file, mmap it and flush it. The docs has more info on flush(...) Afaik, ultimately the kernel will control the writebacks of dirt

Re: how to knock a page out of file cache

2009-10-21 Thread Ishwor Gurung
[...] > I thought of simply opening and writing to the file to dirty it's > pages, but there no guarantee that pdflush will have already written > the dirty pages to disk -pretty sure it depends on all the dirty ratio > and intervals. > > Does anybody know of a system call that will 'knock' the fil

Re: how to knock a page out of file cache

2009-10-20 Thread Paul Rubin
birdsong writes: > Does anybody know of a system call that will 'knock' the file out of > file cache? Can madvise or fadvise do this? I don't think so. Best I can think of is unmount and remount the file system. And I don't know if even that is guaranteed if you don't physically remove/unplug

how to knock a page out of file cache

2009-10-20 Thread birdsong
Can anyone recommend a way to read a file ensuring that it is not coming from file cache on Linux? I'm trying to write a metric script for measuring http connect + read times from a web server over localhost. I want to plot both file cache read times and non-cached files. I thought of simply ope