Linux – Force swapping of certain stopped processes

linuxswap

When I'm playing minecraft, my computer often has to swap because Google Chrome takes much RAM, too. So, I'd like to manually swap out Google Chrome. I know that I can temporarily stop all its processes with SIGSTOP, but how can I force them into swap? Or is that a bad idea?

Best Answer

Maybe try a command like this to temporarily use a lot of memory to force Chrome (and everything else) to swap out before starting minecraft

dd if=/dev/zero conv=block cbs=1024m of=/dev/null bs=32m count=32