What is dropCaches?

What is dropCaches?

Writing the appropriate value to the file /proc/sys/vm/drop_caches causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. Running sync writes out dirty pages to disks. So, running sync can help the ensuing drop operations to free more memory.

Is it OK to delete cache?

Your Android phone’s cache comprises stores of small bits of information that your apps and web browser use to speed up performance. But cached files can become corrupted or overloaded and cause performance issues. Cache needn’t be constantly cleared, but a periodic clean out can be helpful.

Why do I have to drop caches in Linux?

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.

Why do I drop caches in my VM?

Memory pressure can also cause it to be dropped. i.e. a nightly echo 3 > /proc/sys/vm/drop_caches is the easiest fix for that bug if you don’t want to have a downtime for restructuring your zfs. So maybe not cargo cult admining, but some pretty good debugging was the reason.

Why does clearing the cache fix things sometimes?

The cache stores all of these locally, to save bandwidth and speed up your browsing. Why does clearing the cache fix things sometimes? Every once in a while, a site will stop working, and clearing the cache will fix it. A coworker of mine, for example, couldn’t upload articles to our website around a month ago.

Why do I have a cache on my computer?

Sure, the cache is taking up room on your hard drive, and some people find that annoying. But the reason you have a hard drive is so you can store things on it, and a cache that speeds up your web browsing feels like a valid use of your hard drive’s space.