Questions about CMT event statistic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I'm testing cmt event of libvirt, and I have two questions. I will be very grateful if someone can give me some help.

Q1:"virsh domstats --perf" and linux perf tool has different result.

I have a guest with cmt event enabled, start guest and get perf statistic every 1s:
# while true; do virsh domstats rhel7.2-1030 --perf; sleep 1; done

In the meanwhile, I use perf tool to get the llc_occupancy of qemu-kvm process:
# pidof qemu-kvm
16779
# perf stat -a -e intel_cqm/llc_occupancy/ -I 1000 -p 16779 sleep 100


And I compare the output of the above two commands, and find that they're so different:
The output of "virsh domstats"        The output of "perf" tool                
  perf.cache=15753216                   49152        Bytes
  perf.cache=14499840                11526144        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=14499840                11599872        Bytes
  perf.cache=8380416                11649024        Bytes
  perf.cache=8380416                11649024        Bytes
  perf.cache=8380416                11821056        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11845632        Bytes
  perf.cache=8380416                11870208        Bytes
  perf.cache=8380416                11870208        Bytes
  perf.cache=8380416                11845632        Bytes

...                             ...

I don't know if it's appropriate to do this comparison, but I'm still curious why they get different results.


Q2:Disable&enable cmt at runtime, then "virsh domstats" will output perf.cache=0

# virsh perf rhel7.2-1030 --disable cmt

# virsh perf rhel7.2-1030 --enable cmt

# virsh domstats rhel7.2-1030 --perf
Domain: 'rhel7.2-1030'
  perf.cache=0

Watch the output for more than two minutes, it's 0 all the time:
# watch virsh domstats rhel7.2-1030 --perf
Every 2.0s: virsh domstats rhel7.2-1030 --perf                                                                                                                     Wed Apr 27 17:36:01 2016

Domain: 'rhel7.2-1030'
  perf.cache=0


BR,
Fangge Jin

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux