Skip to contentSkip to conversation

urgent help needed :perf record and report showing inconsistent results

DISCUSSION Nitisha Jain 2 participants 4 messages Oct 23, 2013 – Oct 24, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

hi,

I am trying to find the overhead due to the kvm hypervisor when an IO intensive process is running on a virtual machine and the perf record/report are run on the host.( host has 12 cores, VM is pinned to a core)

I need to understand how to interpret the perf report in order to find the cpu utilization of various components. In order to do that, I ran simple tests on the host.

However, even if I run the exact same perf record command on the host repeatedly, the results are quite different in terms of the report size, no of samples and the total no of cycles shown in perf report.
The following commands were run in quick succession :

perf record -a -c 10000 -C 0 -o 1.data sleep 5
[ perf record: Woken up 3 times to write data ]
[ perf record: Captured and wrote 0.837 MB 1.data (~36559 samples) ]

perf report -i 1.data (shows Events :15k cycles at the top)

perf record -a -c 10000 -C 0 -o 1.data sleep 5
[ perf record: Woken up 20 times to write data ]
[ perf record: Captured and wrote 5.214 MB 1.data (~227824 samples) ]

perf report -i 1.data (shows Events :128k cycles at the top)

perf record -a -c 10000 -C 0 -o 1.data sleep 5
[ perf record: Woken up 3 times to write data ]
[ perf record: Captured and wrote 0.775 MB 1.data (~33867 samples) ]

perf report -i 1.data (shows Events :13k cycles at the top)

perf record -a -c 10000 -C 0 -o 1.data sleep 5
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.605 MB 1.data (~26442 samples) ]

perf report -i 1.data (shows Events :9k cycles at the top)

Why is there such disparity between the reports ?

If I need to compare any two perf reports, how can I do so with the total cycles being different on the 2 cases ?

Please assist me in this matter .

#1 lore raw
Quoted 5 lines · Nitisha Jain

hi,

I am trying to find the overhead due to the kvm hypervisor when an IO intensive process is running on a virtual machine and the perf record/report are run on the host.( host has 12 cores, VM is pinned to a core)

Have you tried 'perf kvm stat live'?

David

A message that is not in the archive (sent off-list or not yet received): CAJUy+oSrdAwiGVBZq-PPFB-U7gPzRwPCrFSucEyySCYqT+9v9g@mail.gmail.com

#3 lore raw
Quoted 8 lines · Nitisha Jain

I am not able to find 'perf kvm stat live' command , when I try, I get :

usage: perf kvm [<options>] {top|record|report|diff|buildid-list}

Is this subcommand still supported in the current version of perf ? if yes, can u please tell the exact syntax ?

You need perf code from 3.12.

David

#4 lore raw
Quoted 6 lines · David Ahern <dsahern <at> gmail.com> writes:
Quoted 4 lines · Nitisha Jain

I am not able to find 'perf kvm stat live' command , when I try, I get :

Quoted 10 lines
Quoted 4 lines

usage: perf kvm [<options>] {top|record|report|diff|buildid-list}

Is this subcommand still supported in the current version of perf ? if yes, can u please tell the exact syntax ?

You need perf code from 3.12.

David

Thanks sir, I will try out the kvm stat command.

Although I still need to understand how perf report is calculating the total no of cpu cycles and no of samples and why there is so much disparity between the results for the same perf command.
Kindly guide in this regard .