LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting swappiness for a single process (https://www.linuxquestions.org/questions/linux-software-2/setting-swappiness-for-a-single-process-4175600845/)

MikeyCarter 03-01-2017 09:19 AM

Setting swappiness for a single process
 
Anyone have step by step on how to setup and control swappiness on a single process.

I've seen some google articles talking about cgroups but since I don't even have cgroups setup...

A doc with a start to finish would be nice, if one exists. Any one know if such a doc exists out there?

pan64 03-02-2017 01:59 AM

probably I misunderstood, but for me it looks like it has no any meaning. swap is used to move some parts of memory out of RAM to be able to use it for "more important" processes. So if your process is not running (=waiting for something or similar) it can be swapped out, and will be automatically copied back to memory if required.
there is a renice command to rule the "importance" of a process.
https://help.marklogic.com/Knowledge...nux-swappiness

sundialsvcs 03-02-2017 01:40 PM

"Swappiness" is a global setting which influences the system's propensity to swap. It ranges from "avoid swapping at all costs" to "aggressively swap." It is not a per-process parameter.

szboardstretcher 03-02-2017 02:19 PM

Could you use LXC to run a single process and set the swappiness in the container to affect only that process? Or docker, whatever.

jefro 03-02-2017 05:17 PM

It may be possible to write the program to set how it uses swap too.

ondoho 03-03-2017 01:55 AM

i think op needs to explain all this much better:
Quote:

Originally Posted by MikeyCarter (Post 5677576)
I've seen some google articles talking about cgroups

and what they think they're going to achieve with it.


All times are GMT -5. The time now is 11:14 AM.