What Is Drop Cache in Linux?
Contents

The reason to drop caches like this is for benchmarking disk performance, and is the only reason it exists. When running an I/O-intensive benchmark, you want to be sure that the various settings you try are all actually doing disk I/O, so Linux allows you to drop caches rather than do a full reboot.

What is cache drop?

Cache in Linux memory is where the Kernel stores the information it may need later, as memory is incredible faster than disk. … Linux Operating system is very efficient in managing your computer memory, and will automatically free the RAM and drop the cache if some application needs memory.

What is drop cache in Linux and how do you clear it?

Every Linux System has three options to clear cache without interrupting any processes or services.

  1. Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches.
  2. Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches.
  3. Clear pagecache, dentries, and inodes. …
  4. sync will flush the file system buffer.
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest