2

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.

Ecksters
  • 123
  • 4

1 Answers1

4

You should take a look at cgroups (Control Groups). There is some info on ad-hoc cgroups which also says

Note that the memory limit applies to RAM use only -- once tasks hit this limit, they will begin to swap.

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.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • Oh, that does sound good, I'll look into it, hopefully someone has a more specific example, but this is definitely what I'm looking for. – Ecksters Apr 08 '15 at 13:35