Is it possible in Linux/Unix systems, to move a process explicitly to the memory swap?
I've investigated swap* tools and kill but they can't do anything I want.
Example: Process FOO is currently running and I want to start another process BAR which won't fit into RAM and will, therefore, be swapped. I'd like to prefer BAR to run faster for now, so I want FOO to be moved to swap space first and then run BAR. After BAR quits, I'd like to unswap FOO.
renice(8)programs, but you can't move them to swap explicitly. Managing memory at that level is kernel's job, not yours. – Satō Katsura Sep 09 '17 at 14:29kill -STOPmay prompt the system to gradually move their pages to swap. Then usekill -CONTon the pid to continue its execution (it will swap back in to RAM pretty promptly then, I suppose). – Kusalananda Sep 09 '17 at 14:34