Page 1 of 1

VM with more cores than available on host

Posted: 9. Jul 2011, 03:25
by arend
Hi,

I want to set up a VM for Ubuntu on a Windows and Mac host that emulates four cores while only two 'physical' cores are available on the host system (the GUI 'allows' for that but advises against it). I want to do this to setup a VM for a parallel programming class to build, run and debug a relatively simple parallel application and am therefore not too concerned about performance, as long as a debugger runs well.

I have seen posts that discourage this and can see how this can result in sub-optimal performance. Besides performance ... are there any stability issues associated with the approach? Is there a risk of race conditions that would cause a parallel application to 'lock up'.

Thank you in advance for any info.

Arend

Re: VM with more cores than available on host

Posted: 9. Jul 2011, 13:14
by Sasquatch
as long as a debugger runs well.
Well, a debugger needs plenty of resources to run well. Since you're overcommitting your hardware, you're using more resources than you have available so the debugger might not work at all.
are there any stability issues associated with the approach? Is there a risk of race conditions that would cause a parallel application to 'lock up'.
You bet there are. Stability is the first thing that goes out the window when you're overcommitting your system. The parallel application won't only lock up, the whole system could, and probably would. That's why it's not advised to give all cores to the Guest. Give even more than the available cores is asking for a system crash eventually. Try to fill a bucket with 20 liters of water when it can only hold 10. It will overflow.