From issues-return-88389-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Fri Jan 18 09:48:51 2019 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 91481180647 for ; Fri, 18 Jan 2019 09:48:50 +0100 (CET) Received: (qmail 52744 invoked by uid 500); 18 Jan 2019 08:48:49 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 52734 invoked by uid 99); 18 Jan 2019 08:48:49 -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; Fri, 18 Jan 2019 08:48:49 +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 DD01CD1FDF for ; Fri, 18 Jan 2019 08:48:48 +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 aZypHxaPpxcr for ; Fri, 18 Jan 2019 08:48:47 +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 EF3875FCBA for ; Fri, 18 Jan 2019 08:40:00 +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 7153BE2690 for ; Fri, 18 Jan 2019 08:40:00 +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 376A62565C for ; Fri, 18 Jan 2019 08:40:00 +0000 (UTC) Date: Fri, 18 Jan 2019 08:40:00 +0000 (UTC) From: "Pavel Voronkin (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-10877) GridAffinityAssignment.initPrimaryBackupMaps memory pressure 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/IGNITE-10877?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 745911#comment-16745911 ]=20 Pavel Voronkin commented on IGNITE-10877: ----------------------------------------- 64k parts, 4k nodes=C2=A0 HashSets !image-2019-01-18-11-38-39-410.png! BitSets !image-2019-01-18-11-36-57-451.png! =C2=A0 We see that=C2=A0HashSet is the clear winner on high number of cluster node= s, alongside with high number of partitions. =C2=A0 > GridAffinityAssignment.initPrimaryBackupMaps memory pressure > ------------------------------------------------------------ > > Key: IGNITE-10877 > URL: https://issues.apache.org/jira/browse/IGNITE-10877 > Project: Ignite > Issue Type: Improvement > Reporter: Pavel Voronkin > Assignee: Pavel Voronkin > Priority: Major > Attachments: grid.srv.node.1.0-29.12.2018-12.50.15.jfr, image-201= 9-01-17-12-58-07-382.png, image-2019-01-17-12-59-52-137.png, image-2019-01-= 17-15-45-49-561.png, image-2019-01-17-15-45-53-043.png, image-2019-01-17-15= -46-32-872.png, image-2019-01-18-11-36-57-451.png, image-2019-01-18-11-38-3= 9-410.png > > Time Spent: 1.5h > Remaining Estimate: 0h > > 1) While running tests with JFR we observe huge memory allocation pressur= e produced by: > *Stack Trace TLABs Total TLAB Size(bytes) Pressure(%)* > java.util.HashMap.newNode(int, Object, Object, HashMap$Node) 481 298 044 = 784 100 > java.util.HashMap.putVal(int, Object, Object, boolean, boolean) 481 298 = 044 784 100 > java.util.HashMap.put(Object, Object) 481 298 044 784 100 > java.util.HashSet.add(Object) 480 297 221 040 99,724 > org.apache.ignite.internal.processors.affinity.GridAffinityAssignment.in= itPrimaryBackupMaps() 1 823 744 0,276 > org.apache.ignite.internal.processors.affinity.GridAffinityAssignment.(AffinityTopologyVersion, List, List) 1 823 744 0,276 > *Allocation stats* > Class Average Object Size(bytes) Total Object Size(bytes) TLABs Average T= LAB Size(bytes) Total TLAB Size(bytes) Pressure(%) > java.util.HashMap$Node 32 15 392 481 619 635,726 298 044 784 32,876 > java.lang.Object[] 1 470,115 461 616 314 655 019,236 205 676 040 22,687 > java.util.HashMap$Node[] 41 268,617 6 149 024 149 690 046,067 102 816 86= 4 11,341 > java.lang.Integer 16 1 456 91 662 911,385 60 324 936 6,654 > java.util.ArrayList 24 1 608 67 703 389,97 47 127 128 5,198 > 2) Also another hot place found > Stack Trace TLABs Total TLAB Size(bytes) Pressure(%) > java.util.ArrayList.grow(int) 7 5 766 448 9,554 > java.util.ArrayList.ensureExplicitCapacity(int) 7 5 766 448 9,554 > java.util.ArrayList.ensureCapacityInternal(int) 7 5 766 448 9,554 > java.util.ArrayList.add(Object) 7 5 766 448 9,554 > org.apache.ignite.internal.processors.cache.distributed.dht.topology.Gri= dDhtPartitionTopologyImpl.nodes(int, AffinityTopologyVersion, GridDhtPartit= ionState, GridDhtPartitionState[]) 7 5 766 448 9,554 > The reason of that is defail > I think we need to improve memory efficiency by switching from from Sets = to BitSets > =C2=A0 > JFR attached, see Allocations in 12:50:28 - 12:50:29 > =C2=A0 > =C2=A0 > =C2=A0 > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)