Child pages
  • Evicting data from filesystem cache
Skip to end of metadata
Go to start of metadata

To measure disk I/O, it is usually important to drain file-system cache. This ensure that data will be read from the disk and not access (at very high rate) from the memory. The following two ways can be helpful for this purpose on a Linux machine. Note: Method 2 requires root privileges.


gcc -Wall -O3 -o vmtouch vmtouch.c
./vmtouch -e /path/to/file/to/evict

More information about this method is available here


sync ; sudo echo 3 > /proc/sys/vm/drop_caches
  • No labels