4

I interested on measuring CPU cache-misses parameter and came across this tool called perf. I followed the wiki and able to get the cache-misses when this command is run on physical machine

[root@supermicro ~]# perf stat -e cache-misses dd if=/dev/zero of=/dev/null count=1000000          1000000+0 records in
1000000+0 records out
512000000 bytes (512 MB) copied, 0.539799 s, 949 MB/s

Performance counter stats for 'dd if=/dev/zero of=/dev/null count=1000000':

            55,435 cache-misses

       0.540932058 seconds time elapsed

When run on Linux VM that sit on VMware ESX machine, i got 0 cache-misses

[root@cw-centos62 fioFiles]# perf stat -e cache-misses dd if=/dev/zero of=/dev/null count=1000000
1000000+0 records in
1000000+0 records out
512000000 bytes (512 MB) copied, 0.593885 s, 862 MB/s

 Performance counter stats for 'dd if=/dev/zero of=/dev/null count=1000000':

                 0 cache-misses

       0.595547968 seconds time elapsed

Is this normal? If yes, is there any other way to get the cache-misses information for Linux VM that sit on VMware ESX?

Cw

Hennes
  • 65,804
  • 7
  • 115
  • 169
cheng wee
  • 143

1 Answers1

2

This counter and some others are not available in VMWare virtual machines.

Reference: Performance applications that use Hardware Performance Monitoring Counters do not display information correctly (2015931)

Some of the latest VMWare products do have an option to enable HW PMC however. Lot of caveats and limitations.

Using Virtual CPU Performance Monitoring Counters (2030221)

Brian
  • 9,034