Friday, May 14, 2010

Java parameters for WebLogic Server

There are many burning issues on going WebLogic based environments due to this Java parameters


Heap size in MEM

The USER_MEM_ARGS can be defined for WebLogic as follows as minimum requirement :

-Xms1024m The minimum size of JVM
-Xmx1024m The maximum size of JVM keeping the same as minimum will avoid number of GCs.
-XX:NewSize=512m The Young Generation (YG) space size
-XX:MaxNewSize=512m The maximum sise for Young Generation space
-XX:SurvivorRatio=6 There will be two (from, to) survivor spaces both will equal in space and one will be always empty for swapping which will be used after GC.


Perm space 

-XX:PermSize=128m The permanant space for static classes they will be loaded only once.
-XX:MaxPermSize=128m There could be chance of increase of classes as the application functionality increased widely.

Troubleshoot OOM errors
In production or Development environment if there is issue with memory we need to have a snapshot of how the JVM is occupied this we can get by command line with passing WebLogic process id. Other option is that we can have it in the JAVA_OPTION because it will capture the heap dump automatically as on when there is   memory issue.

-XX:+HeapDumpOnOutOfMemoryError This parameter will be used whenever OOME encountered by instances heap dump will be take automatically
-XX:+DisableExplicitGC This parameter will restrict the external Garbage collection programs from explicit

GC Algorithms

We have three options of GC algorithms Serial, Parallel, Concurrent Mark Sweep. Most of WebLogic production environments prefers CMS.

-XX:+UseConcMarkSweepGC The GC algorithm you can choose other ways as per your application need.
-verbose:gc The GC functionality will be traced with this parameter

While debugging the GC issue, you might need to know that how frequently GC happen for WebLogic instance. the following options is going to help you.

-XX:+PrintGCTimeStamps This will print the timestamp of minor GC happen

-XX:+PrintGCDetails This will write to GC logs about Eden, Young, Perm space details
-XX:+PrintGCApplicationStoppedTime Whenever Full GC happen there will be pause for the application execution that will be written to logs
-XX:+PrintHeapAtGC Current JVM space details after Full GC.

We can collect the GC logs in a separate file by this argument it takes absolute path.
-Xloggc:/$HOME/logs/instance_GCoutput.log GarbageCollection log path can be specified by this.

-Xint interpreter-only mode for JIT this is introduced in mixed mode JVMs.


2. IBM DeveloperWorks :
5. JVM Options -Xint

Blurb about this blog

Blurb about this blog

Essential Middleware Administration takes in-depth look at the fundamental relationship between Middleware and Operating Environment such as Solaris or Linux, HP-UX. Scope of this blog is associated with beginner or an experienced Middleware Team members, Middleware developer, Middleware Architects, you will be able to apply any of these automation scripts which are takeaways, because they are generalized it is like ready to use. Most of the experimented scripts are implemented in production environments.
You have any ideas for Contributing to a Middleware Admin? mail to me