Sampling-Based Phase Classification and Prediction for Multi-threaded Program Execution on Multi-core Architectures

Program executions are usually repetitive, hence, we can optimize program executions if we are able to identify the program's repetition pattern. If we can accurately classify program execution intervals into phases, and use such information to accurately predict the next phase at runtime, we will be able to apply suitable optimization on the subsequent intervals. Such runtime optimization opportunity not only exists in single-threaded programs but also in multithreaded programs In this paper, we propose a framework that collects code signature of each interval from individual threads of a multi-threaded parallel program, and classify them into phases at runtime. We then use the classification results to predict the next phase in an on-line fashion. In order to efficiently classify execution intervals on-line, we only keep a fixed number of representative data in a shared table for classification purpose. The classification is very efficient and uses less than 3K bytes of memory. We also propose a confidence table to improve the prediction rate. Our experiment results with the Spec OMP2001 and the PARSEC benchmark suites on an Intel Xeon multi-core show that our system can classify intervals into phases with high homogeneity, can predict the next phase with 65% accuracy without using confidence table and with 80% accuracy when confidence table is used.

[1]  Sally A. McKee,et al.  Dynamic program phase detection in distributed shared-memory multiprocessors , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[2]  Philip J. Fleming,et al.  How not to lie with statistics: the correct way to summarize benchmark results , 1986, CACM.

[3]  James E. Smith,et al.  Managing multi-configuration hardware via dynamic working set analysis , 2002, ISCA.

[4]  Margaret Martonosi,et al.  Live, Runtime Phase Monitoring and Prediction on Real Systems with Application to Dynamic Power Management , 2006, 2006 39th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO'06).

[5]  Brad Calder,et al.  Time Varying Behavior of Programs , 1999 .

[6]  Brad Calder,et al.  Phase tracking and prediction , 2003, ISCA '03.

[7]  Brad Calder,et al.  Transition phase classification and prediction , 2005, 11th International Symposium on High-Performance Computer Architecture.

[8]  Brad Calder,et al.  Detecting phases in parallel applications on shared memory architectures , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[9]  Kai Li,et al.  The PARSEC benchmark suite: Characterization and architectural implications , 2008, 2008 International Conference on Parallel Architectures and Compilation Techniques (PACT).

[10]  A.S. Dhodapkar,et al.  Dynamic microarchitecture adaptation via co-designed virtual machines , 2002, 2002 IEEE International Solid-State Circuits Conference. Digest of Technical Papers (Cat. No.02CH37315).

[11]  David J. Lilja,et al.  Dynamic Code Region (DCR) Based Program Phase Tracking and Prediction for Dynamic Optimizations , 2005, HiPEAC.

[12]  Rudolf Eigenmann,et al.  Large System Performance of SPEC OMP2001 Benchmarks , 2002, ISHPC.

[13]  Rajiv Kapoor,et al.  Pinpointing Representative Portions of Large Intel® Itanium® Programs with Dynamic Instrumentation , 2004, 37th International Symposium on Microarchitecture (MICRO-37'04).

[14]  Lieven Eeckhout,et al.  A Detailed Study on Phase Predictors , 2005, Euro-Par.

[15]  J. MacQueen Some methods for classification and analysis of multivariate observations , 1967 .