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.

4 Vectorizing <strong>Integration</strong> <strong>Flows</strong><br />

• Intra-Operator (Horizontal): First, the operator implementations can be changed<br />

such that they split input messages, work on data partitions <strong>of</strong> input messages in<br />

parallel, and finally merge the results. For example, this type <strong>of</strong> parallelism is used<br />

in the XPEDIA system [BABO + 09]. In the context <strong>of</strong> processing tree-structured<br />

messages (XML), the benefit is limited due to a high serial fraction required for<br />

splitting and merging <strong>of</strong> messages.<br />

• Inter-Operator (Horizontal): Second, there are the already mentioned techniques<br />

on rewriting sequences and iterations to parallel subflows (Subsection 3.4.1), where<br />

the scope is intra-instance (or synonymously inter-operator) only. However, in the<br />

absence <strong>of</strong> iterations and due to restrictive dependencies between operators, the<br />

benefit <strong>of</strong> these techniques is limited. Nevertheless, they are valid because they can<br />

be applied to all types <strong>of</strong> flows, while the following two techniques are limited to<br />

data-driven integration flows.<br />

• Inter-Instance (Horizontal): Third, we could execute multiple plan instances in parallel.<br />

Unfortunately, due to the need for logical serialization <strong>of</strong> plan instances (Section<br />

2.3.2), simple multi-threaded plan execution is not applicable because expensive<br />

global serialization would be required at the outbound side. If no serialization is required,<br />

this technique has the highest optimization potential.<br />

• Inter-Operator/Inter-Instance (Vertical): Fourth, there is the possibility <strong>of</strong> pipeline<br />

parallelism with a scope that stretches across multiple instances <strong>of</strong> a plan.<br />

In order to overcome the problem <strong>of</strong> low CPU utilization, we introduce the vectorization<br />

<strong>of</strong> integration flows that uses the fourth possibility by applying pipelining to integration<br />

flows. Instance-based plans (that use an one-operator-at-a-time execution model)<br />

are transparently rewritten into pipelined plans (that use the pipes-and-filters execution<br />

model, where multiple operators represent a pipeline and thus, are executed in parallel).<br />

This concept <strong>of</strong> vectorization applies to data-driven integration flows (that include at least<br />

one Receive operator). More specifically, it is designed for asynchronous data-driven integration<br />

flows, where the client source systems are not blocked during execution <strong>of</strong> a<br />

plan instance. However, it is also extensible for synchronous data-driven integration flows<br />

by employing call-back mechanisms in combination with the concept <strong>of</strong> correlation IDs<br />

[OAS06], where waiting clients are logically mapped to asynchronously processed messages.<br />

Due to the control-flow semantics <strong>of</strong> integration flows and the need for ensuring<br />

semantic correctness, transparent pipelining as an internal optimization technique (not<br />

visible to the user) poses a hard challenge.<br />

With regard to this challenge, in Section 4.2, we introduce the full vectorization <strong>of</strong><br />

plans, where each operator is executed as a single thread. There, we discuss the rewriting<br />

algorithm as well as the rewriting with control-flow-awareness in detail. While, this typically<br />

already increases throughput, the full vectorization exhibits a fundamental problem:<br />

namely, this execution model might require a high number <strong>of</strong> threads.<br />

Problem 4.2 (High Number <strong>of</strong> Required Threads). If each operator is executed as a single<br />

thread, the number <strong>of</strong> operators determine the number <strong>of</strong> threads required for a vectorized<br />

plan. Thus, the throughput improvement <strong>of</strong> a concrete plan achieved by vectorization<br />

strongly depends on the number <strong>of</strong> operators <strong>of</strong> this plan. In dependence on the concrete<br />

workload (runtime <strong>of</strong> a single operator) and the available parallelism <strong>of</strong> the used hardware<br />

platform, a number <strong>of</strong> threads that is too high can also hurt performance due to additional<br />

88

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

Saved successfully!

Ooh no, something went wrong!