Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFF241047F for ; Wed, 9 Sep 2015 08:14:29 +0000 (UTC) Received: (qmail 85838 invoked by uid 500); 9 Sep 2015 08:14:29 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 85751 invoked by uid 500); 9 Sep 2015 08:14:29 -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 85741 invoked by uid 99); 9 Sep 2015 08:14:29 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2015 08:14:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 36D35E06E6 for ; Wed, 9 Sep 2015 08:14:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.151 X-Spam-Level: X-Spam-Status: No, score=0.151 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6ezmLDW4QjDx for ; Wed, 9 Sep 2015 08:14:09 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id AF902205B7 for ; Wed, 9 Sep 2015 08:14:07 +0000 (UTC) Received: by oiev17 with SMTP id v17so1306598oie.1 for ; Wed, 09 Sep 2015 01:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=COBbyZW+oQYh5Btjnbvj7HZL6Sm4eJdkW1KYAPbNgqU=; b=DP4QM3DCjdmdyKMcyrd9fbjmpGzjCKTeuJ21ADaTpgKRD92QB4mWN5mZNlKyEANIaM g1U7PZDpGqypMQRtYgqccl/nJMXDF4TaOucDXIf92eKIqYiPnQhs4/wkNCZva+brqDFq kz9E2/PdblIfFqREkwmrCp/a/orQFNvO/8pbsRJKefEzE9eU0Nl3FZs76D9g/sh4Zohx ZPPguGdRFEpOt+/wU0LRjBA+KjL5iRMwyc3Qj5hNCcasNlH8psFd7atQy4P3N4C03Xu1 F8TDw/jH5U3lnAjUcg+M1JJFMu5uwt9N8AxRNCowql7Z6xbrtSPo9ndqKxDsWG9cYra0 dXBA== MIME-Version: 1.0 X-Received: by 10.202.208.5 with SMTP id h5mr22061792oig.74.1441786440525; Wed, 09 Sep 2015 01:14:00 -0700 (PDT) Received: by 10.182.216.8 with HTTP; Wed, 9 Sep 2015 01:14:00 -0700 (PDT) In-Reply-To: References: <12E50A80607B5A46BF7060E19B29634F14DED7B4@NTOVMAIL04.ad.otto.de> <7885A715-A8F3-4256-9A0B-7628BEF29675@ricobergmann.de> <84A966EF-C306-4FC0-9455-46445AC7656B@ricobergmann.de> <15DC7F60-EC46-455B-84E1-4E29DA852B45@ricobergmann.de> <02D694A0-FCE1-49BB-9026-5204EE3BCCA1@ricobergmann.de> Date: Wed, 9 Sep 2015 10:14:00 +0200 Message-ID: Subject: Re: Performance Issue From: =?UTF-8?B?R8OhYm9yIEfDqXZheQ==?= To: user@flink.apache.org Content-Type: text/plain; charset=UTF-8 Btw, there was a discussion about this problem a while back: https://mail-archives.apache.org/mod_mbox/flink-dev/201506.mbox/%3CCADXjeyCi9_OPRO4oQtzhvi-gifeK6_66YbtJZ_PB0aQOp_NijA@mail.gmail.com%3E And here is the jira: https://issues.apache.org/jira/browse/FLINK-2181 Best, Gabor 2015-09-09 10:06 GMT+02:00 Stephan Ewen : > Aljoscha and me are currently working on an alternative Windowing > implementation. That new implementation will support out-of-order event time > and release keys properly. We will hopefully have a first version to try out > in a week or so... > > Greetings, > Stephan > > > On Wed, Sep 9, 2015 at 9:08 AM, Aljoscha Krettek > wrote: >> >> Ok, that's a special case but the system still shouldn't behave that way. >> The problem is that the grouped discretizer that is responsible for grouping >> the elements into grouped windows is keeping state for every key that it >> encounters. And that state is never released, ever. That's the reason for >> the hight memory consumption and GC load. >> >> On Wed, 9 Sep 2015 at 07:01 Rico Bergmann wrote: >>> >>> Yes. The keys are constantly changing. Indeed each unique event has its >>> own key (the event itself). The purpose was to do an event deduplication ... >>> >>> >>> >>> Am 08.09.2015 um 20:05 schrieb Aljoscha Krettek : >>> >>> Hi Rico, >>> I have a suspicion. What is the distribution of your keys? That is, are >>> there many unique keys, do the keys keep evolving, i.e. is it always new and >>> different keys? >>> >>> Cheers, >>> Aljoscha >>> >>> On Tue, 8 Sep 2015 at 13:44 Rico Bergmann wrote: >>>> >>>> I also see in the TM overview the CPU load is still around 25% although >>>> there is no input to the program since minutes. The CPU load is degrading >>>> very slowly. >>>> >>>> The memory consumption is still fluctuating at a high level. It does not >>>> degrade. >>>> >>>> In my test I generated test input for 1 minute. Now 10 minutes are over >>>> ... >>>> >>>> I think there must be something with flink... >>>> >>>> >>>> >>>> Am 08.09.2015 um 13:32 schrieb Rico Bergmann : >>>> >>>> The marksweep value is very high, the scavenge very low. If this helps >>>> ;-) >>>> >>>> >>>> >>>> >>>> Am 08.09.2015 um 11:27 schrieb Robert Metzger : >>>> >>>> It is in the "Information" column: http://i.imgur.com/rzxxURR.png >>>> In the screenshot, the two GCs only spend 84 and 25 ms. >>>> >>>> On Tue, Sep 8, 2015 at 10:34 AM, Rico Bergmann >>>> wrote: >>>>> >>>>> Where can I find these information? I can see the memory usage and cpu >>>>> load. But where are the information on the GC? >>>>> >>>>> >>>>> >>>>> Am 08.09.2015 um 09:34 schrieb Robert Metzger : >>>>> >>>>> The webinterface of Flink has a tab for the TaskManagers. There, you >>>>> can also see how much time the JVM spend with garbage collection. >>>>> Can you check whether the number of GC calls + the time spend goes up >>>>> after 30 minutes? >>>>> >>>>> On Tue, Sep 8, 2015 at 8:37 AM, Rico Bergmann >>>>> wrote: >>>>>> >>>>>> Hi! >>>>>> >>>>>> I also think it's a GC problem. In the KeySelector I don't instantiate >>>>>> any object. It's a simple toString method call. >>>>>> In the mapWindow I create new objects. But I'm doing the same in other >>>>>> map operators, too. They don't slow down the execution. Only with this >>>>>> construct the execution is slowed down. >>>>>> >>>>>> I watched on the memory footprint of my program. Once with the code >>>>>> construct I wrote and once without. The memory characteristic were the same. >>>>>> The CPU usage also ... >>>>>> >>>>>> I don't have an explanation. But I don't think it comes from my >>>>>> operator functions ... >>>>>> >>>>>> Cheers Rico. >>>>>> >>>>>> >>>>>> >>>>>> Am 07.09.2015 um 22:43 schrieb Martin Neumann : >>>>>> >>>>>> Hej, >>>>>> >>>>>> This sounds like it could be a garbage collection problem. Do you >>>>>> instantiate any classes inside any of the operators (e.g. in the >>>>>> KeySelector). You can also try to run it locally and use something like >>>>>> jstat to rule this out. >>>>>> >>>>>> cheers Martin >>>>>> >>>>>> On Mon, Sep 7, 2015 at 12:00 PM, Rico Bergmann >>>>>> wrote: >>>>>>> >>>>>>> Hi! >>>>>>> >>>>>>> While working with grouping and windowing I encountered a strange >>>>>>> behavior. I'm doing: >>>>>>> >>>>>>> dataStream.groupBy(KeySelector).window(Time.of(x, >>>>>>> TimeUnit.SECONDS)).mapWindow(toString).flatten() >>>>>>> >>>>>>> >>>>>>> When I run the program containing this snippet it initially outputs >>>>>>> data at a rate around 150 events per sec. (That is roughly the input rate >>>>>>> for the program). After about 10-30 minutes the rate drops down below 5 >>>>>>> events per sec. This leads to event delivery offsets getting bigger and >>>>>>> bigger ... >>>>>>> >>>>>>> Any explanation for this? I know you are reworking the streaming API. >>>>>>> But it would be useful to know, why this happens ... >>>>>>> >>>>>>> Cheers. Rico. >>>>>> >>>>>> >>>>> >>>> >