Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have a 4 GB machine, I cannot have more than 4 VMs if each one requires 1 GB. True or false? Explain either answer

share|improve this question
add comment

4 Answers

False: some VM solutions support memory overcommit(ment). Whether or not it's a good idea is another matter. (Also depends on how strongly you mean "requires".)

share|improve this answer
1  
The virtual machine can use the hosts Virtual memory as well. –  Matt H Oct 26 '10 at 1:59
    
And probably will, if the host starts paging any of it to disk. If the memory is overcommitted, that's pretty likely. –  ssube Oct 26 '10 at 2:21
add comment

There's an interesting article on Memory Overcommitment and Virtualization at http://blog.gridcentriclabs.com/2010/08/virtualization-and-over-subscription.html if you're interested in the theory behind it

share|improve this answer
add comment

It also depends on the VM system you use.

For example, VMWare ESX / ESXi will happily do over committment. Xenserver makes no such claim (last I checked).

If you over commit on an ESX / ESXi box, its always better to load up several copies of the same OS, this allows better page merging. You wont get nearly such an ability to over commit if your guest operation systems are Windows, Linux and Solaris. If they are all windows (or linux, or solaris) then on those boxes, over-committing by 20% or more is unlikely to do much harm.

I'm not sure if WMWare Workstation or Player will do it. Certainly when I'm using VMware Player or workstation professionally, I find that trying to over commit will let the VMs run but the performance is horrible - mostly because of the host system paging. It's so bad I don't ever try any more.

So if using a host OS and a desktop virtualisation product, my inclination is to advise lots of RAM and don't try to over commit.

share|improve this answer
add comment

Actually, you need to make sure you have left enough memory for the host operating system too. Starting too many VMs can use all (or almost all) of the host's memory, which will lead to astonishingly poor performance. I once managed to leave only 256MB RAM for the host OS on my system, and it took almost half an hour to get one of the VMs to shut down again!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.