-2

Referring to Moving a process to and from swap and other answers which talk about moving processes to and from the swap space for Linux, none of them give a prolific description of the pros and cons of doing so. Please explain this.

Please also explain how to do this in a step-by-step manner.

1 Answer 1

1

Main memory (RAM):
- is faster
- is very low latency
- is more reliable
- is more expensive

Swap is just virtual RAM on disk, and as such, it inherits the usual pros and cons of storage drives, depending on which type of drive it is. It is used for inactive pages when the system needs more real RAM.

It is recommended to have swap space available in case the system fills all the RAM, to avoid hiccups or a freeze. However I don't think it's possible to move processes by hand. The Linux kernel is written to handle memory pages in an efficient way and keep in RAM what it needs and swap what it doesn't, so you shouldn't need to do anything on your side.

You can adjust the swappiness as per the link you posted; that value determines the percentage of RAM that must be full before the kernel starts swapping.

Not the answer you're looking for? Browse other questions tagged .