Messages in this thread | | | From | (Måns Rullgård) | Subject | Re: how to turn off, or to clear read cache? | Date | Wed, 20 Aug 2003 18:57:15 +0200 |
| |
Luciano Miguel Ferreira Rocha <luciano@lsd.di.uminho.pt> writes:
>> >>> I need to make some performance tests. I need to switch off or to >> >>> clear read cache, so that consequent reading of the same file will >> >>> take the same amount of time. >> >>> >> >>>Is there an easy way to do it, without rebuilding the kernel? >> >> Unmount and remount the filesystem. >> > >> > >> > Would >> > >> > # mount -o remount >> > >> > do the job? >> >> no > > What about dd if=/dev/hda bs=8M count=$(awk '/MemTotal/ { printf "%d", $2/4096 }' /proc/meminfo) ? > > Will it clear the cache?
It will probably clear some cache to make room for cache from hda.
perl -e '@f[0..100000000]=0'
will do it faster.
-- Måns Rullgård mru@users.sf.net
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |