Swap memory

Hi team,

Is there any ability to force the system to use the swap memory for a specific service? And prevent another service of using the swap memory?

Thanks

You can force a process to start out mostly in swap, but if the process runs at all it will wind up in RAM. Running something totally from swap is a bad idea, and if allowed, it results in a real performance drag called thrashing. The swapped process runs 100's of time slower and can seriously degrade the whole system. For every other process on the system.

If you got this idea from seeing how much memory a service is using, you may have misunderstood. A lot of the working set of a process is in shared memory. All processes use this shared memory at the same time. If each of the required system processes (services among them) had nothing but private memory, it likely would have eaten most of system memory before you even logged onto a newly booted box.

You may want to rethink this swap idea.

2 Likes

The operating system allocates swap depending on the process........ We don't need to change it.... Its not recommended........ If you want a particular service to run smoothly, Then change the priorities of the service related processes ( or daemons)