Search This Blog

Wednesday, July 17, 2013

How to clear memory (caches) on Linux

Since 2.6.16 you need only echo to clear cached memory on Linux box.

This will clear all cached memory.


echo 3 > /proc/sys/vm/drop_caches
You can clear only part of it by using 1 or 2. All options:
  • 1 to clear cached pages.
  • 2 to clear dentries and inodes. 
  • 3 to clear all cached memory.

No comments:

Post a Comment