JavaXmxTest

Overview

This script tests the maximum heap size available for your Java programs.

Example

./tool04_javaXmxTest.pl

Output:

The latest correct setting was '-Xmx2660m'.
Example: java -Xmx2660m -version

It means that approximately this is the largest amount of memory that Java can use. If you try to increase this amount, most probably you will get an error:

$ java -Xmx2700m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

What is it good for?

If you launch Coron on a large dataset then it will require lots of memory. So it's a good idea to give Java as much memory as possible.

Steps to follow (through a concrete example):

  • launch JavaXmxTest (in my case it indicates '-Xmx2660m')
  • check the host name of your machine (echo $HOSTNAME); my machine is called 'hoth'
  • edit common/assets/machines.sh and add the following line:
"hoth"                 )   JAVA_MAX_HEAP_SIZE=2600m;;

Of course, you will have to customize this line to your machine.

Since machines.sh is sourced into every launch script, all the modules of the Coron System will be able to use as much memory as possible.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License