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.

5.4 Formal Analysis<br />

latency constraint and to avoid additional overhead for this transformation, we do not<br />

use state migration but use two partition trees (with the two schemes) and the two plans<br />

in parallel. New messages are enqueued into the new partition tree, while we execute<br />

message partitions from the old partition tree with the old plan until this partition tree is<br />

empty. When this termination condition is reached, we exchange plans and execute partitions<br />

from the new partition tree. Third, during cost-based optimization, we estimate the<br />

costs and compute the optimal waiting time with regard to minimizing the total latency<br />

time. Note that there are several side effects between MFO and the overall cost-based<br />

optimization. For example, there are bidirectional influences on cost estimation and plan<br />

rewriting. Therefore, during optimization the MFO technique is applied before the operator<br />

specific rewriting techniques. This is a worst-case scenario (no other optimizations<br />

applied) consideration with regard to the latency time and we benefit from subsequently<br />

applied techniques (e.g., rewriting iterations, which have been introduced by MFO, to parallel<br />

flows). Finally, the computed waiting time ∆tw is used in order to asynchronously<br />

issue instances <strong>of</strong> the rewritten plan.<br />

To summarize, we discussed how to enable the execution <strong>of</strong> horizontally partitioned<br />

message batches and how to compute the optimal waiting time with regard to the total<br />

latency time minimization that implies message throughput maximization. Furthermore,<br />

we explained how the overall multi-flow optimization technique is seamlessly integrated<br />

into the general cost-based optimization framework.<br />

5.4 Formal Analysis<br />

In this section, we now formally analyze our solution <strong>of</strong> horizontal message queue partitioning<br />

and waiting time computation according to the defined multi-flow optimization<br />

problem (P-MFO, see Definition 5.2). This includes (1) the optimality analysis with regard<br />

to latency time minimization as well as the two additional restrictions <strong>of</strong> (2) the maximum<br />

s<strong>of</strong>t latency constraint for single messages and (3) the serialized external behavior.<br />

5.4.1 Optimality Analysis<br />

First <strong>of</strong> all, we analyze the optimality with regard to the computed waiting time ∆tw. In<br />

detail, we discuss (1) the monotonically non-increasing execution time function that (2)<br />

asymptotically tends towards a lower bound as shown in Figure 5.13.<br />

Monotonically Non-Increasing Relative and Total Execution Time<br />

<strong>Based</strong> on the extended cost model, we can give an optimality guarantee for W (P ′ , k ′ ) with<br />

regard to the computed waiting time.<br />

Theorem 5.1 (Optimality <strong>of</strong> Partitioned Execution). The horizontal message queue partitioning<br />

solves the P-MFO with optimality guarantees <strong>of</strong> min T L (M ′ ) and monotonically<br />

non-increasing total execution time <strong>of</strong><br />

W (P ′ , k ′ )<br />

k ′ · |M ′ | ≤ W (P ′ , k ′ − 1)<br />

k ′ · |M ′ | ≤ W (P ) · M ′ , where k ′ > 1. (5.10)<br />

− 1<br />

Pro<strong>of</strong>. We compute the waiting time ∆tw, where min T L (M ′ ) under the given restrictions.<br />

This determines the batch size k ′ = R · ∆tw and ensures optimal throughput because the<br />

151

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

Saved successfully!

Ooh no, something went wrong!