QEMU-KVM and Perf Statistics

1.2k views Asked by At

I got some VMs running on an IBM Power8 using QEMU-KVM and I want to get statistics about LLC misses.

How can I do that in order to get statistics for each VM separately?

2

There are 2 answers

3
Breno Leitão On

You want to have these data from the whole VM or for one application running on a VM?

I tested it on a Ubuntu 15.04 image over QEMU-KVM, and I am able to get it using perf. In this case, I am getting the LLC stats regarding to a gzip operation. Take a look:

$ perf stat -e LLC-loads,LLC-load-misses gzip -9 /tmp/vmlinux 

 Performance counter stats for 'gzip -9 /tmp/vmlinux':

           263,653      LLC-loads                                                   
            10,753      LLC-load-misses           #    4.08% of all LL-cache hits   

       4.006553608 seconds time elapsed
0
Mauricio Faria de Oliveira On

For more detailed/explanatory content about some POWER events, refer to these documents:

  • Comprehensive PMU Event Reference – POWER7
  • Commonly Used Metrics for Performance Analysis – POWER7

The former is a more of a reference, and the latter is more of a tutorial (including a section about cache/memory hierarchy w/ hits/misses).

Those should be listed in: https://www.power.org/events/Power7