Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-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 AF458187C8 for ; Wed, 17 Feb 2016 05:14:37 +0000 (UTC) Received: (qmail 45902 invoked by uid 500); 17 Feb 2016 05:14:37 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 45861 invoked by uid 500); 17 Feb 2016 05:14:37 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 45851 invoked by uid 99); 17 Feb 2016 05:14:37 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2016 05:14:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 142791804EF for ; Wed, 17 Feb 2016 05:14:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.173 X-Spam-Level: ** X-Spam-Status: No, score=2.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HckfvZrm_sk4 for ; Wed, 17 Feb 2016 05:14:36 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id DB8CB5FE19 for ; Wed, 17 Feb 2016 05:14:35 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id 6000520E65C6 for ; Tue, 16 Feb 2016 21:07:52 -0800 (PST) Date: Tue, 16 Feb 2016 21:02:34 -0800 (PST) From: vkulichenko To: user@ignite.apache.org Message-ID: <1455685354714-3050.post@n6.nabble.com> In-Reply-To: <1455677540081-3049.post@n6.nabble.com> References: <1455677540081-3049.post@n6.nabble.com> Subject: Re: Huge heap size for ignite cache when storing 20 million objects of small size MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi vidhu, First of all, can you please subscribe to the mailing list so that community receives email notifications? Please follow this simple instruction: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1 vidhu wrote > I am facing a problem where my heap reaches to about 2.8 gb when I am > storing 20 million objects. Size of each object is approx. 462 bytes. > Structure of my object is a simple pojo having 101 fields each of int > type. > > I tried using following 3 marshalling techniques: > > 1.) Default marshaller of Ignite. (Size of heap ~ 2.8 gb, looking with > Visual VM find that most of objects on heap are byte array.) > > 2.) Optimized marshaller. (Again size was ~ 2.8 gb, looking with Visual VM > find that this time size of objects on heap of byte array is half + there > are lot of objects of class that I put in cache. ) > > 3.) Tried implementing Binarylizable in my class that I am storing in > cache. I used rawWriter. This time size reduced considerably but I was not > able to read values out of cache, (getting null on read). > > I am implementing this in java version 1.8. 20,000,000 * 462 bytes is already around 8.6GB of memory, so 2.8 is not enough even without Ignite's overhead. Did you try to allocate more heap memory and/or start more nodes? With your sizings I would start with two nodes, 8GB of memory per node. As for options you tried, I would recommend to use default binary marshaller because it's much more compact. Also you should take a look at offheap memory [1]. It can be useful if you're going to have a lot of data. [1] https://apacheignite.readme.io/docs/off-heap-memory -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Huge-heap-size-for-ignite-cache-when-storing-20-million-objects-of-small-size-tp3049p3050.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.