From: Gregory Esnaud <Gregory.ESNAUD@exfo.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: RE: [Newbie question] Why usage of CPU inside VM and outside VM is different
Date: Tue, 7 Jan 2020 17:32:55 +0000 [thread overview]
Message-ID: <fc4a7dfc9d344facaed8d34adcff3fc4@exfo.com> (raw)
In-Reply-To: <a8fb7ace-f52e-3a36-1c53-1db9468404e6@redhat.com>
Hi Paolo,
Thanks for your quick answer.
Are you using only 2 CPUs at 100%, or are you using 9 CPUs at a total of 200%?
Inside the VM, a top command show that we are using 2 CPU @ 100%: https://framadrop.org/r/gNf3erJVf6#t2HLIpzPHGtxHzHeLrnGGjsRSZZpmv9HPVZt/LIIP8s=
From the hypervisor (ie, *outside* the vm), a top command show that the VM consuming 9 cpu: https://framadrop.org/r/-FmrBhMGX5#q/6aZ8Fq2Mnuzz3+6F/pa83U+jzPox1hd984tw7DkuA=
So, if I'm understanding you correctly, an parameter of kernel of our VM is idel=poll that we should change?
Thanks again,
-----Message d'origine-----
De : Paolo Bonzini <pbonzini@redhat.com>
Envoyé : mardi 7 janvier 2020 17:59
À : Gregory Esnaud <Gregory.ESNAUD@exfo.com>; kvm@vger.kernel.org
Objet : Re: [Newbie question] Why usage of CPU inside VM and outside VM is different
On 07/01/20 16:57, Gregory Esnaud wrote:
>
> From an hypervisor (via top command) point of view our VM is consuming
> 9 CPU (900%). This was reported by our platform provider.
> From a VM point of view we are consuming only 2 CPU (200%), with a top
> also.
>
> Our provider claim us to explain why we are consuming so much CPU.
> But we cannot troubleshoot the infra as it's not our responsibility.
> From our point of view, everything is ok.
Are you using only 2 CPUs at 100%, or are you using 9 CPUs at a total of 200%? If the former, it is possible that you are using something like idle=poll, so the machine _is_ idle but still consuming 100% host CPU.
This is something that you should know, however.
If the latter, the host is probably doing a little bit of busy waiting to improve your performance. The provider can disable it using the
kvm.halt_poll_ns=0 module parameter and there is nothing that you can do about it. But it is unlikely that it causes the utilization to jump so much.
Paolo
next prev parent reply other threads:[~2020-01-07 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 15:57 [Newbie question] Why usage of CPU inside VM and outside VM is different Gregory Esnaud
2020-01-07 16:58 ` Paolo Bonzini
2020-01-07 17:32 ` Gregory Esnaud [this message]
2020-01-07 17:36 ` Paolo Bonzini
2020-01-07 17:37 ` Gregory Esnaud
2020-01-07 18:18 ` Gregory Esnaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc4a7dfc9d344facaed8d34adcff3fc4@exfo.com \
--to=gregory.esnaud@exfo.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox