Is there a way to tell the kernel to keep a certain amount of free RAM and do not use it for caches?
I hear you thinking, "Why you would want that?! cached RAM is free RAM when someone wants it!"
This is a special case. It seems that a nginx plugin for an ip location service check the amount of free ram before reload and it refuses to restart / reload if there's not enough strictly free RAM to do it. And I have a couple of servers in this situation... all RAM cached and a nginx that refuses to restart itself. So I have to manually (or "cronly") do a drop_caches to have enough strict free RAM for the nginx restart.
I'd like to have a way to specify a max amount of cached ram or a minimum strict free RAM to keep available to get rid of the hacky drop_caches method
0 Answers