Search code examples
jvmignitejvm-hotspotjvm-argumentsgridgain

How to run Ignite with defined JVM heap


Currently Ignite is taking the default installed OpenJDK 11 JVM heap size. Now, I want to define the JVM initial and max heap size for Ignite Instance. Where exactly I need to define so that it will take the defined JVM heap config to run.


Solution

  • You can use -Xms, -Xmx to set JVM memory parameters.

    Here is more information: https://apacheignite.readme.io/docs/jvm-and-system-tuning and: https://apacheignite.readme.io/docs/preparing-for-production

    JDK 11 specific: https://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm#PERFM160

    In the Ignite logs you could see how much memory was allocated along with other parameters: look for these lines:

    [IgniteKernal] Language runtime: Java Platform API Specification ver. 11 
    
    [IgniteKernal] VM information: Java(TM) SE Runtime Environment 11.0.4+10-LTS Oracle 
    Corporation Java HotSpot(TM) 64-Bit Server VM 11.0.4+10-LTS
    
    [IgniteKernal] VM total memory: 1.0GB
    
    [IgniteKernal] VM arguments: [-Xms1g, -Xmx1g, ...