Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/theme.php on line 623
Niklas blog » Blog Archive » Flushing the Linux file cache

Niklas blog

Just another WordPress weblog

Flushing the Linux file cache

September 11th, 2009 in linux

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

When performance testing IO-bound code it is often desirable to make sure that the file cache in Linux is empty. Here’s how to:

root@foo:~# sync
root@foo:~# echo 3 > /proc/sys/vm/drop_caches

This works since kernel 2.6.16. More info: http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

Tags: ,

Comments are closed.