IBM Increasing Java Heap Memory in IBM Tivoli Common Reporting 2.1/2.1.1 - United States TCR - Tivoli Common Reporting TECHNOTE (FAQ)

QUESTION
 How to increase Java heap memory size in IBM Tivoli Common Reporting (TCR) 2.1/2.1.1 versions?

CAUSE
Running a large scale report with Default java heap settings might result in OutOfMemory error

ANSWER
TCR 2.1/2.1.1 server provides a default setting for heap size, a minimum size (xms) of 512MB and a maximum size (xmx) of 1024MB.

In order to change the heap memory size, execute the following command:
<INST>/tipv2/bin/wsadmin.sh[.bat] -user <USERNAME> -password <PASSWORD> -f <INST>/tipv2/profiles/TIPProfile/bin/changeMem.py --xms <MINVALUE> --xmx <MAXVALUE>

where <INST> is the TCR Installation folder like /opt/IBM/tivoli
<MINVALUE> can be 1024 and <MAXVALUE> can be 1843 (1GB and 1.8GB respectively)

NOTE: In order to avoid OutOfMemory error, it is recommended to be within the 2GB limit (for 32 bit architectures - maximum memory can be 2^32)
For 64-bit JVM, the maximum heap value can be upto 50% of the available physical memory. Reason being maximum memory will be 2^64 which is 16 exabytes which is a very huge number!
1 exabyte = 1024*1024*1024 Gigabyte!
Please refer to the links provided in the 'Related Infomation' section to learn more on the Java sizing and heap information.

To test the JVM's maximum heap memory support, please follow the below test:
a) Open command line / shell script and navigate to <INST>/tipv2/java/jre/bin folder
b) Execute this command: java -Xmx1843m hello
- if java accepts this 1.8GB setting, then it will throw the "class not found" error for hello
- if java does not accept this value, then it gives the "Initialization error" and "Failed to instantiate heap" message!
- You can try to increase the value of Xmx and see where it breaks
- For 32-bit JVM, it is not advised to set this value beyond 1843m but for 64-bit JVM, value can be upto 50% of the available physical memory.

After setting the new values, restart the TCR server for the changes to take effect.

RELATED INFORMATION
 Sizing the Java Heap [http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=%2Fcom.ibm.java.doc.igaa%2F_1vg000139b8b453-11951f1e7ff-8000_1001.html]
Java code to Java Heap [http://www.ibm.com/developerworks/java/library/j-codetoheap/index.html]

Question: ITMv6 issue: Cognos reports run for an extended period, sometimes never finishes ITMv6 issue: Cognos reports run for an extended period, sometimes never finishes

Answer: TCR 2.1/2.1.1 server provides a default setting for heap size, a minimum size (xms) of 512MB and a maximum size (xmx) of 1024MB.