LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   KVM performance are pretty low. (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/kvm-performance-are-pretty-low-4175422900/)

CrAzYoNi 08-19-2012 11:32 AM

KVM performance are pretty low.
 
Dear all,
I bought a new PC (well I need to upgrade it soon).
I've installed Fedora 17 and using KVM I've installed Win7.

The performance of the guest OS are very low.
My hardware specs are as below:
- CPU: Intel i7 3770
- RAM: G. Skill 10-10-10-24 (Ares) 2x8GB
- Mainboard: Intel DH77EB
- Hard drive: Samsung F3 1TB

I'm using the default configuration of the KVM.
And I'm using Intel HD Graphics directly from the Mainboard (i didn't installed any drivers of Intel on Win\fedora).

Any ideas why the performance are low?
BTW, the guest OS gets 4GB of RAM and access to all 8 cores of the CPU.
And yes, both Guest & Host OS located on the same hard drive.

The performance are low on the I\O - installation of the guest OS took almost 2hrs from the HD!!
And also the graphics are low, the pointer ain't smooth at all.

Hope you have an ideas about how can I improve the performance.

Best regards,
Yoni D.

CrAzYoNi 08-19-2012 12:11 PM

While investigating the issue, I'm looking to know how does I'm running my guest OS if behind Qemu or KVM :\
Hope to find-out i'm using Qemu ATM, because I just understood its very slow.

dyasny 08-20-2012 08:18 AM

defaults are never optimized. You need to install your VM on a virtio disk and virtio network, then use spice and QXL for video. This will require virtio and qxl drivers to be slipped into the windows distribution of course.

BTW, giving a VM more cores doesn't make it faster

CrAzYoNi 08-20-2012 12:06 PM

Hey Dyasny, nice to see some more IL pplz here! :)
Thanks for the tip with VirtIO, my x-RHCE course instructor gave me this tip too a few hours ago - I will read about it today and tomorrow; tomorrow I will also try it.
The reason that I gave the guest OS more cores to use is in order to share the pressure of the tasks on all cores and not just all of them - I don't know how well KVM knows to manage it.

Thanks again! I will post an update tomorrow.
Best regards,
Yoni D.

dyasny 08-21-2012 08:13 AM

ok, to enhance those tips:
1. virtio is paravirtualized, meaning the guest device is working directly with the host device, and not via an emulated software based device. there are several virtio based devices available - a disk controller, network controller, COM controller etc. This will always give you better speeds, because there is way less overhead this way
2. KVM is probably the best system out there when it comes to effectively using VM cores, because a VM core is simply a process on the host, and the Linux kernel scheduler takes care of scheduling. Still, if you have too many processes scheduled, they might try to compete to CPU time, and at some point it can become quite cumbersome

PS: it's good to see Linux finally becoming popular in .il

Gerard Lally 08-21-2012 05:34 PM

Quote:

Originally Posted by CrAzYoNi (Post 4758354)
Dear all,
I bought a new PC (well I need to upgrade it soon).
I've installed Fedora 17 and using KVM I've installed Win7.

The performance of the guest OS are very low.
My hardware specs are as below:
- CPU: Intel i7 3770
- RAM: G. Skill 10-10-10-24 (Ares) 2x8GB
- Mainboard: Intel DH77EB
- Hard drive: Samsung F3 1TB

I'm using the default configuration of the KVM.
And I'm using Intel HD Graphics directly from the Mainboard (i didn't installed any drivers of Intel on Win\fedora).

Any ideas why the performance are low?

Did you load the kvm modules beforehand? If not, you end up using qemu without kvm acceleration.

Code:

# modprobe kvm
# modprobe kvm-intel

Make sure as well that virtualization processor extensions are enabled in BIOS.

CrAzYoNi 08-25-2012 10:23 AM

Dear Dyasny & Gezley,
Thanks for your replies.
Gezley - Both KVM & KVM-intel modules were already loaded, seems that this is the default for Fedora 17 configuration (Because I didn't changed it manually).
Dyasny - I've did configured both the storage device and the Network device to use VirtIO - and the performance increased indeed.

Though, the video performance are low - no 3D support, Windows cannot recognize the video adapter and the resolutions are.. hmmm not so good - I cannot set 1080p for example but can use some other resolutions. I've tried to install the latest QXL drivers from The alt.fedoraproject.org but I'm getting error that this driver is not signed.

Any suggestions how can I increase the video performance? or at least to add full 1080p resolution support (1920x1980)?

Thanks in advance.

CrAzYoNi 08-25-2012 11:20 AM

Update:
I've use some tool which I found over the internet to allow unsigned drivers to work on Windows OS - so now i'm getting my VM video adapter to support 1080p resolution, though no 3D performance yet.
Still looking for suggestions about it.

dyasny 08-25-2012 02:59 PM

Quote:

Originally Posted by CrAzYoNi (Post 4764009)
Update:
I've use some tool which I found over the internet to allow unsigned drivers to work on Windows OS - so now i'm getting my VM video adapter to support 1080p resolution, though no 3D performance yet.
Still looking for suggestions about it.

moved to spice, did you? That's what I would suggest.

Spice doesn't support directx yet, watch the updates on spice-space.org

CrAzYoNi 08-26-2012 03:51 PM

Dear Dyasny, I'm using Spice by default on all of my guest VM's (ATM I'm installing the 3rd VM :) ).
The options I got are VNC or Spice - and I know VNC is pretty low with performance so it was easy decision.

dyasny 08-27-2012 05:07 AM

Yes, but you also have to have qxl installed in the guests, and the VM must be running with qxl enabled

CrAzYoNi 08-27-2012 06:18 AM

I've installed the Qxl video card drivers - though I was needed to find a way to bypass windows protection - the Qxl drivers are not signed by MS.
Please note that all of the above is about guest VM running MS Win7.
When I tried the same for Windows 2008 R2, I couldn't install the Qxl drivers; I will look deeper into it later today or tomorrow.
Below is a link that can show you the status of my server ATM:
https://www.facebook.com/photo.php?f...4032.602857279


All times are GMT -5. The time now is 05:50 PM.