Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 19164200B6A for ; Mon, 22 Aug 2016 14:23:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1782D160AB3; Mon, 22 Aug 2016 12:23:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13383160A91 for ; Mon, 22 Aug 2016 14:23:45 +0200 (CEST) Received: (qmail 7311 invoked by uid 500); 22 Aug 2016 12:23:45 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 7301 invoked by uid 99); 22 Aug 2016 12:23:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 12:23:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 775421A535E for ; Mon, 22 Aug 2016 12:23:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.492 X-Spam-Level: ** X-Spam-Status: No, score=2.492 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hse-b08aPMYN for ; Mon, 22 Aug 2016 12:23:42 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 241D05F307 for ; Mon, 22 Aug 2016 12:23:42 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id f65so118059555wmi.0 for ; Mon, 22 Aug 2016 05:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=GXWoCFSgPVzw1WLHCHbK/g0cnmmSNdye/MBVJh/W49E=; b=lL3lXVGiBAAXdiTcdGOzIs6FhvhHVMJq0LsvSBdP/DX/QSH1xSxNw7qwxXW24tcW4F Vb5UDARfo6rLzwzqUOKBwxlMH3pcWeCGZBK081nVM5BVe5+FZe7zJ3S+W+iDtjyjo4r4 zHVTyzNGlIWhkQVCl//EGKqgnpagtdeWAMg+mNnS13u1Weaj09aMaI1lW8NTgmtv+LNA q9hzkAPfNt7zaEp4wq0yrAPeoVTQLssutKG5vP/S9xpiGXX4Pdrn9ZBDMkUj6pbzHti/ qtV1l/Dc7mld4lmeIy+aLr8I+wUCqjZvXxA6D1T3Iy+9GPnMfVlPAbHkiJeLju3fMpVa BZ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=GXWoCFSgPVzw1WLHCHbK/g0cnmmSNdye/MBVJh/W49E=; b=jvY49pLtp82WYl1eZjLW3eJYrWWyjbY2OJaQTEaX9zdi9CRmKZb8jZTV0CIvDxC7TZ jFax3GtQI2igglmGyqbtyFpzqc2c41uehl0KDy3YQvJs3VatdHwGq1iaqcaqvEAzUyQz zqszh47Yu+tJy7j51TedYBc9piSRCdVrmpCs11PH13qSmo/FKflsjAe+jB79MTP4nM62 kSnVx9Q7jr/c6HwDMOCNhL3URfjXrkl1bmzLNILbSgrldudEwR0Xi6qPqzKfLOHfG228 6lK9o9k0EtLsSNsyfrGJZqmNWf8E3oXEUzCcVZvUnkWyaIPg44vWuA+e0ySK/+X/tG9V /Gjw== X-Gm-Message-State: AEkoout4tNAEJjT3A91yIBgT6ZjX/XpuCpgG7TpCK8lCUBRtQDFbCoEvoQh09FM+8rcfFboFEsBvsixUbZdcRQ== X-Received: by 10.28.199.199 with SMTP id x190mr14480857wmf.70.1471868621019; Mon, 22 Aug 2016 05:23:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.7.196 with HTTP; Mon, 22 Aug 2016 05:23:10 -0700 (PDT) In-Reply-To: <1471866612870-8596.post@n4.nabble.com> References: <1471866612870-8596.post@n4.nabble.com> From: Fabian Hueske Date: Mon, 22 Aug 2016 14:23:10 +0200 Message-ID: Subject: Re: Complex batch workflow needs (too) much time to create executionPlan To: user@flink.apache.org Content-Type: multipart/alternative; boundary=94eb2c0d75144fddbc053aa81ed2 archived-at: Mon, 22 Aug 2016 12:23:47 -0000 --94eb2c0d75144fddbc053aa81ed2 Content-Type: text/plain; charset=UTF-8 Hi Markus, you might be right, that a lot of time is spend in optimization. The optimizer enumerates all alternatives and chooses the plan with the least estimated cost. The degrees of freedom of the optimizer are rather restricted (execution strategies and the used partitioning & sorting keys. The order of operators is not optimized). However, your plan contains of more than 250 operators which is pretty large (in fact, I haven't seen a Flink plan of this size yet). I assume that this is only one part of the program that exceeded the 20 minutes of optimization, correct? In order to verify that Flink is stuck in the optimization phase, you could take a stacktrace to see which methods the Java process currently executes. One way to improve the optimization time is to set a few JoinHints to reduce the degrees of freedom and number of enumerated plans. Hope this helps, Fabian 2016-08-22 13:50 GMT+02:00 Markus Nentwig : > Hello Flink community, > > I created a slightly long batch workflow for my use case of clustering > vertices using > Flink and Gelly. Executing each of the workflow parts individually (and > write > intermediate results to disk) works as suspected. > > When combining workflow parts to longer jobs, I noticed that the time > between > 'Job Name' time and the actual 'Start Time' in the Flink Dashboard differ. > With > longer workflow chains the time difference gets bigger and bigger. At this > point, I think that Flink is creating the execution plan which is executed > directly afterwards. As an example (90% of the workflow combined), I 'wait' > for > the execution plan for 77-78 seconds, then the job is accepted for > execution > and > needs another 7-9 seconds to process a small test dataset (<8k vertices > with > property values and edges) - each run repeated 3 times. If running only > env.getExecutionPlan() I will wait similar time for the execution plan. I > added the > JSON execution plan to this post. For bigger datasets the execution plan > creation time and the job execution time grows as well in my scenario. > > When I now add a vertex centric iteration to my workflow and start the > Flink > job, I don't get a result at all: I stopped the job > (print execution plan to log) at the following point: > > - waited > 20 hours after 'flink run ...' > - two cores on my machine are at 100% all the time working on the flink job > - no entry in Flink dashboard at all > - no entry in log file after these lines: > > ### > [...] > org.apache.flink.client.CliFrontend - Starting execution of > program > org.apache.flink.client.program.Client - Starting program in > interactive mode > org.apache.flink.api.java.ExecutionEnvironment - The job has 2 registered > types and 0 default Kryo serializers > org.apache.flink.optimizer.Optimizer - The parallelism of nested > dataflows (such as step functions in iterations) is currently fixed to the > parallelism of the surrounding operator (the iteration). > ### > > Most likely the workflow could be optimized in many ways to need less time > at > certain points (yes, I am not a Flink expert in many places), but I think > that > long/complex workflows would still suffer of problems like this. > Due to the fact that every single step is producing output (and some > combined > parts of the workflow do so, too), I currently suspect the Flink optimizer > / > execution plan creation to be the problem and therefore ask anyone here if > you > have experience with similar behavior. Any suggestions how I could > successfully > run long/complex workflows not running in such problems? ;) > > If there is not (an instant) 'solution' to the problem I would be still > interested in opinions and ideas, thanks in advance! > > Best, > Markus > > complexExecPlan.json > n4.nabble.com/file/n8596/complexExecPlan.json> > > > > -- > View this message in context: http://apache-flink-user- > mailing-list-archive.2336050.n4.nabble.com/Complex-batch- > workflow-needs-too-much-time-to-create-executionPlan-tp8596.html > Sent from the Apache Flink User Mailing List archive. mailing list archive > at Nabble.com. > --94eb2c0d75144fddbc053aa81ed2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Markus,

you might be right, that= a lot of time is spend in optimization.
The optimizer enumerates all a= lternatives and chooses the plan with the least estimated cost. The degrees= of freedom of the optimizer are rather restricted (execution strategies an= d the used partitioning & sorting keys. The order of operators is not o= ptimized). However, your plan contains of more than 250 operators which is = pretty large (in fact, I haven't seen a Flink plan of this size yet).
I assume that this is only one part of the program that exceed= ed the 20 minutes of optimization, correct?

In order to v= erify that Flink is stuck in the optimization phase, you could take a stack= trace to see which methods the Java process currently executes.

One way to improve the optimization time is to set a few JoinHints t= o reduce the degrees of freedom and number of enumerated plans.

Hope this helps,
Fabian

2016-08-22 13:50 GMT+= 02:00 Markus Nentwig <nentwig@informatik.uni-leipzig.de>:
Hello Flink community,

I created a slightly long batch workflow for my use case of clustering
vertices using
Flink and Gelly. Executing each of the workflow parts individually (and
write
intermediate results to disk) works as suspected.

When combining workflow parts to longer jobs, I noticed that the time
between
'Job Name' time and the actual 'Start Time' in the Flink Da= shboard differ.
With
longer workflow chains the time difference gets bigger and bigger.=C2=A0 At= this
point, I think that Flink is creating the execution plan which is executed<= br> directly afterwards. As an example (90% of the workflow combined), I 'w= ait'
for
the execution plan for 77-78 seconds, then the job is accepted for executio= n
and
needs another 7-9 seconds to process a small test dataset (<8k vertices = with
property values and edges) - each run repeated 3 times. If running only
env.getExecutionPlan() I will wait similar time for the execution plan. I added the
JSON execution plan to this post. For bigger datasets the execution plan creation time and the job execution time grows as well in my scenario.

When I now add a vertex centric iteration to my workflow and start the Flin= k
job, I don't get a result at all: I stopped the job
(print execution plan to log) at the following point:

- waited > 20 hours after 'flink run ...'
- two cores on my machine are at 100% all the time working on the flink job=
- no entry in Flink dashboard at all
- no entry in log file after these lines:

###
[...]
org.apache.flink.client.CliFrontend=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 - Starting execution of
program
org.apache.flink.client.program.Client=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0- Starting program in
interactive mode
org.apache.flink.api.java.ExecutionEnvironment - The job has 2 registe= red
types and 0 default Kryo serializers
org.apache.flink.optimizer.Optimizer=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0- The parallelism of nested
dataflows (such as step functions in iterations) is currently fixed to the<= br> parallelism of the surrounding operator (the iteration).
###

Most likely the workflow could be optimized in many ways to need less time<= br> at
certain points (yes, I am not a Flink expert in many places), but I think that
long/complex workflows would still suffer of problems like this.
Due to the fact that every single step is producing output (and some
combined
parts of the workflow do so, too), I currently suspect the Flink optimizer = /
execution plan creation to be the problem and therefore ask anyone here if<= br> you
have experience with similar behavior. Any suggestions how I could
successfully
run long/complex workflows not running in such problems? ;)

If there is not (an instant) 'solution' to the problem I would be s= till
interested in opinions and ideas, thanks in advance!

Best,
Markus

complexExecPlan.json
<
http://apache-flink-user-mailing-list-archive.2336050.n4.nabbl= e.com/file/n8596/complexExecPlan.json>



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.= com/Complex-batch-workflow-needs-too-much-time-to-create-executio= nPlan-tp8596.html
Sent from the Apache Flink User Mailing List archive. mailing list archive = at Nabble.com.

--94eb2c0d75144fddbc053aa81ed2--