[oclug] SWAP in virtual machines

Stephen Gregory oclug at kernelpanic.ca
Mon Oct 5 10:49:22 EDT 2009


Mike wrote:
>
> Who should manage swap with virtual machines  the host or the guest?

That is a million dollar question. I never could find a solid answer in
VMware's mountains of documentation (manuals, white papers, knowledge
base, and forums). With VMware ESX/ESXi we over commit RAM, and use
VM/guest swapfiles. (ESX creates per VM swap to manage the RAM over
commit.) This works fine with Windows and Linux. Using VMware
Workstation I avoid over committing RAM. I use guest based swap, and
allow Workstation to swap out some VM memory (preferences, Memory tab).

Guest OS does make a difference. Windows XP/2000/NT works best with a
swapfile, and often a fairly large one. I have not used Vista or 7
enough to make a recommendation. Linux and *BSD don't seem to mind no
swap but I still use swap. Mostly because swap is installed by default
and it seems like a good idea to have a bit of swap.

Like Bart said these are gut feelings and what seems to work best. I
haven't benchmarked anything.

-- 
sg


More information about the OCLUG mailing list