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 next 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
2.6.32-042stab127.2
-------------------
root@unmanaged:~# systemd-detect-virt
openvz
-------------------

Please provide us the solution ASAP.
Re: How to clear cache memory on openvz container ? [message #53657 is a reply to message #53229] Wed, 08 July 2020 06:06 Go to previous message
vzadmin is currently offline  vzadmin
Messages: 10
Registered: December 2008
Junior Member

This is very informative and i'm going to bookmark it, thanks

Previous Topic: I am thinking of moving to LXD
Next Topic: OpenVZ install error CentOS7
Goto Forum:
  


Current Time: Sun Nov 03 14:33:59 GMT 2024

Total time taken to generate the page: 0.03663 seconds