OpenVZ Forum

Home » General » Discussions » How to clear cache memory on openvz container ? (How to clear cache memory on openvz container ?)
How to clear cache memory on openvz container ? [message #53229] Thu, 05 April 2018 17:26 Go to previous message
chaitanya is currently offline  chaitanya
Messages: 1
Registered: April 2018
Location: India
Junior Member
We have OpenVZ container.
We are unable to clear cache memory on container.
Below are the outputs of respective commands

Scenario : High memory is consumed by buff/cache so that free memory becomes 0 and it affects applications to get freeze . Our single container contains cassandra(16GB) , elasticsearch(24GB) , apache and activemq(8GB).

I have 2 questions :
1) How to clear cache memory on openvz container ?
2) How to restrict buff/cache memory from consuming high memory on openvz container.
3) How to protect free memory on container to go down to 0 ?

root@unmanaged:~# free -m
total used free shared buff/cache available
Mem: 65536 **** 0 ***** 35164 *****
Swap: 0 0 0
root@unmanaged:~# sync; echo 3 > /proc/sys/vm/drop_caches && sync; echo 2 > /proc/sys/vm/drop_caches && sync; echo 1 > /proc/sys/vm/drop_caches
-su: /proc/sys/vm/drop_caches: Permission denied
-su: /proc/sys/vm/drop_caches: Permission denied
-su: /proc/sys/vm/drop_caches: Permission denied
root@unmanaged:~# uname -r
root@unmanaged:~# systemd-detect-virt

Please provide us the solution ASAP.
Read Message
Read Message
Previous Topic: I am thinking of moving to LXD
Next Topic: OpenVZ install error CentOS7
Goto Forum:

Current Time: Mon Mar 04 21:19:18 GMT 2024

Total time taken to generate the page: 0.02039 seconds