From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079058316082.tru64-unix-managers.marc@archive.invalid> From: "CSCF Staff \(rehorka\)" Date: Tue, 27 Jul 1999 13:28:41 +0000 To: tru64-unix-managers Subject: Can I set file caching to zero? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079058316082 I have a researcher who is trying to prevent caching from causing a bias in the timing of different functions that read from disk. He needs to time how long two different methods take to read the same data from the same files. Unfortunately, once he's run the first function, so much of the data is cached that the second function appears dramatically faster. This behavior persists even if he swaps the order of the functions. He has tried several methods with varying degrees of success, but what he is looking for is 0% cache hit rate. Since the difference in times of the two functions may be relatively small, any caching will obscure this difference. Sequentially reading a large file seems to be terrible at doing this. Randomly reading a large file is better but not good. He has also used the sync() (although not fsync() ) function which works suprisingly well at times but not always. It seems like the I/O subsystem is too sophisticated. The only ways I know of to do this are to reboot the system or re-mount the file system, both of which are impractical. Gary Rehorka Computer Science Computing Facility, rehorka@cs.umass.edu LGRC Room A313, Tel: (413)545-4822 University of Massachusetts Fax: (413)545-1249 Amherst, MA 01003