3

I use virtualization with QEMU to test software on different OSs and processor architectures.

I was annoyed by the fact that a guest often clogs one host core completely and stalls, while the other cores are idle. My assumption is that this is because qemu will not start native threads for parallel tasks in the guest. If that's true, what virtualization software handles this smarter? I'm looking for a solution that does not require the guest to be modified (so Xen is not an option).

I was looking at KVM, but have not yet found any definitive answer. I should say that I'm not sure if I have understood the SMP support correctly, does that do anything about how tasks are parallelized on the host?

I have not yet looked into VMWare at all.

1

5 Answers 5

1

My understanding of the way our virtual environment (VMWare) works is this:

You have the option of assigning dedicated CPUs to any VM. Assigning 2 dedicated CPUs would be the equivalent of a physical 2-core box like you have.

However, if you don't do that, then you assign a certain number of processor shares to each VM. So if you assign 100 shares to one, and 200 shares to another, the second machine has a doubly powerful CPU. But the actual cycles may be handled by any of the hosts cpus.

So building a machine with a single virtual CPU, and double the shares would increase your speed and power on the VM, without requiring your software to be configured for SMP.

0

Typically, virtualization software permits you to set the number of CPUs the VM can access and allows you to set a min/max cpu usage used for all CPUs. This is certainly true of Hyper-V and Virtual Server though I don't have experience with QEMU.

SMP support refers to the ability for the host to present a multiprocessor VM to the guest OS. If you want to allocate more of your host CPU resources to a guest, that is likely the route you'll need to take.

0

You may want to read this document CPU Resource Management from vmware.

Although it is from an ancient version of ESX1.5, the newer versions use the same technique, and even more so. Documentation for later versions is available here but doesn't seem to be googled

Abstract: VMware ESX Server provides dynamic control over both the execution rate and the processor assignment of each scheduled virtual machine. The scheduler performs automatic load balancing on multiprocessor systems.

0

You may wanna look into virtual box as well.

0

The documentation on QEMU is not really clear; using the "-smp <num of cores>" option allows you to emulate more than one CPU, but it is not clear if this is real smp across multiple host cores, or effectively "threads" bound to a single core.

VMware products do spread the load across multiple cores, but be careful about scheduling issues with busy guests which will impact overall performance. More info here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .