I am novice to kvm/qemu, perhaps you can explain something to me.
I pass-through sata controller with fakeraid. It works, but I am getting strange results during performance testing:
A. Host Windows, 6 cores (no HT, turbo boost off): 6:23 (+- 10 secs)
B. Host Windows, 1 CPU core (other are turned off in BIOS): 7:13 (+-10 secs)
C. Host 1 core, Guest Windows 1 core: 7:15 - same as B, no degradation
D. Host 6 cores, Guest Windows 1 core: 7:57
E. Host 6 cores, Guest Windows 4 cores: 8:17
Perhaps I am doing something very wrong, D->E looks very surprising to me, and C->D is just unbelievable. I am adding cores and it works worth. How can it be?
1. What is correct way of passing CPU cores to VM?
2. Can I assign CPU core solely to VM to avoid cache resets and context switching to Host?
3. Also I am unsure about HT. When I specify "cores=2", is there any guaranty that whole core with both HT parts is passed to VM? Or it can be mix of two real cores with separate caches?
4. Any other comment on qemu command line?
I am using Ubuntu 14.10, Qemu 2.1.95, Windows 2012R2
uname -a Linux meta 3.16.0-28-generic #37-Ubuntu SMP Mon Dec 8 17:15:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Hardware is: i7 5930K, AsRock X99 Professional
Here is my qemu command line:
qemu-system-x86_64 -machine type=pc -nodefaults -m 16G -enable-kvm \
-cpu host -smp 4,sockets=1,cores=4,threads=1 \
-rtc base=localtime,clock=host \
-bios /home/oleg/seabios175.bin \
-hda /home/oleg/windows.img \
-device vfio-pci,host=00:1f.0,addr=1f.0,multifunction=on \
-device vfio-pci,host=00:1f.2,addr=1f.2,romfile=/home/oleg/8086-2822_v22.214.171.1244_patched.bin \
-device vfio-pci,host=00:1f.3,addr=1f.3 \