From dev-return-9716-archive-asf-public=cust-asf.ponee.io@curator.apache.org Mon Dec 10 16:24:06 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 D4F57180627 for ; Mon, 10 Dec 2018 16:24:05 +0100 (CET) Received: (qmail 57502 invoked by uid 500); 10 Dec 2018 15:24:05 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 57491 invoked by uid 99); 10 Dec 2018 15:24:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2018 15:24:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7B4B6C1D05 for ; Mon, 10 Dec 2018 15:24:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 3Q23-WZdJy5u for ; Mon, 10 Dec 2018 15:24:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3A32861110 for ; Mon, 10 Dec 2018 15:24: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 10798E262A for ; Mon, 10 Dec 2018 15:24: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 4C4B5252F1 for ; Mon, 10 Dec 2018 15:24:00 +0000 (UTC) Date: Mon, 10 Dec 2018 15:24:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-487) GzipCompressionProvider produces a lot of finalizable objects 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/CURATOR-487?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D167= 14909#comment-16714909 ]=20 ASF GitHub Bot commented on CURATOR-487: ---------------------------------------- Github user leventov commented on the issue: https://github.com/apache/curator/pull/282 =20 There is no peer evidence here, because we are on the optimization fore= front. See https://github.com/apache/incubator-druid/pull/6677#discussion_r= 237182258 and https://lists.apache.org/thread.html/1aff123193cec5c385821b2d= 745a4e846a8a5786146c047acbdf8ea3@%3Cdev.druid.apache.org%3E. =20 I've seen a Druid heap with more than 10k finalizable Deflater objects,= about 8k of which were already dead, awaiting in the finalization queue. T= hey come from `GzipCompressionProvider`. =20 Historically Druid uses Zookeeper somewhat wrong (not for what Zookeepe= r was designed): it announces data segment placement using Zookeeper, that = leads to creation of a lot of new nodes in Zookeeper every second. It means= that by accident, Druid is a good stress test for Zookeeper (and consequen= tly for Curator), and we run probably the largest Druid cluster. > GzipCompressionProvider produces a lot of finalizable objects > ------------------------------------------------------------- > > Key: CURATOR-487 > URL: https://issues.apache.org/jira/browse/CURATOR-487 > Project: Apache Curator > Issue Type: Improvement > Reporter: Roman Leventov > Assignee: Cameron McKenzie > Priority: Major > Fix For: 4.1.0 > > > GzipCompressionProvider.compress() and decompress() methods are called a = lot inside and outside of the framework and each such call produces a java.= util.zip.Deflater or Inflater object that are finalizable, that is bad for = GC. > =C2=A0 > Compressing or decompressing a=C2=A0finite byte[] object (in contrast to= =C2=A0compressing/decompressing an InputStream or an OutputStream of unknow= n length) is actually a happy case because even PhantomReference object cou= ld be avoided, the native resources could be created and freed in a single = try-finally=C2=A0block. > =C2=A0 > Curator must avoid that. [https://github.com/ymnk/jzlib]=C2=A0is a potent= ial replacement, for example. > =C2=A0 > A similar issue could be also fixed in Apache Commons Compress: https://i= ssues.apache.org/jira/browse/COMPRESS-473=C2=A0and Curator is made to depen= d on Commons Compress. -- This message was sent by Atlassian JIRA (v7.6.3#76005)