Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running an ubuntu virtual-machine on a 12.04 ubuntu server. Unfortunately the machine is extremly slow (just htop consumes 15%), even though having 8 cores etc.

  • Do you know a way to find the virtual machines / machines bottleneck? Memory, network bandwidth, disk reading etc.?

  • Do you see any mistake in my configuration?

I use qemu version 1.0.

My configuration file:

<domain type='qemu'>
<name>vm</name>
<memory>10485760</memory>
<currentMemory>8388608</currentMemory>
<vcpu>8</vcpu>
<os>
  <type arch='x86_64' machine='pc-1.0'>hvm</type>
  <boot dev='hd'/>
  <bootmenu enable='no'/>
</os>
  <features>
    <acpi/>
    <apic/>
  </features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
  <emulator>/usr/bin/qemu-system-x86_64</emulator>

  <disk type='file' device='disk'>
    <driver name='qemu' type='qcow2' cache='none'/>
    <source file='/vm//drives/root.qcow2'/>
    <target dev='vda' bus='virtio'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
  </disk>

  <controller type='ide' index='0'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
  </controller>

<interface type='bridge'>
  <mac address='a0:a0:a0:a0'/>
  <source bridge='virbr0'/>
  <model type='rtl8139'/>
  <bandwidth>
  </bandwidth>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
  <input type='tablet' bus='usb'/>
  <input type='mouse' bus='ps2'/>
  <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  <video>
    <model type='cirrus' 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='0x05' function='0x0'/>
  </memballoon>
  </devices>
</domain>
share|improve this question

1 Answer 1

Emulating cores will make things slower, not faster. Go with one unless you need several to test some applications. Your memory is set at 10 MB, which is hardly enough for anything.

I have never used XML files for configuration, but some good command line options include -m 1024 -smp 1. A gig of memory should be enough for Windows XP, although you can go as low as 256. Also -smp higher than 1 causes the system to be slower in my experience.

Most important thing is to load KVM modules in the kernel. Without those, or if your processor does not support virtualization, performance will be poor.

Apart from that, having fast hard drives is very important. Personally I've had good results with a couple of 10k rpm drives in raid 0, but I imagine any SSD will do the trick as well. Using only a standard consumer grade hard drive will be slow, no matter what brand or SATA bandwidth.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.