Martin Olsson wrote:
> Hi,
> 
> If grep through all files in a directory twice, then the first time takes
> a lot longer because the second run will have most of the files available
> in the "in memory file system cache".
> 
> I want to do some basic performance testing for a scenario involving disk I/O.
> I'm wondering if there is a command to purge the file system cache, either
> for a specific directory or file (which would be great) or otherwise purge the
> whole thing.
> 
> Basically, to create repeatable perf tests and get consistent results I would
> like to pin down all the "system state" so that any changes in numbers will
> be directly attributable to my code changes.
> 
> Does anyone know such a command to flush the file system cache?
> 
> 
> 
>               Martin

i think this is what you are after
# echo 1 > /proc/sys/vm/drop_caches

see http://linux-mm.org/Drop_Caches for more info/options

sam tygier

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to