May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Clear Memory Cache on Linux Server

Our Virtuozzo VPS hwnodes would hang onto large amounts of cached memory after a period of uptime and as it grew, load average of the hwnode would correspondingly increase during activities such as container restarts, create, stop, or start. After troubleshooting and applying virtuozzo tool and kernel updates, the problem persisted (though not as bad). What I’ve noticed however, is that load average spikes were not occuring after a fresh reboot, where free -m showed a lot of free RAM as opposed to cached RAM. After a couple of days of uptime, there was only a couple gig of free RAM and 58GB + of cached RAM (we run 150 containers per hwnode). These conditions do not appear favorable and the system starves for resources during container restarts, etc. Noticablely, CPU sy would skyrocket from vztop output. After clearing cache mem via:

sync; echo 3 > /proc/sys/vm/drop_caches

load average spikes during a container restart have stopped.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>