Changing Memory Settings and JVM to JRockit for SOA Suite

I know there are many blogs out there that show how and where to change the memory configurations, .e.g. increase /  decrease or swap between Sun and JRockit JVM. The reason for this post is more for me to have a reference easy to find, but it brings a few concepts together which are usually found in 2 or 3 blog posts:

  • Memory modification
  • Swapping JVM provider
  • Node manager support

Many of the post out there are for changing the memory settings when running via the startWeblogic.sh script. Although this post will support running via the script it is more about starting via Node Manager.

For the purpose of this post I'm using the scripts developed in my post Startup Scripts for Weblogic and SOA Suite

Firstly we want to change the memory settings for the JVM. This is done in the setSOADomainEnv.sh script.

Make a copy of the file the open for modification:

$MW_HOME/user_projects/domains/soa_domain/bin/setSOADomainEnv.sh

Look for the lines:

DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
PORT_MEM_ARGS="-Xms768m -Xmx1536m"

Comment these lines out and add the following straight after, e.g.

#DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
#PORT_MEM_ARGS="-Xms768m -Xmx1536m"

if [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "soa_server1" ]; then
  DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
  PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then
  DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
  PORT_MEM_ARGS="-Xms768m -Xmx768m"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "bam_server1" ]; then
  DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
  PORT_MEM_ARGS="-Xms768m -Xmx768m"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "osb_server1" ]; then
  DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
  PORT_MEM_ARGS="-Xms768m -Xmx768m"
else
  DEFAULT_MEM_ARGS="-Xms768m -Xmx768m"
  PORT_MEM_ARGS="-Xms768m -Xmx768m"
fi

Depending on how you installed your environment you may need to add the JRockit home, this is done in the setDomainEnv.sh, as before make a copy and open the file for modification.

$MW_HOME/user_projects/domains/soa_domain/bin/setDomainEnv.sh

check the value for BEA_JAVA_HOME and make sure it is pointing to your JRockit location, e.g.

BEA_JAVA_HOME="/u01/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0"
export BEA_JAVA_HOME

As I'm starting my SOA environment via load manager I need to make some additional changes.

The node manager properties need to be updated

$MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.properties

make sure the parameter StartScriptEnabled is set to true, e.g.

StartScriptEnabled=true

Also if you want to run JRockit you need to change the Java Homes

#javaHome=/u01/java/jdk1.6.0_38
javaHome=/u01/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
#JavaHome=/u01/java/jdk1.6.0_38/jre
JavaHome=/u01/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0/jre


The last file that needs modification is the commEnv.sh, to change the Java Home.

$WL_HOME/common/bin/commEnv.sh

Comment out the old JAVA_ HOME and JAVA_VENDOR to point to JRockit, Before:

if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then
  # Set up JAVA HOME
  JAVA_HOME="/u01/java/jdk1.6.0_38"
  # Set up JAVA VENDOR, possible values are
  #Oracle, HP, IBM, Sun ...
  JAVA_VENDOR=Sun
  # PRODUCTION_MODE, default to the development mode
  PRODUCTION_MODE=""
fi

After

if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then
  # Set up JAVA HOME
  #JAVA_HOME="/u01/java/jdk1.6.0_38"
  JAVA_HOME="/u01/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0"
  # Set up JAVA VENDOR, possible values are
  #Oracle, HP, IBM, Sun ...
  #JAVA_VENDOR=Sun
  JAVA_VENDOR=Oracle
  # PRODUCTION_MODE, default to the development mode
  PRODUCTION_MODE=""
fi

You should be now ready to start your environment. All servers should now start in JRockit, to test this you can run the command:

 ps -ef | grep soa_server1

It should have JRockit in the classpath.

Comments:

Hi

What is the equivalent JRockit version for jdk1.7.0_04.

Regards,
Tom

Posted by Tomas on August 03, 2013 at 12:47 AM GMT+13:00 #

Sorry for the late reply.

There will be no releases of JRockit for Java SE 7 and higher. The intention is to eventually merge some of JRockit's best features into Java SE itself -- probably around the Java 8 timeframe. For Java 7, please use Java SE (aka HotSpot)

cheers
James

Posted by James Taylor on August 06, 2013 at 10:28 PM GMT+13:00 #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Discussions and Examples using Oracle Fusion Middleware. Some image links are broken when using Firefox, Safari, and Chrome. If you want to see the full image please use IE.

Twitter:@james8001

tumblr hit counter vistors, thanks for your support

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today