How to Set JVM Options for Jaspersoft Servers

Document ID : KB000033213
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

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.

Answer: 

  1. For Windows 
  •  Open this file for editing:
  •  cd <js-install>/apache-tomcat/bin/ setclasspath.bat
  •  Look for JAVA_OPTS
  •  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"
  • Update this line to increase the maximum heap size from 2048M to 3072M, for example: -Xmx3072M

 

  1. For Linux –
  • Open this file for editing:
  • cd <js-install>/apache-tomcat/bin/ setclasspath.sh
  • Look for JAVA_OPTS
  • 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"
  • Update this line to increase the maximum heap size from 2048M to 3072M, for example: -Xmx3072M
  1. For Tomcat as Windows service
  •  Open this file for editing:
  • cd <js-install>/apache-tomcat/bin/service.bat
  • 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
  • Update this line to increase the maximum heap size from 2048M to 3072M, for example: -Xmx3072M

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