From dev-return-94798-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Sun Jun 3 20:00:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E9F2B180676 for ; Sun, 3 Jun 2018 20:00:04 +0200 (CEST) Received: (qmail 13761 invoked by uid 500); 3 Jun 2018 18:00:03 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 13717 invoked by uid 99); 3 Jun 2018 18:00:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2018 18:00:03 +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 2C543C72DB for ; Sun, 3 Jun 2018 18:00:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hmbZuE9h42VJ for ; Sun, 3 Jun 2018 18:00:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 335D65F230 for ; Sun, 3 Jun 2018 18:00:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 21253E0D0E for ; Sun, 3 Jun 2018 18:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 847842109B for ; Sun, 3 Jun 2018 18:00:00 +0000 (UTC) Date: Sun, 3 Jun 2018 18:00:00 +0000 (UTC) From: "Guozhang Wang (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KAFKA-6925) Memory leak in org.apache.kafka.streams.processor.internals.StreamThread$StreamsMetricsThreadImpl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-6925?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Guozhang Wang resolved KAFKA-6925. ---------------------------------- Resolution: Fixed > Memory leak in org.apache.kafka.streams.processor.internals.StreamThread$= StreamsMetricsThreadImpl > -------------------------------------------------------------------------= ------------------------ > > Key: KAFKA-6925 > URL: https://issues.apache.org/jira/browse/KAFKA-6925 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 0.11.0.2, 1.1.0, 1.0.1 > Reporter: Marcin Kuthan > Assignee: John Roesler > Priority: Major > Fix For: 0.11.0.3, 1.0.2, 1.1.1 > > > *Note: this issue was fixed incidentally in 2.0, so it is only present in= versions 0.x and 1.x.* > =C2=A0 > The retained heap of=C2=A0org.apache.kafka.streams.processor.internals.St= reamThread$StreamsMetricsThreadImpl is=C2=A0surprisingly high for long runn= ing job. Over 100MB of heap for every stream after a week of uptime, when f= or the same application a few hours after start heap takes 2MB. > For the problematic instance majority of memory=C2=A0StreamsMetricsThread= Impl is occupied by hash map entries in parentSensors, over 8000 elements 1= 00+kB each. For fresh instance there are less than 200 elements. > Below you could find retained set report generated from Eclipse Mat but I= 'm not fully sure about correctness due to complex object graph in the metr= ics related code. Number of objects in single=C2=A0StreamThread$StreamsMetr= icsThreadImpl=C2=A0 instance. > =C2=A0 > {code:java} > Class Name | Objects | Shallow Heap > -------------------------------------------------------------------------= ---------------------------------- > org.apache.kafka.common.metrics.KafkaMetric | 140,476 | 4,495,232 > org.apache.kafka.common.MetricName | 140,476 | 4,495,232 > org.apache.kafka.common.metrics.stats.SampledStat$Sample | 73,599 | 3,532= ,752 > org.apache.kafka.common.metrics.stats.Meter | 42,104 | 1,347,328 > org.apache.kafka.common.metrics.stats.Count | 42,104 | 1,347,328 > org.apache.kafka.common.metrics.stats.Rate | 42,104 | 1,010,496 > org.apache.kafka.common.metrics.stats.Total | 42,104 | 1,010,496 > org.apache.kafka.common.metrics.stats.Max | 28,134 | 900,288 > org.apache.kafka.common.metrics.stats.Avg | 28,134 | 900,288 > org.apache.kafka.common.metrics.Sensor | 3,164 | 202,496 > org.apache.kafka.common.metrics.Sensor[] | 3,164 | 71,088 > org.apache.kafka.streams.processor.internals.StreamThread$StreamsMetricsT= hreadImpl| 1 | 56 > -------------------------------------------------------------------------= ---------------------------------- > {code} > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)