Overhead Analysis of Performance Counter Measurements

Thomas Röhl, Jan Treibig, Georg Hager, Gerhard Wellein · 2014

LIKWID is a set of performance-related command line tools targeting X86 processors. Besides affinity-related tools it also includes likwid-perfctr, which allows to count hardware performance events. LIKWID builds upon the Linux msr kernel module, which allows to access model-specific registers (MSRs) via a device file interface. In addition to a set of convenient functional features such as a logical thread group syntax and pre-configured performance groups, likwid-perfctr offers a lightweight and low-overhead implementation. A simple 'start/stop marker API' supports measurements without introducing additional interrupts. Using the API the user can instrument code regions to be monitored individually. This is the only situation where overhead matters, since the marker routines might influence the runtime behavior of a code. As the regions are allowed to overlap in any way, this overhead also influences the measurements themselves. This paper investigates the runtime contributions comprising the LIKWID marker API overhead on several X86 processors. The overhead is compared with the PAPI instrumentation, which builds on the higher-level perf kernel interface. Finally, possible improvements to reduce the overhead are discussed.

Read the paper · More papers on PaperTik