Is there a way to assign a swap space or swap file JUST to one process or a group of processes while other processes still use normal swap mechanism?

Here is some context. I have a process that uses huge amount of memory (larger than physical memory) and I want to direct the swapped pages owned ONLY by this process to a swap file that I create on SSD.

I am using Linux. I am open to use containers if that helps with the solution.

  • 2
    Containers use the system memory (incl. swap space managed by the system) so they won't help you here. – amphetamachine Apr 5 '17 at 20:27
  • 3
    The only way to isolate swap per program that I know of, is putting the program in a VM. – Mioriin Apr 5 '17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.