Search code examples
javaramignite

Setting RAM size for Ignite Compute Grid


I need to use Ignite Compute Grid to to perform RAM-heavy parallel computations. So I need to set the usable RAM of each ignite node to more than 4GB for example.

However, I can't find how to set this up.

Exemple : My ProcessIdentifier.getProcessID(i) method in the following code needs up to 4GB of RAM to be executed properly and to return a String object.

public static void main(String[] args) {
    Ignite ignite = Ignition.start();
    IgniteCompute compute = ignite.compute();

    Collection<IgniteCallable<String>> calls = new ArrayList<>();
    for (int i = 0; i<100; i++) {
        ProcessIdentifier pi = new ProcessIdentifier(i);
        calls.add(pi::getProcessID);
    }
    //sends the computation of the 100 pi.ProcessIdentifier(i) to the cluster nodes
    Collection<String> res = ignite.compute().call(calls);

    //print the results
    String total = res.toString(); 
    System.out.printf(total);
}

Could anyone help me figure it out ?


Solution

  • If you don't want to store anything in Ignite caches and use only Compute API, then only JVM heap increasing will be enough. To increase it you can modify line in ignite.sh script when java process starts using -Xmx parameter.