[CentOS] Flush memory on a server?

Sat Sep 9 13:14:55 UTC 2017
Robert Nichols <rnicholsNOSPAM at comcast.net>

On 09/09/2017 07:55 AM, Nicolas Kovacs wrote:
> Le 09/09/2017 à 14:41, Phil Perry a écrit :
>> Why were you surprised? Linux systems use the available RAM, surely you
>> understand that?
> 
> I'm surprised because my system used the available RAM and then it even
> began to swap.
> 
>>
>> Of course there is the possibility that you have discovered a bug
> 
> Minimal CentOS 7 installation with BIND, Apache, MySQL, Postfix and
> Dovecot, regularly updated.
> 
> Hence my post. Wondering if other CentOS users experienced something
> similar.

Every system that runs continuously for more that a few days will have some pages that were used once when some long-running process started and were never referenced again. Those pages will eventually migrate out to swap, and that's the best place for them. Right now, I see that this system has been up for 16 days and has ~270MB of swap used. I typically see ~500MB of swap used when the system has been running a while longer.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.