Autoperf is a tool for automated diagnosis of performance anomalies in multithreaded programs. It operates in two phases:
- Profiling: Collects hardware performance counters from annotated sections of a program by running it with performance representative inputs.
- Anomaly Detection: Creates a model of application performance behavior by training an Autoencoder network. It finds out the best performing network by training for input dataset(collected in profiling phase). AutoPerf uses the trained model for anomaly detection in future executions of the program.
More details about the design and implementatoin of AutoPerf can be found in this conference paper, which is accepted at NeurIPS'19 for publication.
- Profiling:
- Autoperf uses PAPI interface for performance counters. Extract and install from source (papi-5.5.1.tar.gz)
- Build profiler library:
- cd AutoPerf/proflier
- make
- Prepare candidate program:
- Annotate functions:
- add header :
#include "perfpoint.h"
- mark start :
perfpoint_START(marker_id)
- mark end :
perfpoint_END()
NOTE: use mark_id as parameter to uniquely identify code region
- add header :
- Link profiler library
libperfpoint.so
with candidate "program" or use LD_PRELOAD=/path/to/libperfpoint.so (example: Default.mk in tests dir)
- Annotate functions:
- Run program :
- create list of performance counter names in file named
COUNTERS
in binary path [ or copy the file Autoperf/profiler/scripts/COUNTERS] - copy Autoperf/profiler/scripts/run_profiler.py in banary path
- set
PERFPOINT_LIB_PATH="path/to/libperfpoint"
inrun_profiler.py
python run_profiler.py PATH/TO/OUTPUT/PROFILE_DATA PROGRAM_BINARY PROGRAM_ARGS [runID]
- NOTE: use optional
runID
to store multiple executions data in separate directories
- create list of performance counter names in file named
- Anomaly Detection:
- Requirements: Python 2.7+, keras library
cd AutoPerf/autoperf
- set
NUMBER_OF_COUNTERS
andNO_OF_HIDDEN_LAYER_TO_SEARCH
inconfigs.py
python autoperf.py PATH/TO/PROFILE_DATA_FOR_TRAINING PATH/TO/PROFILE_DATA_FOR_TEST PATH/TO/OUTPUT_DETECTION_RESULTS
- Output files:
- accuracy.out : Detection results
- network_training.log : Network configs + training error + validation error