Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear file cache to repeat performance testing

What tools or techniques can I use to remove cached file contents to prevent my performance results from being skewed? I believe I need to either completely clear, or selectively remove cached information about file and directory contents.

The application that I'm developing is a specialised compression utility, and is expected to do a lot of work reading and writing files that the operating system hasn't touched recently, and whose disk blocks are unlikely to be cached.

I wish to remove the variability I see in IO time when I repeat the task of profiling different strategies for doing the file processing work.

I'm primarily interested in solutions for Windows XP, as that is my main development machine, but I can also test using linux, and so am interested in answers for that environment too.

I tried SysInternals CacheSet, but clicking "Clear" doesn't result in a measurable increase (restoration to timing after a cold-boot) in the time to re-read files I've just read a few times.

like image 590
Stephen Denne Avatar asked Jan 25 '09 21:01

Stephen Denne


People also ask

How does caching affect performance testing results?

Reduced latency Thereby, reducing the latency in the roundtrip time by recovering the content much faster. The time taken to retrieve the resource from the cache will be lower than the time it takes from the origin server and this speeds up the content delivery process significantly.

What is cache in performance testing?

Cache memory plays a key role in reducing the performance gap between a processor and main memory. Therefore, analyzing the cache behaviour of a program is critical for validating the performance of an embedded software.

Does caching improve performance?

Database caching allows you to dramatically increase throughput and lower the data retrieval latency associated with backend databases, which as a result, improves the overall performance of your applications.

When should you not use cache?

Three caching challenges to consider Caches take up space on the disk, so we have to assess whether the time we are saving is worth the amount of disk space used. Cached data might not be the most accurate, particularly for volatile real-time data. Therefore, volatile data should not be cached.


1 Answers

Use SysInternal's RAMMap app.

rammap empty standby

The Empty / Empty Standby List menu option will clear the Windows file cache.

like image 51
smallest Avatar answered Nov 09 '22 02:11

smallest