Search code examples
ignite

why Ignite server shows heap usage without any activity?


Ignite version : 2.12 OS : Windows 10

I am trying to understand ignites heap usage. I started Ignite server with below command and no special vm args. As suggested by https://ignite.apache.org/docs/latest/quick-start/java

   ignite.bat -v ..\examples\config\example-ignite.xml

Post that started analyzing heap usage of same with visualvm tool and the heap usage looks like this

Next thing that I tried is increase the heap memory and restart the server. Surprisingly Now ignite is consuming even more memory as seen in this graph

I Know the GC is working its way to clear the heap, but why does ignite memory consumption increases with increase in heap space ?

How will this impact a server with ~40-60G memory, how much memory I can expect to be consumed by Ignite?

I'm planning to use ignite as in memory cache along with Cassandra as DB.


Solution

  • Just like Cassandra, Hadoop or Kafka, Ignite is a Java middleware that uses the Java Heap for various needs. But your data is always stored in an off-heap memory that allows utilizing all available memory space without worrying about garbage collection. This gives Ignite complete control over how the data is managed, and ensures the long-term performance of the system.

    Ignite uses a page memory model for storing everything, including user data, indices, meta information, etc. This allows Ignite to utilize memory management, improve performance and it also can use the whole disk without any data modifications.

    In other words, you might think that direct page memory access is being performed by memory pointers (outside of JVM), but some internal tasks like bootstrapping Ignite itself, performing local SQL processing tasks, etc. do require JVM heap because Ignite itself is written in Java.

    Check this and that pages for details.

    How will this impact a server with ~40-60G memory, how much memory I can expect to be consumed by Ignite?

    You would need 40-60 GB of RAM + something for JVM itself (Java heap), recommended values might differ, but 2GB of Java heap should be enough.