How to Set JVM Options for Jaspersoft Servers

book

Article ID: 33213

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction



How to Set JVM Options for Jaspersoft Servers: Java Virtual Machine (JVM) runtime parameters normally need to be explicitly set so that the memory settings have values that are larger than the default settings and required to achieve optimal performance.

     

     

    Environment

    Release: Any
    Component:

    Resolution

     
    For Windows 

    1. Open this file for editing:
     cd <js-install>/apache-tomcat/bin/ setclasspath.bat
    2. Look for JAVA_OPTS
    3. For Jaspersoft 6.2.1 look under d <js-install>/apache-tomcat/bin/setenv.bat
     SET "JAVA_OPTS=-Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
    4. Update this line to increase the maximum heap size from 2048M(default), for example: -Xmx10g


    For Linux –


    1. Open this file for editing:
    cd <js-install>/apache-tomcat/bin/ setclasspath.sh
    2. Look for JAVA_OPTS
    3. For Jaspersoft 6.2.1 look under d <js-install>/apache-tomcat/bin/setenv.sh
    SET "JAVA_OPTS=-Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
    4. Update this line to increase the maximum heap size from 2048M(default), for example: -Xmx10g



    For Tomcat as Windows service

    1.  Open this file for editing:
    cd <js-install>/apache-tomcat/bin/service.bat
    2. Look for the following line to change the JVM heap size, for example:
    "%EXECUTABLE%" //US//%SERVICE_NAME% --Startup auto --JvmOptions "-Xms1024M;-Xmx2048M;-Xss2M;-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm
    3. Update this line to increase the maximum heap size from 2048M(default), for example: -Xmx10g
    Notes: Because Tomcat is installed as a service, you need to re-install the service. From a Windows Command shell, enter these commands (Note: the cmd shell will disappear when these commands are run. You need to open a new cmd shell for each command.). To open a cmd shell: Start Menu > Run... > cmd

    Additional Information

     
    1. The JVM allocation are already optimized on SAAS Systems so no changes are required
    2. Before making any change please refer to Hardware Sizing for Jaspersoft Servers- Hardware Sizing for Jaspersoft
    3. For a Production Jaspersoft server we recommend at least 10GB of RAM allocated as JVM memory. Ensure your server has enough RAM to support this setting.