Drop cache

From Attie's Wiki
Jump to: navigation, search

When benchmarking, the file system cache can really get in the way, reporting grossly exaggerated statistics.

Do the following before any observed reads, but be careful. It may corrupt files, and remember, the kernel is better at managing caches that you!

Note: This is not recommended for any production system, only a device under test.

Do the following as root.

sync
 
# Use the following values:
#   1: Free pagecache
#   2: Free dentries and inodes
#   3: Free both of the above
echo 3 > /proc/sys/vm/drop_caches
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox