Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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'>
  <type arch='x86_64' machine='pc-1.0'>hvm</type>
  <boot dev='hd'/>
  <bootmenu enable='no'/>
<clock offset='utc'/>

  <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'/>

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

<interface type='bridge'>
  <mac address='a0:a0:a0:a0'/>
  <source bridge='virbr0'/>
  <model type='rtl8139'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
  <input type='tablet' bus='usb'/>
  <input type='mouse' bus='ps2'/>
  <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
    <model type='cirrus' vram='9216' heads='1'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
  <memballoon model='virtio'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
share|improve this question
up vote 3 down vote accepted

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .