3

You can clear page cache with /proc/sys/vm/drop_caches. Can someone provide a practical explanation of how this works, when as a sysadmin you would want to do this, how to determine if your system needs it, and a real-world example of how to apply this knowledge?

4
  • 6
    Approximately never. Unless you want to wind up here. Apr 4, 2014 at 18:50
  • 3
    Only in testing and you want some benchmarks for a 'fresh' read of data from disk. Apr 4, 2014 at 18:55
  • 1
    I do this when I'm restarting MySQL on systems with large innodb buffer pools. That combined with a few other features allows you to more evenly distribute NUMA memory allocations across nodes. The flush caches option does exactly that. Outside of that, pretty much never. Improved NUMA support in Percona Server.
    – user143703
    Apr 4, 2014 at 20:25
  • It can be useful to reduce memory fragmentation. SUSE recommends it to attempt to relieve memory pressure: suse.com/communities/blog/…
    – Dan Pritts
    Apr 11, 2016 at 20:04

0

You must log in to answer this question.

Browse other questions tagged .