Hi!

We're seeing Ignite take a significant amount of memory on a per cache basis
(about 10 MB per cache), even when the caches have no entries at all, and
would like to understand how to reduce this footprint.

Before getting into the technical details, I would like to explain our use
case:  we're considering using Ignite's distributed cache for caching
entities in our J2EE application (basically beans and other data that does
not change very often).  This is kind of similar to Hibernate L2 Cache.  We
have approximately 200 different types of beans, and each bean type
typically has a few thousand instances.  One huge benefit of Ignite is that
we can use SQL queries against it, which have much lower latency than going
to the database layer.  So, we're thinking about this structure:
    - One cache per bean type.
    - The entries in a given cache will be of type Entry<Long, T> where the
key (of type Long) is the ID of the bean, and the value (of type T) is a
bean instance.
We expect the total heap footprint of all these caches together to be in the
neighborhood of 100MB or so.

The issue/problem at hand is that when we create 100 caches Ignite is
consuming over 1GB of heap, even without having any entries on the caches
themselves.  This is prohibitive for our intended use.  The bulk of the
memory is taken by org.apache.ignite.internal.util.GridCircularBuffer$Item.

I have attached the code we're using for this test, and the config file for
the Ignite server node so these conditions can be easily reproduced.  I'm
also attaching some pictures showing the memory allocation and the heap over
time.

We'd appreciate any suggestions and comments.  Thanks in advance.


CacheMemoryTest.java
<http://apache-ignite-users.70518.x6.nabble.com/file/n3682/CacheMemoryTest.java>
  

default-config.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n3682/default-config.xml>  

<http://apache-ignite-users.70518.x6.nabble.com/file/n3682/ignite_cache_node_heap_histogram.png>
 

<http://apache-ignite-users.70518.x6.nabble.com/file/n3682/ignite_cache_node_heap_timeline.png>
 





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-Cache-High-Memory-Overhead-caused-by-GridCircularBuffer-Item-instances-tp3682.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to