25.01.2015 Views

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 Fundamentals <strong>of</strong> Optimizing <strong>Integration</strong> <strong>Flows</strong><br />

Definition 3.4 (Periodic Plan <strong>Optimization</strong> Problem (P-PPO 3 )). The P-PPO describes<br />

the periodical creation <strong>of</strong> the optimal plan P at timestamp T k with the period ∆t (optimization<br />

interval). The workload W (P, T k ) is available for a sliding time window <strong>of</strong> size<br />

∆w. <strong>Optimization</strong> required an execution time T Opt with T Opt = T k,1 − T k,0 and T k = T k,0 .<br />

When solving the P-PPO at timestamp T k,1 , the result is the optimal plan w.r.t. the<br />

statistics available at timestamp T k,0 .<br />

∆t(P)<br />

∆t(P)<br />

∆w(P)<br />

Workload W(P,Tk)<br />

Topt(P)<br />

∆w(P)<br />

Workload W(P,Tk)<br />

Topt(P)<br />

∆w(P)<br />

Workload W(P,Tk+1)<br />

Topt(P)<br />

Opti<br />

Opti<br />

Opti+1<br />

Tk-1<br />

Tk<br />

Tk+1<br />

time t<br />

Tk-1,0<br />

Tk-1,1<br />

Tk,0 Tk,1 Tk+1,0 Tk+1,1<br />

Figure 3.5: Temporal Aspects <strong>of</strong> the P-PPO<br />

Figure 3.5 illustrates the temporal aspects <strong>of</strong> periodical re-optimization in more detail.<br />

We optimize the given plan at timestamp T k with a period <strong>of</strong> ∆t. During this optimization,<br />

we evaluate costs <strong>of</strong> a plan by double-metric cost estimation, where only statistics in the<br />

interval <strong>of</strong> [T k − ∆w, T k ] are taken into account. The parameters optimization interval<br />

∆t and workload sliding time window size ∆w are set individually for each plan P . We<br />

will revisit the influence <strong>of</strong> these parameters in Subsection 3.3.3. The following example<br />

illustrates this concept <strong>of</strong> periodical re-optimization and shows how the introduced cost<br />

estimation approach is used in this context.<br />

Example 3.3 (Periodical Re-optimization). Assume a plan P with instances p i , for which<br />

execution statistics have been monitored. This plan comprises a Receive operator o 1 and<br />

a following Invoke operator o 2 .<br />

∆w=12<br />

Workload W(P,Tk)<br />

∆w=12<br />

Workload W(P,Tk+1)<br />

p1<br />

p2<br />

p3<br />

o1<br />

o2<br />

0 12 15 18<br />

30<br />

3 6 9<br />

T1=13<br />

∆t=16<br />

T2=29<br />

Figure 3.6: Example Execution Scenario<br />

o1<br />

o2<br />

o1<br />

o2<br />

time t<br />

Figure 3.6 illustrates a situation where three plan instances, p 1 , p 2 and p 3 , are executed in<br />

sequence. Hence, nine statistic tuples are stored and normalized: two operator tuples and a<br />

single plan tuple, for every plan instance. Table 3.4 illustrates example execution statistics.<br />

Assume an optimization interval ∆t = 16 ms, a sliding time window size ∆w = 12 ms,<br />

and the moving average (MA) over this window as workload aggregation method (method<br />

used to aggregate statistics over the time window). As a result, we estimate the costs <strong>of</strong><br />

plan P at timestamps T k = {T 1 = 13, T 2 = 29} as follows (simplified on plan granularity):<br />

∑ n<br />

i=1<br />

Ŵ T1 (P ) =<br />

W (p i ∈ [1, 13])<br />

= W 3<br />

|W P |<br />

1 = 4 ms = 4 ms<br />

1<br />

∑ n<br />

i=1<br />

Ŵ T2 (P ) =<br />

W (p i ∈ [17, 29])<br />

|W P |<br />

= W 6 + W 9<br />

2<br />

=<br />

3 ms + 4 ms<br />

2<br />

= 3.5 ms.<br />

3 We use the prefix P- as indicator for problems throughout the whole thesis. As an example, P-PPO is<br />

the abbreviation for the Periodic Plan <strong>Optimization</strong> problem.<br />

46

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

Saved successfully!

Ooh no, something went wrong!