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.3 Periodical Re-<strong>Optimization</strong><br />

Relative Execution Time<br />

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

instance-based<br />

latency constraint lc<br />

total execution time W(M’,k’)<br />

+ ∆tw<br />

Total Latency Time<br />

TL(M’)<br />

instance-based<br />

partitioned (v2)<br />

partitioned<br />

min TL<br />

partitioned (v1)<br />

lower bound<br />

Waiting<br />

Time ∆tw<br />

(a) ∆tw → W (P ′ )/k ′ Influence<br />

(b) ∆tw → T L(M ′ ) Influence<br />

Waiting<br />

Time ∆tw<br />

Figure 5.12: Search Space for Waiting Time Computation<br />

• Figure 5.12(b): On the one side, an increasing waiting time ∆tw linearly increases<br />

the latency time ˆT L because the waiting time is directly included in ˆT L . On the<br />

other side, an increasing ∆tw causes a decreasing relative execution time and thus,<br />

indirectly decreases ˆT L because the execution time is included in ˆT L . The result <strong>of</strong><br />

these two influences, in the general case <strong>of</strong> arbitrary extended cost functions, is a<br />

non-linear total latency time function that has a local minimum (v1) or not (v2). In<br />

any case, due to the validity condition, the total latency function is defined for the<br />

closed interval T L (M ′ , k ′ ) ∈ [W (M ′ , k ′ ) + ∆tw, lc] and hence, both global minimum<br />

and maximum exist. Given these characteristics, we compute the optimal waiting<br />

time with regard to latency time minimization and hence, throughput maximization.<br />

For waiting time computation, we need some additional notation. We monitor the incoming<br />

message rate R ∈ R and the value selectivity sel ∈ (0, 1] according to the partitioning<br />

attributes. For the sake <strong>of</strong> a simple analytical model, we only consider uniform value<br />

distributions <strong>of</strong> the partitioning attributes. However, it can be extended via histograms for<br />

value-based selectivities as well. The first partition will contain k ′ = R·sel·∆tw messages.<br />

For the i-th partition with i ≥ 1/sel, k ′ is computed by k ′ = R · ∆tw, independently <strong>of</strong><br />

the selectivity sel. A low selectivity implies many partitions b i but only few messages per<br />

partition per time unit (|b i | = R · sel). However, the high number <strong>of</strong> partitions b i forces<br />

us to wait longer (∆tw/sel) until the start <strong>of</strong> execution <strong>of</strong> such a partition such that the<br />

batch size only depends on message rate R and the waiting time ∆tw.<br />

<strong>Based</strong> on the relationship between the waiting time ∆tw and the number <strong>of</strong> messages<br />

per batch k ′ , we can compute the waiting time, where ˆT L is minimal by<br />

∆tw | min ˆT L (∆tw) ∧ Ŵ (M ′ , ∆tw) ≤ ˆT L (M ′ , ∆tw) ≤ lc (5.5)<br />

Using Equation 5.4 and assuming a fixed message rate R with 1/sel distinct items according<br />

to the partitioning attribute, we can substitute k ′ with R · ∆tw and get<br />

⌈ |M<br />

ˆT L (M ′ , k ′ ′ ⌉<br />

|<br />

) =<br />

k ′ · ∆tw + W (P ′ , k ′ )<br />

⌈ |M<br />

ˆT L (M ′ ′ ⌉<br />

|<br />

, R · ∆tw) =<br />

· ∆tw + W (P ′ , R · ∆tw).<br />

R · ∆tw<br />

(5.6)<br />

Finally, we set the cardinality <strong>of</strong> the hypothetical message subsequence to the worst case<br />

by M ′ = k ′ /sel = (R · ∆tw)/sel (execution <strong>of</strong> all 1/sel distinct partitions, where each<br />

147

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

Saved successfully!

Ooh no, something went wrong!