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...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5 Multi-Flow <strong>Optimization</strong><br />
partition contains k ′ messages), use Equation 5.6 and compute min ˆT L with<br />
∆tw | min ˆT L (M ′ , R · ∆tw) with<br />
′ ˆT L (M ′ , R · ∆tw) ∆tw = 0<br />
ˆT L(M ′′ , R · ∆tw) ∆tw∆tw > 0,<br />
(5.7)<br />
where ˆT L ′ and ˆT<br />
′′<br />
L<br />
are the first and second partial deviation <strong>of</strong> the total latency function<br />
ˆT L with repect to ∆tw. If such a local minimum exists, we check the validity condition<br />
<strong>of</strong> (0 ≤ W (P ′ , k ′ ) ≤ ∆tw) ∧ (0 ≤ ˆT L ≤ lc). If ∆tw < W (P ′ , k ′ ), we search for ∆tw =<br />
W (P ′ , k ′ ). Further, if ˆTL > lc, we search for the specific ∆tw with ˆT L (∆tw) = lc. If<br />
such a local minimum does not exist, we use the lower border <strong>of</strong> the function interval to<br />
compute ∆tw with<br />
∆tw | min ˆT L (M ′ , R · ∆tw) with ˆTL (M ′ , R, ∆tw) = W (M ′ , ∆tw · R) + ∆tw, (5.8)<br />
where this lower border <strong>of</strong> W (M ′ , k ′ ) + ∆tw is given at ∆tw = W (P ′ , k ′ ), where W (P ′ , k ′ )<br />
depends itself on ∆tw. In dependence on the load situation, there might not be a valid<br />
∆tw = W (P ′ , k ′ ) with ∆tw ≥ 0. In this overload situation, we compute the maximum<br />
number <strong>of</strong> messages per batch k ′′ by<br />
k ′′ | W (M ′ , k ′′ ) + ∆tw = T L (M ′ , k ′′ ) = lc. (5.9)<br />
In this case, the waiting time is exactly ∆tw = W (P ′′ , k ′′ ) and thus we have a full utilization.<br />
However, due to the overload situation, we do not execute the partition with<br />
all collected messages k ′ but only with the k ′′ messages, while the k ′ − k ′′ messages are<br />
reassigned to the end <strong>of</strong> the partition tree (and with regard to serialized external behavior,<br />
the outrun counters are increased accordingly). This ensures lowest possible latency <strong>of</strong><br />
single messages. Thus, we achieve highest throughput, but the input queue size increases.<br />
We use an example to illustrate this whole computation approach.<br />
Example 5.8 (Waiting Time Computation). Recall the Example 5.7 and assume a fixed<br />
message rate R = 4 msg /s (overload situation for instance-based execution due to W (P 2 ) =<br />
0.53 s ), a latency constraint lc = 200 s, and a selectivity <strong>of</strong> sel = 0.01. In order to compute<br />
∆tw, we use the following ˆT L function (w.r.t. Equation 5.6):<br />
⌈ |M<br />
ˆT L (M ′ ′ ⌉<br />
|<br />
, R · ∆tw) =<br />
· ∆tw<br />
R · ∆tw<br />
+ W (o 1 ) + W (o 2 ) + W (o 3 ) + (W (o 4 ) + W (o 5 ) + W (o 6 )) · R · ∆tw.<br />
We then set M ′ = (R · ∆tw)/sel to the worst-case <strong>of</strong> k ′ = R · ∆tw messages for all 1/sel<br />
distinct partitions and thus get<br />
⌈ ⌉ 1<br />
ˆT L (M ′ , R · ∆tw) = · ∆tw<br />
sel<br />
+ W (o 1 ) + W (o 2 ) + W (o 3 ) + (W (o 4 ) + W (o 5 ) + W (o 6 )) · R · ∆tw.<br />
<strong>Based</strong> on this obtained function, we see that the deviation according to ∆tw will lead<br />
to a constant function and thus, no local minimum exist. Hence, we determine ∆tw at<br />
∆tw = W (P ′ 2 , k′ ) with<br />
∆tw = W (P ′ 2, R · ∆tw)<br />
∆tw = W (o 1 ) + W (o 2 ) + W (o 3 ) + (W (o 4 ) + W (o 5 ) + W (o 6 )) · R · ∆tw<br />
∆tw = 1 − (W (o 4) + W (o 5 ) + W (o 6 )) · R<br />
W (o 1 ) + W (o 2 ) + W (o 3 )<br />
≈ 1.8056 s.<br />
148