21.01.2013 Views

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Phase Complexity Surfaces: Characteriz<strong>in</strong>g Time-Vary<strong>in</strong>g Program Behavior 327<br />

5 Program Phase Characterization<br />

Due to space constra<strong>in</strong>ts, it is impossible to present phase complexity curves for all<br />

benchmarks. Instead we present and discuss typical example phase complexity surfaces<br />

that we observed dur<strong>in</strong>g our study. Example surfaces are shown <strong>in</strong> Figures 1 and 2:<br />

Figure 1 shows phase count and predictability surfaces for gcc-scilab, gzipprogram,<br />

eon-kajiya and equake, and Figure 2 shows surfaces for bzip2graphic,<br />

lucas, fma3d and gap. As mentioned before, a phase count surface<br />

shows the (logarithm of the) number of phases on the Z-axis versus the cluster<strong>in</strong>g<br />

threshold (which is a measure for <strong>in</strong>tra-phase variability) and the <strong>in</strong>terval size (which<br />

is a measure of time granularity) on the X and Y axes; the phase predictability surface<br />

shows phase predictability on the Z-axis versus cluster<strong>in</strong>g threshold and <strong>in</strong>terval<br />

size. The θ cluster<strong>in</strong>g threshold is varied from 0.05 up to 0.5 <strong>in</strong> 0.05 <strong>in</strong>crements — the<br />

smaller the threshold, the smaller the <strong>in</strong>tra-phase variability; <strong>in</strong>terval size is varied from<br />

1M up to 1G — note the labels are shown as log2 of the <strong>in</strong>terval size.<br />

There are basically two types of phase count surfaces. The first type shows a decreas<strong>in</strong>g<br />

number of program phases at larger time granularities. This is illustrated <strong>in</strong> Figure 1.<br />

The second type shows an <strong>in</strong>creas<strong>in</strong>g number of program phases at larger time granularities<br />

and a decreas<strong>in</strong>g number of program phases at a yet larger time granularity, see<br />

Figure 2.<br />

The first type of phase count surface can be expla<strong>in</strong>ed by the observation that phase<br />

behavior at a small time granularity gets averaged out at a larger time granularity. As<br />

a result, more and more portions of the program execution start look<strong>in</strong>g similar which<br />

is reflected <strong>in</strong> a decreas<strong>in</strong>g number of program phases. The second type of phase count<br />

surface appears for programs with obvious phase behavior, however, this obvious phase<br />

behavior seems to be difficult to capture over a range of time scales. This can occur<br />

<strong>in</strong> case the period of the <strong>in</strong>herent phase behavior is not a multiple of a given time<br />

granularity. For the purpose of illustration, consider the follow<strong>in</strong>g example of a phase ID<br />

sequence: ‘AAABBAAABBAAABB...’ with ‘A’ and ‘B’ be<strong>in</strong>g phase IDs. The number<br />

of phases at time granularity 1 equals 2, namely ‘A’ and ‘B’. At the time granularity<br />

of 2, there are 3 phases observed, namely ‘AA’, ‘AB’ (or ‘BA’) and ‘BB’. At the time<br />

granularity of 4, there are only 2 phases observed: ‘AAAB’ and ‘AABB’. In some sense<br />

this could be viewed of as a consequence of our choice for fixed-length <strong>in</strong>tervals <strong>in</strong> our<br />

phase-level characterization, however, we observe the large number of phases across a<br />

range of time granularities. This seems to suggest that this phase behavior has a fairly<br />

long period, and that variable-length <strong>in</strong>tervals (which are tied to some notion of time<br />

granularity as well) may not completely solve the problem.<br />

It is also <strong>in</strong>terest<strong>in</strong>g to observe that for both types of phase count surfaces, phase predictability<br />

can be high or low. For example, the predictability is low for gcc-scilab,<br />

gzip-program and bzip2-graphic andisveryhighforequake, fma3d and<br />

lucas. For some benchmarks, phase predictability correlates <strong>in</strong>versely with the number<br />

of phases, see for example gzip-program: for a given cluster<strong>in</strong>g threshold,<br />

the higher the number of phases, the lower the predictability. For other benchmarks<br />

on the other hand, the opposite seems to be true: for a given cluster<strong>in</strong>g threshold,<br />

phase predictability decreases with a decreas<strong>in</strong>g number of phases, see for example<br />

gcc-scilab.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!