Triggering Performance Counters for Energy Efficiency Measurements

Performance evaluation of a system is often conducted through modeling. To achieve reliable models, a correct parameterization and validation is essential. As efficiency is a key factor to be expressed by complex performance evaluation models, experimental power measurements play a crucial role in modeling, model validation for performance evaluation. Consequently, correct instrumentation of the system under test (SUT) is important for achieving repeatable and reproducible power measurements.
For this reason, rating and measurement tools have been created to measure both power and performance for a single SUT. Yet, depending on workload, measuring a system’s energy efficiency may require additional hardware, such as external load or traffic generators that are capable of stressing the SUT to a desired load level. In addition, efficiency measurement typically requires external power meters. This increases time and effort setting up a testbed as controlling and instrumentation on external devices is often non-trivial.
A possible solution to simplify a testbed and produce reliable power measurements is the use of performance counters, integrated in modern hardware and operating systems. These performance counters give insight on hardware operations under certain loads. Generating counter events might therefore be suitable for reproducible power measurements by modeling workloads locally. Considering modern multi-threaded preemptive operating systems, these counters become difficult to interpret and reliably trigger due to scheduling, shared resources and other characteristics that often cannot be directly influenced. While existing tools like IntelPCM or Likwid can read performance counters, generating counter events is often not part of available programs.
This talk shares some of the experience gained in working with performance counters and approaches to trigger them. Problems and proposed solutions are described on how to generate performance counter events. We demonstrate these solutions by presenting measurement results for selected performance counters.