clearing caches

categories: blog

For benchmarking purposes it makes sense to clear the caches, the linux kernel creates for us. An additional sync beforehand makes sure that everything is committed to disk (dirty objects will not be freed).

sudo sysctl vm.drop_caches=3


echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null

This will drop the pagecache, dentries and inodes.

View Comments
blog comments powered by Disqus