Program Behavior Prediction Using a Statistical Metric Model IBM Research Yorktown Heights, NY

Canturk Isci

IBM Research Hawthorne, NY

Alper Buyuktosunoglu

[email protected]

[email protected]

[email protected]

Ruhi Sarikaya

ABSTRACT Adaptive computing systems rely on predictions of program behavior to understand and respond to the dynamically varying application characteristics. This study describes an accurate statistical workload metric modeling scheme for predicting program phases. Our evaluations demonstrate the superior performance of this predictor over existing predictors on a wide range of benchmarks. This prediction accuracy lends itself to improved power-performance trade-offs when applied to dynamic power management. Categories and Subject Descriptors: C.4 [Performance of Systems]: Modeling techniques General Terms: Management, Measurement, Performance

IBM Research Yorktown Heights, NY

History Size N−1

History

Next Sample

s1

s2

s3

s4

s1

s2

s3

s5

s2

s3

s4

s3

s4

Probability P(s4 | s3,s2,s1)

P(s4 | s3,s2)

N−2

s4

P(s4 | s3)

P(s4) P(s3)

0

P(s2) P(s1)

1. INTRODUCTION Today’s adaptive computing systems heavily rely on accurate predictions of changes in application behavior to proactively manage system adaptations. Prior work proposed such predictors based on simple pattern history tables [3], recent program flow behavior [6], statistics over recent performance characteristics [1] and model based parametric predictors [5]. These predictors have shortcomings due to their deficiency in predicting global long range patterns, and their inability to model patterns of varying length. In this work, we propose a new prediction technique based on statistical metric modeling that overcomes these limitations. This predictor tracks the probabilities of variable-length metric sequences. These probabilities are used to predict the most likely future behavior given the history pattern. This predictor has the ability to model patterns of different length and it can effectively model long term patterns. A comprehensive set of experiments demonstrates the effectiveness of this approach in comparison to the previously proposed predictors. We demonstrate the application of this predictor to dynamic power management, leading to better powerperformance trade-offs compared to the existing approaches.

2. METRIC MODELING PREDICTOR Our prediction approach is inspired from natural language processing, where we treat the workload metric samples as words and build a language model for each workload. Since the performance metrics are real numbers, we quantize them into a set of discrete sets, called “quantization bins”. Our intuition is that, like in natural languages, we can treat modeling workload behavior as a language modeling problem. There is commonly an underlying structure in workload execution as also reflected in performance metrics, and our modeling approach can reveal this structure. Copyright is held by the author/owner(s). SIGMETRICS’10, June 14–18, 2010, New York, New York, USA. ACM 978-1-4503-0038-4/10/06.

Figure 1: Model with back-off for n = 4. The statistical metric model is a conditional distribution on the identity of the ith sample in a metric sequence, given the identities of all previous samples. We make a computationally convenient approximation that a sample depends only on the previous n samples, where n depends on the amount of available data to estimate the model parameters. Going back to natural language modeling analogy, in general, what word we will speak next, depends more on the most recent previous n words than the words we have spoken a while ago. Our metric model is based on a class of Markov models, which is known as, the n-gram models [4]. Here n refers to the maximum length of the finite sequence of the metric samples. The probability of the nth sample is conditioned on the previous n − 1 samples. The metric model of order n = 4 is shown in Figure 1. The model has two sets of entries: the finite sequences and the associated probabilities with each sequence. The model contains sequences of length 1 to n where the last sample in each sequence is the output given the remaining n−1 history samples. For example, the first entry has the (s1 , s2 , s3 ) as the history for the next sample s4 with the probability P (s4 |s3 , s2 , s1 ). The models of lower order m (1 ≤ m ≤ n), increase the likelihood of finding a matching subsequence for a given finite sequence. The model is a probability distribution, P (s), over L samples S = s1 , s2 , ..., sL , that attempts to reflect the frequency with which each finite sequence s = s1 , s2 , ..., sl (l < L) occurs during workload execution. l Y P (s) = P (si |si−1 , si−2 , ...., s1 ) (1) i=1

The probability of a string P (s) is expressed as the product of the probabilities of the samples that compose the sequence, with each sample probability is conditional on the identity of the last n−1 samples. Without loss of generality,

wupwise

vpr_route

vpr_place

vortex_bendian3

vortex_bendian2

vortex_bendian1

swim

twolf_ref

sixtrack_inp

parser_ref

perlbmk_diffmail

mesa

mgrid

lucas

mcf_inp

gzip_source

gzip_random

gzip_log

