Re: SWAP in virtual machines

Bart Trojanowski <[email protected]>
Newsgroups gmane.user-groups.linux.ottawa.general
Message-ID <[email protected]>
* Mike Kenzie <[email protected]> [091002 13:46]:
> Who should manage swap with virtual machines  the host or the guest?

Probably depends on the host OS and the implementation of the
hypervisor.  With KVM, I'd say that you're better off giving very little
or no swap at all to your guests and overcommit the memory on the host.

... but that's just my gut feeling, I had not done any benchmarks on
this at all.

Other things I heard discussed is making a large swap partition on the
host, and creating a large tmpfs drive for images that will hold a disk.
These disk images are meant to be virtual swap files for the guests.
You give the guests those images as their secondary disks (say,
/dev/sdb) and use that as swap.  Note that being in tmpfs means they
will never hit disk, and you would not care unless you were
snapshotting or suspending your VMs.  Again, not tried by me.

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/
-- 
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.