I'm referring to an old unanswered post of mine - viewtopic.php?f=1&t=48560
My host is Linux Ubuntu 64bit with 2x Intel Xeon E5410, so 8 cpu cores in total.
I did some trial and error experiments on various settings of Windows 7 guest machines. I wanted to achieve optimal performance. These are the machines I have now:
A, win7 32-bit sp1, light use, mostly remote desktop
Code: Select all
VBoxManage createvm --name "win7-zd" --ostype Windows7 --register
VBoxManage modifyvm "win7-zd" --memory 2048 --acpi on --ioapic on --cpus 1 --cpuexecutioncap 100 --pae on --hwvirtex on --hwvirtexexcl off --nestedpaging on --largepages on --vtxvpid on --nic1 bridged --nictype1 virtio --bridgeadapter1 eth1 --vrde on --vrdeport 5020 --vrdeauthtype null --vrdemulticon on
VBoxManage storagectl "win7-zd" --name "dvd" --add ide --controller PIIX4 --hostiocache on --bootable on
VBoxManage storagectl "win7-zd" --name hdd --add sata --controller IntelAhci --hostiocache off --bootable on
VBoxManage createhd --filename /root/VirtualBox\ VMs/win7-zd/win7-zd.vdi --size 20000
VBoxManage storageattach win7-zd --storagectl hdd --medium /root/VirtualBox\ VMs/win7-zd/win7-zd.vdi --type hdd --port 1Code: Select all
VBoxManage createvm --name "qi-win7" --ostype Windows7_64 --register
VBoxManage modifyvm "qi-win7" --memory 6144 --acpi on --ioapic on --cpus 8 --cpuexecutioncap 100 --pae on --hwvirtex on --hwvirtexexcl on --nestedpaging on --largepages on --vtxvpid on --nic1 bridged --nictype1 virtio --bridgeadapter1 eth1 --vrde on --vrdeport 5014 --vrdeauthtype null --vrdemulticon on
VBoxManage modifyvm qi-win7 --nic2 bridged --nictype2 virtio --bridgeadapter2 eth1
VBoxManage storagectl "qi-win7" --name "dvd" --add ide --controller PIIX4 --hostiocache on --bootable on
VBoxManage storagectl "qi-win7" --name hdd --add sata --controller IntelAhci --hostiocache off --bootable on
VBoxManage createhd --filename /root/VirtualBox\ VMs/qi-win7/qi-win7.vdi --size 40000
VBoxManage storageattach qi-win7 --storagectl hdd --medium /root/VirtualBox\ VMs/qi-win7/qi-win7.vdi --type hdd --port 1
- on machine A, turning on "ioapic", I didn't notice any performance impact. BUT, assigning full 8 cpus hurts performance a lot. In hosts "top" command, I could see this guest is consuming 150% of host cpu when Idle (it could easily mean 1,5 core). Just logging into rdp session in this machine was like 40 seconds, compared to 5-7 seconds when only 1 cpu is assigned. That's a no-brainer, assigning 8 cores to this VM is a really bad idea.
- still on A, I've tried to assign 2 cpus, login to machine is fast and responsive, similar to 1 cpu (5-7 seconds). When guest is idle, it takes about 15-20% of one cpu on host.
- still on A, back to 1 cpu, disabled io-apic, machine back to normal, consumes about 7% of host cpu when idle
- on machine B, I need 8gb or ram, thus I need to have ioapic enabled. I've assigned 8 cores, because I really need to max performance here. I even tried to run Prime95 FFT test, which really made host working almost at full speed, I've used like 95% of each core in average, that's good. I won't post the results, my conditions are far from clean OS. When guest is idle, it uses ~20-25% of 1 hosts cpu, which is much better than 140% on the machine A with the same settings. I wonder what's wrong in there.
- virtio network interface... I have to prove it, but I have a strong feeling that there is a problem with virtio, when more VMs have virtio interface, network is running much much slower
There is a warning in manual that if ioapic is enabled, it will introduce some overhead for guest machine virtualization. From my experience - turning it on or off didn't have a noticeable effect on performance. Manual also claims better performance of kvm-based virtio network interface. I went for it from start, didn't test the others yet.
I didn't have a time to do a serious performance tests in guests to make a nice comparison, I just need to have it working now, but I guess these subjective observations could be of help to anyone wondering about how to setup the win7 guest.
My questions to more experienced - what about other virtualization solutions (vmware/kvm)? Are they capable of handling more cpus per guest VMs better?
One note - windows as a VM in general sucks terribly in my eyes, so I don't blame virtualbox stack, not yet
I want machine B to use almost full potential of my host and now it can use only 1/8. That's a bummer.