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 3FEE6200D2E for ; Tue, 17 Oct 2017 01:36:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3E723160BE9; Mon, 16 Oct 2017 23:36:06 +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 849BF1609EF for ; Tue, 17 Oct 2017 01:36:05 +0200 (CEST) Received: (qmail 94694 invoked by uid 500); 16 Oct 2017 23:36:04 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 94685 invoked by uid 99); 16 Oct 2017 23:36:04 -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, 16 Oct 2017 23:36:04 +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 C59141A011A for ; Mon, 16 Oct 2017 23:36:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Da6JnQjv-Z8s for ; Mon, 16 Oct 2017 23:36:02 +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 8CE375FC8B for ; Mon, 16 Oct 2017 23:36: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 CDF42E0F1C for ; Mon, 16 Oct 2017 23:36: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 21AA924390 for ; Mon, 16 Oct 2017 23:36:00 +0000 (UTC) Date: Mon, 16 Oct 2017 23:36:00 +0000 (UTC) From: "Anilkumar Gingade (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (GEODE-3844) OffHeap region close could be more efficient in its memory usage. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 16 Oct 2017 23:36:06 -0000 Anilkumar Gingade created GEODE-3844: ---------------------------------------- Summary: OffHeap region close could be more efficient in its memory usage. Key: GEODE-3844 URL: https://issues.apache.org/jira/browse/GEODE-3844 Project: Geode Issue Type: Bug Components: offheap Reporter: Anilkumar Gingade Close on OffHeap region tries to copy OffHeap RegionEnties into array, which could take up lot of memory based on the region size. This could be optimized by working on the region map itself or by working on the entries per hashmap segment one at a time. java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3181) at java.util.ArrayList.grow(ArrayList.java:261) at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:235) at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:227) at java.util.ArrayList.add(ArrayList.java:458) at org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap$Segment.clear(CustomEntryConcurrentHashMap.java:1037) at org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.clear(CustomEntryConcurrentHashMap.java:1795) at org.apache.geode.internal.cache.AbstractRegionMap._mapClear(AbstractRegionMap.java:329) at org.apache.geode.internal.cache.AbstractRegionMap.clear(AbstractRegionMap.java:371) at org.apache.geode.internal.cache.AbstractLRURegionMap.clear(AbstractLRURegionMap.java:685) at org.apache.geode.internal.cache.AbstractRegionMap.close(AbstractRegionMap.java:337) at org.apache.geode.internal.cache.LocalRegion.closeEntries(LocalRegion.java:2703) at org.apache.geode.internal.cache.LocalRegion.recursiveDestroyRegion(LocalRegion.java:2664) at org.apache.geode.internal.cache.LocalRegion.basicDestroyRegion(LocalRegion.java:6184) at org.apache.geode.internal.cache.DistributedRegion.basicDestroyRegion(DistributedRegion.java:1707) at org.apache.geode.internal.cache.LocalRegion.close(LocalRegion.java:2206) -- This message was sent by Atlassian JIRA (v6.4.14#64029)