Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Host is Ubuntu 10.04 Server. 8 physical cores. Guest is Ubuntu 12.04; its allocated two CPU. I have other VMs, but the last few days I've run only this one guest.

Top inside the guest reports load from .05 - .20. Host sees this one kvm process 80-120% CPU, and maintains a total load of around 1-1.2. Host has no other workload than hosting guests.

This is not a problem with ksmd though I did have that problem and disabled ksmd after playing around with different values to no real satisfaction with the performance. Otherwise, the KVM settings are the default installed by the Ubuntu packages.

I installed this server fairly recently, and I have probably had this problem the entire time. At least, since I started running any regular workload on the guest.

Ideas?

share|improve this question
    
I'm seeing this too, on a totally different platform with KVM. My speculation is that this is caused by the virtualization overhead: considering the definition of the load, it might mean that. Wild speculation only, so that's why I just comment. :) –  Craig May 3 '12 at 0:15
    
500% overhead would be a bit more than advertised :) This did lead me to try an experiment though, to run another VM cloned from the first and running the same workload. It also advertised way too much usage with kvm process in host, though the total load increased only to around 1.6. –  Jeremy May 3 '12 at 1:37
    
@Craig I'd be curious to know if you are using the virtio disk driver, given my experience I mention in the answer below –  Jeremy May 25 '12 at 0:58
    
Yes, I'm using virtio. –  Craig Sep 25 '12 at 23:36

2 Answers 2

up vote 1 down vote accepted

It turns out that the guest was under-reporting its CPU usage. I ran this same workload on another guest entirely and it used CPU resources at about the same level as my KVM host was reporting. This was not an apples to apples comparisan but it was a meaningful result.

Then, I had my real breakthrough. I noticed that, for this one guest I was mistakenly using the virtual "SCSI" controller. I changed it to Virtio and two things happened: host CPU usage went down a little bit, and the guest CPU went up - it reported almost exactly the same as the host, like we'd expect.

share|improve this answer

If it doesn't show in the guest but the VM process on the host is using the CPU, you know it's overhead. I do wonder if it might be spending all that time servicing hardware interrupts on behalf of the guest by polling or something? Either that or you've hit a bug.

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.