Cost-Based Optimization of Integration Flows - Datenbanken ...
Cost-Based Optimization of Integration Flows - Datenbanken ...
Cost-Based Optimization of Integration Flows - Datenbanken ...
- 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.
5 Multi-Flow <strong>Optimization</strong><br />
k ′ . Figure 5.11 illustrates the resulting relative execution time per message (analytical<br />
consideration) with varying batch size k ′ ∈ {1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}. We<br />
observe a decreasing relative execution time per message W (P 2 ′, k′ )/k ′ with increasing k ′ ,<br />
and that this relative execution time asymptotically tends to a lower bound.<br />
Using the double-metric cost model in combination with its extension for message partitions,<br />
we now can compute the total execution time W (M ′ , k ′ ) and the total latency<br />
time T L (M ′ , k ′ ) <strong>of</strong> finite message subsequences M ′ (with undefined length) by assuming<br />
⌈|M ′ |/k ′ ⌉ = 1/sel instances <strong>of</strong> a partitioned plan (rounded up to numbers <strong>of</strong> instances).<br />
• Total Execution Time W (M ′ ): The estimated total execution time Ŵ (M ′ ) <strong>of</strong> a<br />
message subsequence is computed as the product <strong>of</strong> the estimated costs per instance<br />
times the number <strong>of</strong> executed plan instances with<br />
⌈ |M<br />
Ŵ (M ′ , k ′ ) = Ŵ (P ′ , k ′ ′ ⌉<br />
|<br />
) · , (5.3)<br />
where Ŵ (P ′ , k ′ ) is computed as sum over the sequence <strong>of</strong> extended operator costs<br />
with Ŵ (P ′ , k ′ ) = ∑ m<br />
i=1 Ŵ (o′ , k ′ ).<br />
• Total Latency Time T L (M ′ ): In contrast, the estimated total latency time ˆT L (M ′ )<br />
<strong>of</strong> a message subsequence is composed <strong>of</strong> the waiting time ∆tw and the execution<br />
time Ŵ (P ′ , k ′ ). Thus, we compute it depending on the comparison between ∆tw<br />
and Ŵ (P ′ , k ′ ) with<br />
⎧ ⌉<br />
⌈<br />
|M ′ |<br />
⎨<br />
ˆT L (M ′ , k ′ k<br />
· ∆tw +<br />
) =<br />
Ŵ (P ′ , k ′ ) ∆tw ≥ W (P ′ , k ′ )<br />
′<br />
⌉<br />
⎩∆tw + · Ŵ (P ′ , k ′ ) otherwise.<br />
⌈<br />
|M ′ |<br />
k ′<br />
k ′<br />
(5.4)<br />
Due to our defined validity condition, ∆tw < W (P ′ , k ′ ) is invalid. Hence, in the<br />
following we use only the first case <strong>of</strong> Equation 5.4.<br />
It follows directly that Ŵ (M ′ , k ′ ) ≤ ˆT L (M ′ , k ′ ), where Ŵ (M ′ , k ′ ) + ∆tw = ˆT L (M ′ , k ′ )<br />
is the specific case at ∆tw = W (P ′ , k ′ ). This means, the estimated total latency time<br />
cannot be lower than the estimated total execution time because the latency time additionally<br />
includes the waiting time. Finally, the optimization objective φ <strong>of</strong> the P-MFO<br />
is to minimize this total latency time function ˆT L under all existing constraints. In the<br />
following, we will explain how to compute the optimal waiting time ∆tw that achieves<br />
this minimization for the general case <strong>of</strong> arbitrary cost models.<br />
5.3.3 Waiting Time Computation<br />
The intuition <strong>of</strong> computing the optimal waiting time ∆tw is that the waiting time—and<br />
hence, the batch size k ′ —strongly influences the execution time <strong>of</strong> single plan instances.<br />
The latency time then depends on that execution time. Figure 5.12 conceptually illustrates<br />
the resulting two inverse influences that our computation algorithm exploits:<br />
• Figure 5.12(a): For partitioned plans, an increasing waiting time ∆tw causes decreasing<br />
relative execution time per message W (P ′ , k ′ )/k ′ and total execution time<br />
W (M ′ , k ′ ), which are both non-linear functions that asymptotically tend towards a<br />
lower bound. In contrast, ∆tw has no influence on instance-based execution.<br />
146