Adaptación de la herramienta PMCTrack a entornos de producción
Loading...
Official URL
Full text at PDC
Publication date
2021
Authors
Advisors (or tutors)
Editors
Journal Title
Journal ISSN
Volume Title
Publisher
Citation
Abstract
PMCTrack es una herramienta de código abierto para Linux que permite la monitorización de diversos aspectos de las aplicaciones en tiempo de ejecución empleando contadores hardware u otros recursos hardware de monitorización, como sensores de temperatura o de consumo energético. Para ofrecer acceso a la información de monitorización al usuario final y al sistema operativo (SO), esta herramienta consta de componentes tanto de espacio de usuario como de kernel. Un aspecto diferencial de PMCTrack con respecto a otras herramientas es su sencilla interfaz de acceso a los datos de monitorización desde el kernel Linux. Esta interfaz, que es independiente de arquitectura, facilita la realización de optimizaciones en el SO, principalmente orientadas a la planificación de procesos y a la gestión de recursos.
A pesar de las numerosas ventajas que ofrece la versión más reciente de PMCTrack, el hecho de requerir un parche en el kernel Linux para funcionar, así como su integración aún parcial con el subsistema perf_events de Linux para algunos procesadores de Intel, hace que en la práctica su adopción resulte complicada en sistemas de producción, donde la inclusión de parches del núcleo no es siempre viable. El objetivo de este Trabajo Fin de Grado ha sido subsanar estas dos limitaciones. En particular, para la eliminación del parche del kernel, se ha realizado un estudio exhaustivo de los sistemas de trazado (tracing) de Linux y –haciendo uso de estos sistemas–, se ha procedido a incorporar la funcionalidad del parche de PMCTrack de forma muy eficiente desde un módulo cargable del kernel. Esto posibilita la completa eliminación de dicho parche. Asimismo, se ha ampliado sustancialmente la funcionalidad del backend de perf de PMCTrack (capa de integración con perf_events) para lograr el acceso a un mayor número de eventos de monitorización en muy diversas arquitecturas. Mediante un estudio experimental empleando benchmarks de SPEC CPU2006 y CPU2007, se demuestra que las nuevas características incorporadas en PMCTrack, que formarán parte de su nueva versión 2.0, no afectan al rendimiento ni la precisión de esta herramienta, y al mismo tiempo eliminan por completo las limitaciones anteriormente citadas.
PMCTrack is an open source tool for Linux that allows the monitoring of various aspects of applications at runtime using hardware counters or other hardware monitoring resources, such as temperature or power consumption sensors. To provide access to monitoring information to the end user and the operating system (OS), this tool consists of both user space and kernel components. A distinguishing feature of PMCTrack compared to other tools is its simple interface for accessing monitoring data from the Linux kernel. This interface, which is architecture-independent, makes it easy to perform OS optimizations, mainly oriented to process scheduling and resource management. Despite the many advantages offered by the latest version of PMCTrack, the fact that it requires a Linux kernel patch to work, as well as its still partial integration with the Linux perf_events subsystem for some Intel processors, makes its adoption complicated in practice on production systems, where the inclusion of kernel patches is not always feasible. The objective of this Final Degree Project has been to overcome these two limitations. In particular, for the removal of the kernel patch, an exhaustive study of Linux tracing systems has been carried out and by using these systems the functionality of the PMCTrack patch has been incorporated, in a very efficient way, into a loadable kernel module. This makes it possible to completely remove the patch. In addition, the functionality of PMCTrack’s perf backend (perf_events integration layer) has been substantially extended to provide access to a larger number of monitoring events in a wide variety of architectures. Through an experimental study using SPEC CPU2006 and CPU2007 benchmarks, it is proven that the new features incorporated in PMCTrack, which will be part of its new version 2.0, do not affect the performance and accuracy of this tool, and at the same time completely eliminate the aforementioned limitations.
PMCTrack is an open source tool for Linux that allows the monitoring of various aspects of applications at runtime using hardware counters or other hardware monitoring resources, such as temperature or power consumption sensors. To provide access to monitoring information to the end user and the operating system (OS), this tool consists of both user space and kernel components. A distinguishing feature of PMCTrack compared to other tools is its simple interface for accessing monitoring data from the Linux kernel. This interface, which is architecture-independent, makes it easy to perform OS optimizations, mainly oriented to process scheduling and resource management. Despite the many advantages offered by the latest version of PMCTrack, the fact that it requires a Linux kernel patch to work, as well as its still partial integration with the Linux perf_events subsystem for some Intel processors, makes its adoption complicated in practice on production systems, where the inclusion of kernel patches is not always feasible. The objective of this Final Degree Project has been to overcome these two limitations. In particular, for the removal of the kernel patch, an exhaustive study of Linux tracing systems has been carried out and by using these systems the functionality of the PMCTrack patch has been incorporated, in a very efficient way, into a loadable kernel module. This makes it possible to completely remove the patch. In addition, the functionality of PMCTrack’s perf backend (perf_events integration layer) has been substantially extended to provide access to a larger number of monitoring events in a wide variety of architectures. Through an experimental study using SPEC CPU2006 and CPU2007 benchmarks, it is proven that the new features incorporated in PMCTrack, which will be part of its new version 2.0, do not affect the performance and accuracy of this tool, and at the same time completely eliminate the aforementioned limitations.
Description
Trabajo de Fin de Grado en Ingeniería de Computadores, Facultad de Informática UCM, Departamento de Arquitectura de Computadores y Automática, Curso 2020/2021