Slow KVM Virtual Machine Performance Solved - Choose the right architecture with the CPU flag

I am running a 64-bit host and was running a 32-bit XP guest which was crawling no matter what I was doing with it,in fact it frequently used 100% CPU power while having no real work load.  I experienced with this other guests and wondered why KVM was slow compared to say Xen or Virtualbox.

This is because you need to use the "-cpu" flag.

For a full list of options run:

/usr/libexec/qemu-kvm -cpu \?

x86           qemu64
x86           qemu32
x86         pentium3

The option you need to pass is either "-cpu qemu64" or "-cpu qemu32".  Obviously qemu64 is for 64bit guests and qemu32 is for 32bit guests.

Make sure you specify this or your guest will be extremely slow since it will be emulating the architecture and won't give you native performance if you choose the wrong architecture. 

Also note that if you don't specify the -cpu flag it defaults to your host's architecture (eg. 64bit Centos or 32bit Centos).

So again, the solution is to use the -cpu flag and make sure you specify the correct architecture for the guest.


Tags:

kvm, virtual, architecture, cpu, flagi, xp, frequently, xen, virtualbox, quot, usr, libexec, qemu, pentium, specify, emulating, native, defaults, eg, centos,

Latest Articles

  • Linux Ubuntu Cannot Print Large Images
  • Cannot Print PDF Solution and Howto Resize
  • Linux Console Login Screen TTY Change Message
  • Apache Cannot Start Listening Already on 0.0.0.0
  • MySQL Bash Query to pipe input directly without using heredoc trick
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution
  • Debian Ubuntu Mint rc-local service startup error solution rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error
  • MySQL Cheatsheet Guide and Tutorial
  • bash script kill whois or other command that is running for too long
  • Linux tftp listens on all interfaces and IPs by DEFAULT Security Risk Hole Solution
  • python import docx error
  • Cisco Unified Communications Manager Express Cheatsheet CUCME CME
  • Linux Ubuntu Debian Missing privilege separation directory: /var/run/sshd
  • bash how to count the number of columns or words in a line
  • bash if statement how to test program output without assigning to variable
  • RTNETLINK answers: Network is unreachable
  • Centos 7 how to save iptables rules like Centos 6
  • nfs tuning maximum amount of connections
  • qemu-kvm error "Could not initialize SDL(No available video device) - exiting"
  • Centos 7 tftpd will not work with selinux enabled