gzip_program

gcc_scilab

SMM-Global

gzip_graphic

gcc_integrate

gcc_200

gcc_expr

Table-1024

gcc_166

galgel

gap_ref

fma3d

facerec_ref

crafty

equake

bzip2_source

bzip2_program

art_ref2

bzip2_graphic

apsi

art_ref1

applu

LastValue

ammp

Normalized Prediction Error

18% 16% 14% 12% 10% 8% 6% 4% 2% 0%

Figure 2: Prediction accuracy of our predictor, last-value and table-based predictors. we can express the probability of a s, P (s) as: P (s) =

l Y i=1

P (si |si−1 1 ) ≈

l Y

P (si |si−1 i−n+1 )

(2)

i−1

sji

denotes samples si , ..., sj . In order to simplify the where description and formulation of the the metric model, we consider the case n = 2. The extension of formulation and results to higher order models are trivial. By setting n = 2, we make the approximation that the probability of a sample only depends on the identity of the immediately preceding sample, hence we can approximate P (s) as: P (s) =

l Y i=1

P (si |si−1 ), where P (si |si−1 ) =

C(si−1 , si ) (3) C(si−1 )

where C(x) denotes the number of times the sequence x occurs in the metric. This is called the maximum likelihood (ML) estimate for P (si |si−1 ). In addition to ML probability estimates, we also apply additional “smoothing” to the relative frequencies to modify the conditional distributions away from pure relative frequency estimates in order to compensate for data sparsity.

3. EXPERIMENTAL EVALUATION We evaluate our predictor with the SPEC CPU2000 suite running on an IBM POWER4 system. We use hardware performance counters to collect data for prediction. Our predictor performs predictions at 10 ms time scales. The overall computational overhead of our predictor is constrained to be less than a thousand multiply and divide operations. This translates to compute time overheads on the order of microseconds. Thus, the proposed scheme can be implemented within the operating system software in context switch time granularities with negligible performance impact. We run an extensive set of experiments to evaluate our predictor in comparison to two existing prediction schemes, namely table-based [2] and last-value predictors. The tablebased predictor tracks a fixed length of most recently observed characteristics. The predictions for future behavior is deterministically encoded into a table, based on prior observed patterns. Last-value predictor assumes that the next metric sample is the same as the last observed sample. Figure 2 shows a comparison of last value, table based and our predictor for a model order n = 8 across all SPEC CPU2000 benchmarks. Our metric modeling based predictor improves prediction accuracy by 19% and 36% compared to the table based and last-value predictors. This improvement is even further emphasized for highly-varying applications, with 43% and 63% relative reductions in prediction errors over the existing approaches. Last, we explore the application of our prediction approach to dynamic power management. We predict memory

access rates of applications at runtime using metric modeling, and use the predicted memory access behavior to control dynamic voltage and frequency scaling (DVFS). We use memory access rates as the main differentiator for categorizing execution into different bins. In our evaluation system, we consider eight bins, corresponding to eight DVFS states. That is, when a predictor predicts the next application phase as bini the processor is proactively set to DVFS setting i. Similar to the prior experiment, we continuously predict application behavior at fixed sampling intervals. Based on the predicted execution behavior, i.e., memory access rate, we set the corresponding DVFS state for the following period. Then, at the end of this period we observe the achieved power savings and the associated performance degradation based on the actual execution behavior in this past interval. While our predictor achieves slightly lower power savings compared to the other predictors, it significantly reduces the performance degradation impact of such proactive power management, with 34% and 19% improvements compared to the last-value and the table-based predictors respectively.

4.

CONCLUSIONS

We described a predictor based on a probabilistic model that learns application characteristics at runtime and captures long term, dominant application behavior. The proposed approach has four main strengths. First, it models long term global patterns in application behavior. Second, the predictor can accommodate variable-length patterns. Third, it is resilient to small fluctuations in the observed patterns. Last, the metric model has the ability to adapt itself; as it learns more it predicts better. The results show that the our predictor reduces prediction errors by up to 10X and 3X compared to the last value and table based predictors respectively, with an average improvement of more than 60% and 40% for highly varying benchmarks. We also show the application of this prediction to dynamic power management, where higher prediction accuracies of our approach lends itself to superior power-performance tradeoffs compared to the existing approaches.

5.

REFERENCES

