Server Fault is a question and answer site for system and network administrators. 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 have a standard (not modified) KVM+libvirtd installed on clean Centos 6 machine with 8G of RAM and 8 cores CPU.

When I am trying to install guest centos 6 using virt-manager it takes ages to finish installation. I gave 2 cores and 3 GB of RAM to it and I can see in performance tab that it uses all 3GB of RAM permanently.

Where is a problem?

share|improve this question
Using up all the RAM allocated for the VM is not a problem; see . A slow installation might be a problem, but if it is, you should focus on that instead of the irrelevant RAM issue. – Michael Hampton Dec 4 '13 at 19:20
What can you recommend regarding slow installation? – Alex Dec 4 '13 at 19:33
Check CPU bottlenecks, disk i/o bottlenecks, verify you don't have any unexpected processes eating up all your RAM, attach strace to the process to see where it's hanging.. the same things you would do to troubleshoot slow ______ (fill in the blank). – yoonix Dec 4 '13 at 20:59
Why is this titled "KVM consumes all RAM"? It sounds like it's using exactly as much RAM as you told it to use, and the issue is slow installation. – David Schwartz Dec 4 '13 at 22:42
provide some details - how is the VM set up, how is the underlying storage set up, what kind of hardware it is running on – dyasny Dec 5 '13 at 22:01

I had this issue with KVM (CentOS EL 6.4) so I ran a benchmark to find out what was happening. Turns out my guest VM was running only 15% as fast as the host (bare metal OS). I had checked the prerequisites of kvm and verified my Intel processor has the VT-x (vmx) [AMD calls it svm].

cat /proc/cpuinfo | grep vmx

Why then the slow performance?? Turns out that I needed to enable VT-x in the BIOS of the system (older machine circa 2006). To verify that this was the problem, I checked to see if kernel module kvm_intel was running:

lsmod | grep kvm

Turns out that it was not running with kvm_intel. When I had installed my virtual machine, libvirt defined the domain type as qemu. But this should be type kvm. You can check:

virsh edit your_vm_guest_domain

... check the line at the top ...

<domain type='qemu'>

That was libvirt telling me it didn't detect the kvm_intel presence on my system and defaulted to plain qemu emulation.

When I enabled the VT-x in the BIOS, I found that I could load the kvm_intel module and then changed the <domain type='kvm'>. I executed the same benchmark again and found virtually no difference in speed between the guest VM and the host OS.

share|improve this answer

The default disk cache mode is writethrough, which is very slow. Switch the disks to writeback mode and you will enjoy a very significant I/O performance boost.

Before someone complain about that: with relatively recent (CentOS 6+) libvirt/qemu/kvm versions, writeback disks are safe unless the guest OS does not support/activate write barriers (which are supported and enabled by any recent guest OS I think of).

Some more information can be found here and here

share|improve this answer

Your Answer


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.