Using just a web browser as an example, there are many layers of cache. For example, the web browser will cache pages it downloads on your harddisk. This can usually easily be cleared. If you have any proxies between you and the internet, they may also cache pages - these can often be defeated by adding ?my=chin or other query string garbage to the end of a URL, as the proxy will think it's a different page. There are also filesystem caches on the harddisk, which store recently read/written files, and several layers of CPU cache. On Thu, 2007-01-11 at 21:52 +0100, Erik Mouw wrote: > On Thu, Jan 11, 2007 at 03:43:11PM -0500, Ye ilho wrote: > > This may sound stupid but I was wondering if there is any way to empty > > the cache. I know that there are so many kinds of cache so here is > > what I am trying to do. > > > > I am currently taking measurement of certain programs using various > > applications such as firefox, cat, kernel make and etc. > > I have a different setup for each measurement and thus I will have to > > repeat the same measurement under different scenarios. I realized that > > if I download the same web page, it runs faster because it is from the > > cache. So I have to reboot the system each time for taking > > measurement. > > Is there any better way to do this? > > echo 3 > /proc/sys/vm/drop_caches > > See Documentation/filesystems/proc.txt for full documentation. > > Note that this will not empty your web browsers own cache! > > > Erik > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/