[1] E. Duesterwald, et al. Characterizing and Predicting Program Behavior and its Variability. PACT, 2003. [2] C. Isci, et al. Live, Runtime Phase Monitoring and Prediction on Real Systems with Application to Dynamic Power Management. MICRO, 2006. [3] C. Isci, et al. Long-term Workload Phases: Duration Predictions and Applications to DVFS. IEEE Micro, 2005. [4] F. Jelinek et al. Interpolated Estimation of Markov Source Parameters from Sparse Data Pattern Recognition in Practice, E.S. Gelsema and L. N. Kanal , 1980. [5] R. Sarikaya, et al. A Unified Prediction Method for Predicting Program Behavior. IEEE Trans. on Computers, 2010. [6] T. Sherwood, et al. Phase Tracking and Prediction International Symposium on Computer Architecture, 2003.

Program Behavior Prediction Using a Statistical Metric ... - Canturk Isci

Jun 14, 2010 - ABSTRACT. Adaptive computing systems rely on predictions of program ... rate predictions of changes in application behavior to proac- tively manage system ..... [2] C. Isci, et al. Live, Runtime Phase Monitoring and Prediction.

87KB Sizes 0 Downloads 152 Views

Recommend Documents

Program Behavior Prediction Using a Statistical Metric ... - Canturk Isci
Jun 14, 2010 - Adaptive computing systems rely on predictions of program ... eling workload behavior as a language modeling problem. .... r. LastValue. Table-1024. SMM-Global. Figure 2: Prediction accuracy of our predictor, last-value and ...

Program Behavior Prediction Using a Statistical Metric ... - Canturk Isci
Jun 14, 2010 - P(s4 | s3) s4. P(s4). P(s3). P(s2). P(s1). Probability. Figure 1: Model with back-off for n = 4. The statistical metric model is a conditional ...

A Structured Prediction Approach for Statistical ...
For sequence labeling problem, the standard loss function is. Hamming distance, which measures the difference between the true output and the predicting one:.

A Structured Prediction Approach for Statistical ... - ACL Anthology
Abstract. We propose a new formally syntax-based method for statistical machine translation. Transductions between parsing trees are transformed into a problem of sequence tagging, which is then tackled by a search- based structured prediction method

Experimental Results Prediction Using Video Prediction ...
RoI Euclidean Distance. Video Information. Trajectory History. Video Combined ... Training. Feature Vector. Logistic. Regression. Label. Query Feature Vector.

Transfer Learning for Behavior Prediction
on an e-commerce platform. Accurate future behavior prediction can assist a company's strategy and policy on ad- vertising, customer service, and even logistics, which is of great importance to both users and service providers. However, the task of b

A Metric and Multiscale Color Segmentation using the ...
consists in a function with values in the Clifford algebra R5,0 that en- .... Solving each system is achieved by adapting the results of section 3.2, however we.

Improving Location Prediction using a Social Historical ...
of social media where users are able to check-in to loca- tions they ... these predicted locations. Permission to ... [10] pro- posed the Order-k Markov model, which considers the fre- ... more recently visited places), and demonstrating how it can.

Improving Location Prediction using a Social Historical Model with ...
Location-based Social Networks (LBSN) are a popular form of social media where users are able to check-in to loca- tions they have ..... [5] H. Gao, J. Tang, and H. Liu. gSCorr: modeling geo-social correlations for new check-ins on location-based soc

Anesthesia Prediction Using Fuzzy Logic - IJRIT
Thus a system proposed based on fuzzy controller to administer a proper dose of ... guide in developing new anesthesia control systems for patients based on ..... International conference on “control, automation, communication and energy ...

Statistical prediction of protein–chemical interactions based on ...
predictions that are based upon valid free energy calculations are relatively reliable, there are now many docking software tools available, such as .... structures. gi(j А i) is a virtual intensity for a gap that can be produced by the breakdown of

A Program Behavior Matching Architecture for ...
program such as e2fsck to restore consistency. Journaling has three well-known modes of operation: •. Journal Mode: Both file system data and metadata are.

Damage Localization Using a Statistical Test on ...
finite element models of a truss and of a plate. Keywords: Ambient vibration; Covariance analysis; Damage localization; Hypothesis testing; Load vectors.

A statistical video content recognition method using invariant ... - Irisa
scene structure, the camera set-up, the 3D object motions. This paper tackles two ..... As illustration, examples of a real trajectories are showed in. Fig. 4, their ..... A tutorial on support vector machines for pattern recognition. Data Mining and

A Cognitive MAC Protocol Using Statistical Channel ...
Channel Allocation for Wireless Ad-hoc Networks. Alex Chia-Chun .... Such advanced spectrum sensing technology is crucial to the success of. CR devices.