We are currently analyzing performance of some of our boxes at work and we find that we have boxes that are swapping a lot and things start crawling when that starts to happen cause we are using spinny disks.
I had a theory that it might actually be faster to start up brand a process and do all the initialization we would normally have to do for that than to wait for the process to have its memory loaded off of disk.
To test this theory out I want to force a process to swap to disk and I want to see how long it takes to respond after it has been swapped out and compare that to a new process start up, is there a way of forcing a process to swap without modifying swappiness settings or running the box out of memory?
I don't have root on these boxes so basically I need an unprivelaged way of doing/hint to the kernel to do this.