1

I have Centos 6 with qemu-kvm version:

qemu-kvm.x86_64         2:0.12.1.2-2.448.el6_6.4

On Dell Precision with 2x Xeon 5110

When I run VM qemu-kvm process take 100% of CPU and starting Windows on VM take long time. I don't know why. Anyone can help?

My VM config:

<domain type='qemu'>
  <name>window7</name>
  <uuid>0f606bdd-735f-d4fd-ac1d-ec37b4814d30</uuid>
  <memory unit='KiB'>1433600</memory>
  <currentMemory unit='KiB'>1433600</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.6.0'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>core2duo</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='dca'/>
    <feature policy='require' name='lahf_lm'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='cx16'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='acpi'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/home/win7.img'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/pl_windows_7_with_sp1_x86_dvd_u_12032015.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='scsi' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:bd:a9:51'/>
      <source network='default'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='vga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
Dariusz
  • 11
  • 2

2 Answers2

4

Here is a serious problem:

<domain type='qemu'>

This should appear as:

<domain type='kvm'>

If this is set to qemu, then qemu will run the machine without any sort of hardware virtualization support. Without this option set, qemu will not be told to enable KVM hardware acceleration. This is fine for, e.g. emulating non-Intel processors, but it is always much slower than using the hardware acceleration provided by kvm.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
0

The bad news

You are running a somewhat aged system. Your CPU is 6 years - or 9 generations - old and even at that time was the cheapest entry level model of it's series.

Even with virtualization extensions (VT-x) enabled, I fear that your system will still be somewhat slow. That's because the first generation of virtualization instructions supported by your processor don't have a really huge performance impact anyway. The performance gain in using hardware features mostly came with the Nehalem CPU architecture (4 generations later) and the VT-x EPT instructions. So while it's generally favorable to use KVM over Qemu for the sake of hardware accelaration, I don't think you'll really gain a lot of performance switching to any of the other hypervisors.

The good news

As you are running an pretty old system the prices for spare & upgrade parts have basically reached their bottom.

An decent upgrade for your Xeon 5110 is for example the Xeon 5160 (1,6 vs 3 Ghz). It's the fastest model of the Xeon 5100 series and sells for eBay at 2$. Matching memory upgrades (DDR2 FB-DIMM) for this processors are also dirt-cheap.

Depending on the revision of your Precision (it will work on second generation 490 and the T5400) you might even be able to run the first generation Quadcores (Xeon 5300 series) - but the 5160 is a safe upgrade in any case IMHO.

Disclaimer

You should be aware that even with upgraded processors the system is still no rocket, but you should be able to see a 100% performance improvement over your current situation for almost no money.

I'm running a similiar rig in the moment (with dual 3 Ghz Xeon 5160 + 12 GB DDR2) using VirtualBox to run the free modern.ie Windows images ontop of Ubuntu 12.04. It's pretty decent/useable, but very far from being "fast". I don't need it that often so that's ok for me.

s1lv3r
  • 1,155
  • 1
  • 14
  • 24