1

Why does Linux purge the memory cache when it is nearly full?

view story
linux-howto

http://unix.stackexchange.com – Here's what the memory graph looks like on a VPS running CentOS with 512MB of RAM and nginx/php-fpm/mysqld serving (mostly static) content to a couple thousand visitors per day. As you can see, it's quite jumpy in the cache and buffer area. The memory cache is purged at irregular intervals (ruling out a responsible cron job). It's usually, but not always, purged at the point where it can grow no larger. Sometimes it clears almost entirely, at other times only halfway down. I'm trying to understand the logic behind these purges. I would expect file data to be cached much longer & don't (HowTos)