eMarcel.com

Oracle Database, Fusion Middleware, Linux

JVM memory allocation between the managed servers in WLS 10.3

Oracle WebLogic Server 10.3 comes with default configuration of the JVM memory distribution between the managed servers. Assuming we have the “AdminServer” and one managed server “SOA_Server1” in “soadomin” domain, the JVM memory allocation will be the same for all servers by default.

In order to tune the JVM memory allocation for all managed servers and allocate desired amount of memory per a managed server an update of the configuration file can be performed.

Example configuration files in <MIDDLEWARE_HOME>/domains/soadomain/bin
Linux OS    : setSOADomainEnv.sh
Win OS      : setSOADomainEnv.cmd

Memory allocation will be set as follow
AdminServer     = 768MB
SOA_Server1    = 2048MB (2g)
Default memory = 1024MB (1g)

  • Entries for Linux:
if [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "SOA_Server1" ]; then
    DEFAULT_MEM_ARGS="-Xms2g -Xmx2g"
    PORT_MEM_ARGS="-Xms2g -Xmx2g"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then
    DEFAULT_MEM_ARGS="-Xms768m -Xmx768m"
    PORT_MEM_ARGS="-Xms768m -Xmx768m"
else
    DEFAULT_MEM_ARGS="-Xms1g -Xmx1g"
    PORT_MEM_ARGS="-Xms1g -Xmx1g"
fi

Linux WLS Cluster:

if [ "${SERVER_NAME}" = "SOA_Server1" ] || [ "${SERVER_NAME}" = "SOA_Server2" ]; then
     DEFAULT_MEM_ARGS="-Xms2g -Xmx2g"
     PORT_MEM_ARGS="-Xms2g -Xmx2g"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ];then
     DEFAULT_MEM_ARGS="-Xms768m -Xmx768m"
     PORT_MEM_ARGS="-Xms768m -Xmx768m"
else
     DEFAULT_MEM_ARGS="-Xms1g -Xmx1g"
     PORT_MEM_ARGS="-Xms1g -Xmx1g"
fi
  • Entries for Windows

(In section :OracleJVM)

:OracleJVM

...
...

if "%SERVER_NAME%"=="AdminServer" (
   set USER_MEM_ARGS=-Xms768m -Xmx768m
   set PORT_MEM_ARGS=-Xms768m -Xmx768m

) else (
   set USER_MEM_ARGS=%DEFAULT_MEM_ARGS%
   set PORT_MEM_ARGS=%PORT_MEM_ARGS%
)

if "%SERVER_NAME%"=="SOA_Server1" (
   set USER_MEM_ARGS=-Xms2g -Xmx2g
   set PORT_MEM_ARGS=-Xms2g -Xmx2g
) else (
   set USER_MEM_ARGS=%DEFAULT_MEM_ARGS%
   set PORT_MEM_ARGS=%PORT_MEM_ARGS%
)

Start the WLS environment and test settings:

[[email protected] ~]$ ps auxww |grep java

 

(Visited 248 times, 1 visits today)

, ,

Tweet
Share
+1
Share
0 Shares

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close