Drop cache
From Attie's Wiki
(Difference between revisions)
(Created page with "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 m...") |
m |
||
Line 1: | Line 1: | ||
When benchmarking, the file system cache can really get in the way, reporting grossly exaggerated statistics. | 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 | + | 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.}} | {{note|This is not recommended for any production system, only a device under test.}} | ||
Latest revision as of 12:04, 23 July 2012
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