Wednesday 4 September 2013

Clear memory cache on your Linux server

This command will clear pagecache:
/sbin/sysctl vm.drop_caches=1
To clear dentries and inodes you can use:
/sbin/sysctl vm.drop_caches=2
To free memory of the all above use a following command:
/sbin/sysctl vm.drop_caches=3
What the above commands will do is that they will sync your memory and edit a following file with appropriate number entry. :
/proc/sys/vm/drop_caches

0 comments:

Post a Comment