From: Avi Kivity <avi@redhat.com>
To: Chengjian Wen <wenchengjian@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Question about IPC statistics of vcpu thread
Date: Sun, 27 Nov 2011 12:25:35 +0200 [thread overview]
Message-ID: <4ED2101F.5030409@redhat.com> (raw)
In-Reply-To: <CAJZeP7w+1gTKzx9UTLF2YjVngbmBRes4H3RvQbo3=-55C2J3og@mail.gmail.com>
On 11/26/2011 05:09 AM, Chengjian Wen wrote:
> Hi All,
>
> I find a problem when I test the IPC of the kvm vcpu. My question is
> that when the thread is a vcpu, whether the instructions we get from
> perf stat includes
> the part spending on the time vcpu had enter vmx or else it only
> includes the time vm-exit.
It includes both. Linux 3.2 will allow the option of selecting one or
the other.
> I run NPB benchmark in the KVM which owns 4 vcpu and I use the
> following command to get the IPC information of vcpu thread.
> thread 3117 is the qemu-io thread, 3118,3119,3120,3121 are the vcpu
> thread. I am curious that the why the IPC is so slow when the guest is
> running a cpu-intensive application.
>
> Here below is some output of my tests.
>
> 1." perf stat -t 3121" run for 1 s , then get the following result.
> [root@wenfedora hcfs]# perf stat -t 3121
> ^C
> Performance counter stats for thread id '3121':
>
> 977.620697 task-clock-msecs # 0.999 CPUs
> 103 context-switches # 0.000 M/sec
> 0 CPU-migrations # 0.000 M/sec
> 0 page-faults # 0.000 M/sec
> 3005826152 cycles # 3074.634 M/sec
> 825271483 instructions # 0.275 IPC
> 140665441 branches # 143.885 M/sec
> 11731765 branch-misses # 8.340 %
> 256884 cache-references # 0.263 M/sec
> 3102 cache-misses # 0.003 M/sec
>
> 0.978720288 seconds time elapsed
Try
perf stat -e kvm:kvm_exit -e instructions -e cycles -e branches -e
branch-misses
to see if you have many exits. What's the output of the same test when
the benchmark is running on the host?
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2011-11-27 10:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 3:09 Question about IPC statistics of vcpu thread Chengjian Wen
2011-11-27 10:25 ` Avi Kivity [this message]
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=4ED2101F.5030409@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=wenchengjian@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.