I have OpenVZ VPS and have problem with clearing the cache:
In OpenVZ not work echo 3 > /proc/sys/vm/drop_caches
How may be this cache clear?
This was reported on the OpenVZ bug tracker. It has been resolved as RESOLVED WONTFIX
From Kir Kolyshkin in the bug report (project leader of OpenVZ):
All containers share the same page cache (although there is per-container accounting), so to drop caches of one single container we have to check each page:
1 Whether it belongs to the container or not -- supposing we do have that information, which I am not sure of
2 Whether this page is used by other containers.
So, while this is trivial on the host system, it is much less trivial for a container. And this is not a critical piece of functionality -- drop_caches is only useful for running various sorts of benchmarks.
Since your don't get your own kernel instance with OpenVZ you are prevented from running the command.
As a result, in order to clear the cache -> must restart VPS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With