Saturday, December 19, 2009

Tweaking JVM parameters for admin and managed server

If we want to give different memory arguments (preferably -Xms and -Xmx) for Admin server and Managed server, both are on same box.

We cannot provide the arguments in startManagedWeblogic.cmd script since it calls startWeblogic file which in turn calls setDomainEnv script.

If we set the parameters in setDomainEnv script then it will get reflected on both the servers (Admin and Managed server).

Solution: To tweak the JVM parameters, create the scripts as follows, for example:

startAdminWithCustomMemArgs.cmd that does the following:

set USER_MEM_ARGS=-Xms256m -Xmx512m
startWeblogic.cmd

And similarly for a managed instance:

startMgdWithCustomMemArgs.cmd:

set USER_MEM_ARGS=-Xms512m -Xmx1024m
startManagedWeblogic.cmd MS1

In the second script above “MS1” is the name of the managed server.

No comments:

Post a Comment