Changing the Java VM Memory Limits in Pentaho BI
You can find docs biserver-ce\tomcat\webapps\pentaho\docs\
Changing the Java VM Memory Limits
If you are running out of memory even though
your server has a lot of RAM, you probably need to increase the resources
allocated to the JRE instance that runs the Pentaho software you're trying to
improve performance on. Adjusting the memory limit is an easy configuration
change to make, but the instructions differ depending on the client tool or Web
application server you're using. Refer only to the sections below that apply to
your situation.
Note: If you
are running multiple Pentaho programs concurrently, the sum of their JVM
maximum memory limits must not exceed the available RAM minus system overhead.
Increasing Memory Limits on Microsoft
Windows with a Graphical Installation
By default, Tomcat has a relatively low memory
allotment. This can cause out-of-memory errors in the BA Server fromtime to
time. The below instructions will explain how to increase the memory so you
don't get this error. Instructions are also included for renaming the tomcat6
executable file so that BA Server starts automatically.
These instructions are for those who
installed Pentaho Business Analytics graphically (as opposed to manually) and
are Windows users.
1. Go to
the Windows Search Box and enter C:\Program Files\pentaho\server\biserver-ee\tomcat\bin\shutdown.bat to shutdown the Pentaho BA Server.
2. Type services.msc into
the Windows Search Box.
3. Find the
Pentaho Server name (Pentaho BA Server or Pentaho BI Server) and
open it so you can find the servicename. The service name should
appear at the top of the first tab (General). It will be pentahobaserver.
4. Go into
the bin file (C:\Program
Files\pentaho\server\biserver-ee\tomcat\bin\) and
rename the tomcat6w.exe file to match the service name (pentahobaserver
or pentahobiserver). This will ensure that the server starts with
the software.
5. After
you have renamed the file, open it by double-clicking on it. This will not open
the file, it will allow you to edit it. The Properties Window will open.
6. Select
the Java tab.
7. Set the
memory setting to a minimum of 4096 M and a maximum of 6144 M,
depending on your computer's memory capabilities.
8. Start
the Tomcat server or service.
Your Tomcat server now has increased minimum
and maximum memory limits. You can adjust the JvmMx number, which is a
parameter that specifies the maximum limit, to a higher number if you prefer.
However, if the java virtual machine refuses to start with increased limits,
then you will have to add more RAM to your system, stop some memory intensive services,
or reduce the maximum memory limit to a lower number. This problem occurs when
there is not enough contiguous memory available to assign to the JVM.
Increasing Memory Limits on Linux with a
Graphical Install
By default, Tomcat has a relatively low
memory allotment. This can cause out-of-memory errors in the BA Server fromtime
to time. To avoid errors, increase the memory allocation so you can start the
BA Server automatically.
These instructions apply if you installed
Pentaho Business Analytics using the graphical installer as opposed
to manual installer and are Linux users.
1. Go to /pentaho/server/biserver-ee/tomcat/bin/
directory and run the ./shutdown.sh command
to stop the appropriate server.
2. Change
the directory to biserver-ee/tomcat/scripts.
3. Edit the
ctl.sh file.
4. Locate
the line under start tomcat, which looks like this: export JAVA OPTS="-
Dpentaho.installed.licenses.file=/opt/pentaho/.insalledLicenses.xml
-Xms128m
Xmx768m
-XX-MaxPermSize=256m -Dsun.rmi.dyc.client.gcInterval=3600000 -
Dsun.rmi.dgc.server.gcInterval=3600000"
5. Set the
memory to a minimum of 4096 M and a maximum of 6144 M, depending
on your computer's memory capabilities.
6. Start
the Tomcat server or service.
Your Tomcat server now has increased minimum
and maximum memory limits. You can adjust the JvmMx parameter to specify a
higher maximum limit if you prefer. However, if the Java virtual machine
refuses to start with increased limits, then you will have to add more RAM to your
system, stop some memory-intensive services, or reduce the maximum memory limit
to a lower number. This problem occurs when there is not enough contiguous
memory available to assign to the JVM, and appears to happen more often on
Microsoft Windows at lower thresholds than on other operating
systems.
Increasing Memory Limits with an Archive or
Manual Deployment
By default, Tomcat has a relatively low
memory allotment. This can cause out-of-memory errors in the BA Server fromtime
to time. To increase the memory limit, follow the below process.
1. Stop the
Tomcat server or service.
2. Because you are modifying your own Tomcat
instance and have performed a manual deployment of the
BA Server WAR, edit the ~/.bashrc for the user account that starts the Tomcat service, or
whatever configuration file or dialogue that contains global system variables
on your BA Server machine. Set or modify the CATALINA_OPTS system
variable to include reasonable minimum and maximum memory settings using the -Xms
and -Xmx options.
export
CATALINA_OPTS="-Xms4096m -Xmx6144m"
3. If you are using a Pentaho-supplied Tomcat
instance provided in BA Server archive packages, edit
the startpentaho script (.bat for Windows, and .sh for Linux), and
modify the CATALINA_OPTS environment variable, adjusting the values of Xms
and Xmx in the same manner as the previous step.
export
CATALINA_OPTS="-XMs4096m -Xmx6144m -XX:MaxPermSize=6144m -
Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000"
4. If you
are modifying a Windows service for Tomcat, you must use the tomcat6.exe command
to reconfigure the service parameters within a command line window. You can
access Windows Services by going to the Windows
Start Menu and
typing services in the Search Programs and Files box. See the
below example.
Windows (this only applies to a Windows
service for Tomcat)
tomcat6
//US//Tomcat6 --JvmMs=4096m --JvmMx=6144m
5. Start
the Tomcat server or service.
Your Tomcat server now has increased minimum
and maximum memory limits. You can adjust the JvmMx number
(this parameter specifies the maximum limit)
to a higher number if you prefer. However, if the Java virtual machine refuses
to start with increased limits, then you will have to add more RAM to your
system, stop some memory-intensive services, or reduce the maximum memory limit
to a lower number. This problem occurs when there is not enough contiguous
memory available to assign to the JVM, and appears to happen on Windows at
lower thresholds than on other operating systems.
Increasing the Memory Limit in Aggregation
Designer
Pentaho Aggregation Designer's startup script
uses the default memory settings for your Java environment, which may be
insufficient for your work. If you're experiencing an OutOfMemory exception,
you must increase the amount of heap space available to Aggregation Designer by
changing the Java options that set memory allocation. Follow the directions below
to accomplish this.
Note: In the
examples below, the memory size notations are m for megabytes and g for
gigabytes. You can use whichever is most appropriate for your situation.
1. Exit
Aggregation Designer if it is currently running.
2. Edit the
startaggregationdesigner script and modify your Java command to include
an -Xmx line that specifies a large upper memory limit.
Linux/Solaris shell script:
"$_PENTAHO_JAVA"
$LICENSEPARAMETER -Xmx2g -jar "$DIR/lib/launcher-1.0.0.jar"
Windows batch file:
"%_PENTAHO_JAVA%"
%LICENSEPARAMETER% -Xmx2g -jar "%~dp0lib\launcher-1.0.0.jar"
3. Start
Aggregation Designer and ensure that there are no memory-related exceptions.
The Java virtual machine instance that
Aggregation Designer uses now has access to more heap space, which should solve
OutOfMemory exceptions and increase performance.
Increasing the Memory Limit in PDI
Pentaho Data Integration's startup script
uses the default memory settings for your Java environment, which may be
insufficient for your work. If you're experiencing an OutOfMemory exception,
you must increase the amount of heap space available to PDI by changing the
Java options that set memory allocation. Follow the directions below to accomplish
this.
Note: In the
examples below, the memory size notations are m for megabytes and g for
gigabytes. You can use whichever is most appropriate for your situation.
1. Exit
Spoon if it is currently running.
2. Edit
your Spoon startup script and modify the -Xmx value in the OPT variable
so that it specifies a large upper
memory limit.
Linux/Solaris shell script:
OPT="$OPT
-Xmx2g -Xms256m -XX:MaxPermSize=128m -Djava.library.path=$LIBPATH -
DKETTLE_HOME=$KETTLE_HOME
-DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=
$KETTLE_USER
-DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=
$KETTLE_PLUGIN_PACKAGES
-DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT"
Windows batch file:
set
OPT="-Xmx2g" "-XX:MaxPermSize=256m"
"-Djava.library.path=%LIBSPATH%"
"-DKETTLE_HOME=%KETTLE_HOME%"
"-DKETTLE_REPOSITORY=%KETTLE_REPOSITORY%"
"-DKETTLE_USER=%KETTLE_USER%"
"-DKETTLE_PASSWORD=%KETTLE_PASSWORD%" "-
DKETTLE_PLUGIN_PACKAGES=%KETTLE_PLUGIN_PACKAGES%"
"-DKETTLE_LOG_SIZE_LIMIT=
%KETTLE_LOG_SIZE_LIMIT%"
3. Start
Spoon and ensure that there are no memory-related exceptions.
The Java virtual machine instance that PDI
uses now has access to more heap space, which should solve OutOfMemory
exceptions and increase performance.
Increasing the Memory Limit in Report
Designer
Pentaho Report Designer's startup script uses
the default memory settings for your Java environment, which may be insufficient
for your work. If you're experiencing an OutOfMemory exception, you must
increase the amount of heap space available to Report Designer by changing the
Java options that set memory allocation. Follow the directions below to
accomplish this.
Note: In the
examples below, the memory size notations are m for megabytes and g for
gigabytes. You can use whichever is most appropriate for your situation.
1. Exit
Report Designer if it is currently running.
2. Edit the
report-designer script and modify the value of -Xmx to allocate
more memory to Report Designer's JVM instance.
Linux/Solaris shell script:
"$_PENTAHO_JAVA"
"-Dpentaho.installed.licenses.file=$PENTAHO_INSTALLED_LICENSE_PATH"
-XX:MaxPermSize=256m
-Xmx2g -jar "$DIR/launcher.jar" $@
Windows batch file:
set
OPT="-XX:MaxPermSize=256m" "-Xmx2g"
3. Start
Report Designer and ensure that there are no memory-related exceptions.
The Java virtual machine instance that Report
Designer uses now has access to more heap space, which should solve
OutOfMemory exceptions and increase
performance.
Increasing the Memory Limit in Weka
Weka uses the memory settings passed to it
from the Java command line or the script that invokes it. If you're experiencing
an OutOfMemory exception, you must increase the amount of heap space available
to Weka by changing the Java options that set memory allocation. Follow the
directions below to accomplish this.
Note: In the
examples below, the memory size notations are m for megabytes and g for
gigabytes. You can use whichever is most appropriate for your situation.
1. Exit
Weka if it is currently running.
2. If you
are running Weka standalone from the command line, modify your Java command to
include an -Xmx line that specifies a large upper memory limit.
java -Xmx2g
weka.jar
3. If you
are running Weka as part of a script, change your Java invocation so that it
includes the above -Xmx setting.
4. Start
Weka and ensure that there are no memory-related exceptions.
The Java virtual machine instance that Weka
uses now has access to more heap space, which should solve OutOfMemory
exceptions and increase performance.
Comments
Post a Comment