I have a backend app that is being used internally by developers hosted on our server, however, the app unfortunately requires the use of Passenger and Ruby, both of which are very memory-hungry.
I have an SSD swapfile that should allow reasonable performance for our usage, and I'd like to force this app to use swap space and leave the RAM open for our front-facing apps.
So the question is, is there a way to force a process/user(this process is run under a specific user) to use swap space as much as possible? I think limits.conf may be capable, but I don't want it to give Out of Memory errors, just switch to swapfile.
Best Answer
You should take a look at cgroups (Control Groups). There is some info on ad-hoc cgroups which also says
which seems to be exactly what you want.
If your backend developer app is causing your front-facing apps pain, it'll probably be a good idea to move the backend stuff to it's own server.