how to drop_caches in OpenVZ centos6 container

Posted by Omar Jackman on Server Fault See other posts from Server Fault or by Omar Jackman
Published on 2012-12-02T21:16:47Z Indexed on 2012/12/02 23:09 UTC
Read the original article Hit count: 734

I have tried

sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

sudo echo 3 > /proc/sys/vm/drop_caches

echo 3 > /proc/sys/vm/drop_caches

and a bunch of other variations but with every try I get

bash: /proc/sys/vm/drop_caches: Permission denied

How do I clear the ram used for buffers/cache in my centos6 openvz container?

It seems like the only way to do what I need is to reboot the container.

© Server Fault or respective owner

Related posts about centos

Related posts about memory