I think this is the best solution, with swapoff -a of course. If you use programs that keep memory allocated, the modern kernels will kill them at some point, before chocking. You can/should then disable that though, see some good article here: http://www.oracle.com/technetwork/articles/servers-storage-d...