I use my Linux box for a lot of computational work, and sometimes a particular computation eats a lot of RAM.  When I'm done, I end up with a bunch of swap used and a bunch of free memory, and if I go about my business as usual, all the other processes on the machine will be a bit laggy until they get swapped back in.  It seems like it would be nice if there were a command to quickly page everything back into RAM so that I could, say, run it and then get up and go use the restroom or something and when I get back everything would be fast again.I found this question that suggests you can accomplish this (at least on Linux) with sudo swapoff -asudo swapon -aBut when I try that, it takes forever - it's only freeing swap at a rate of 2-5 MB/sec, which is way less than it should be capable of, and hardly seems worth it.  Is this normal?  Is there a way to speed this process up so that it runs in going to the restroom time instead of going out to lunch time?
Free up swap space all at once after swap event
linux;swap