There has always been complaints by developers regarding low memory warning or slowness in JDeveloper and Integrated Weblogic Server, especially while in debug mode or using ODL Log Analyzer :-(
So am just going to jot down few details which might help to alleviate these issues.
JDeveloper Installation -
Default Jdeveloper windows/linux runnable verion ships with 32 bit JDK (Java 1.6).
Most of the latest development laptops have more than 4 gig memory, In that case 32 bit JDK will not be able to utilize memory addresses higher than 2^32..
So if you have a 64bit OS and more than 4GB of RAM
You can download JDeveloper in jar format and install it with 64 bit JVM (Java).

Make sure you download the version of JAVA that is matching your weblogic in HIGHER Environments.
Eg: In my previous project, higher environments were running on JDK 1.60_45 so i used same version of 64 bit JDK for my local environment.
JDeveloper Memory Tuning -
1) Go to MW_HOME \jdeveloper\ide\bin\ide.conf and increase the Max heap size (Xmx).
In my opinion you can set it to (Total RAM/2).
AddVMOption -Xmx4096M
// Point it to 64 bit JDK you have installed in step 1
//Adds a memory monitor which helps in check current heap used by //JDEV, we can also do a force GC with this feature
AddVMOption -DMainWindow.MemoryMonitorOn=true
//ADD the following JVM options towards the end of file
AddVMOption -XX:+UseStringCache
AddVMOption -XX:+OptimizeStringConcat
AddVMOption -XX:+UseCompressedStrings
AddVMOption -XX:+UseCompressedOops
AddVMOption -XX:+AggressiveOpts
AddVMOption -XX:+UseConcMarkSweepGC
AddVMOption -DVFS_ENABLE=true
AddVMOption -Dsun.java2d.ddoffscreen=false
AddVMOption -XX:+UseParNewGC
AddVMOption -XX:+CMSIncrementalMode
AddVMOption -XX:+CMSIncrementalPacing
AddVMOption -XX:CMSIncrementalDutyCycleMin=0
AddVMOption -XX:CMSIncrementalDutyCycle=10
Integrated Weblogic Tuning -
You can increase the heap parameters of integrated weblogic server
to address slowness while debugging applications.
Go to C:\Users\<UserName>\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\bin\setDomainEnv.cmd
If you are using 64 bit JVM then make sure you have below settings. Skip this step if you want to continue with 32 bit jvm.
Since I use a 64bit Sun JVM, I changed the value of XMX_SUN_64BIT.
Based on your JVM configuration modify the appropriate attribute.
Increase your PERM Size -
Alternatively you can use
set USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
below this line in cmd file
@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values.
Finally you can start your weblogic server and verify if changes are reflected -
Note: Don't increase your integrated server heap to higher values than necessary because higher the heap size -> higher GC pause time:-) In my opinion 1GB should be good enough.
Hope it helps :-)
So am just going to jot down few details which might help to alleviate these issues.
JDeveloper Installation -
Default Jdeveloper windows/linux runnable verion ships with 32 bit JDK (Java 1.6).
Most of the latest development laptops have more than 4 gig memory, In that case 32 bit JDK will not be able to utilize memory addresses higher than 2^32..
So if you have a 64bit OS and more than 4GB of RAM

Make sure you download the version of JAVA that is matching your weblogic in HIGHER Environments.
Eg: In my previous project, higher environments were running on JDK 1.60_45 so i used same version of 64 bit JDK for my local environment.
JDeveloper Memory Tuning -
1) Go to MW_HOME \jdeveloper\ide\bin\ide.conf and increase the Max heap size (Xmx).
In my opinion you can set it to (Total RAM/2).
AddVMOption -Xmx4096M
Note: I have 64bit OS with 8GB RAM.
2) Go to MW_HOME \jdeveloper\jdev\bin\jdev.conf and set the following parameters
// Point it to 64 bit JDK you have installed in step 1
SetJavaHome C:\Program Files\Java\jdk1.6.0_45
// Increase your MaxPermSize
AddVMOption -XX:MaxPermSize=1024M//Adds a memory monitor which helps in check current heap used by //JDEV, we can also do a force GC with this feature
AddVMOption -DMainWindow.MemoryMonitorOn=true
//ADD the following JVM options towards the end of file
AddVMOption -XX:+UseStringCache
AddVMOption -XX:+OptimizeStringConcat
AddVMOption -XX:+UseCompressedStrings
AddVMOption -XX:+UseCompressedOops
AddVMOption -XX:+AggressiveOpts
AddVMOption -XX:+UseConcMarkSweepGC
AddVMOption -DVFS_ENABLE=true
AddVMOption -Dsun.java2d.ddoffscreen=false
AddVMOption -XX:+UseParNewGC
AddVMOption -XX:+CMSIncrementalMode
AddVMOption -XX:+CMSIncrementalPacing
AddVMOption -XX:CMSIncrementalDutyCycleMin=0
AddVMOption -XX:CMSIncrementalDutyCycle=10
Integrated Weblogic Tuning -
You can increase the heap parameters of integrated weblogic server
to address slowness while debugging applications.
Go to C:\Users\<UserName>\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\bin\setDomainEnv.cmd
If you are using 64 bit JVM then make sure you have below settings. Skip this step if you want to continue with 32 bit jvm.
Since I use a 64bit Sun JVM, I changed the value of XMX_SUN_64BIT.
Based on your JVM configuration modify the appropriate attribute.
Increase your PERM Size -
Alternatively you can use
set USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
below this line in cmd file
@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values.
Finally you can start your weblogic server and verify if changes are reflected -
Note: Don't increase your integrated server heap to higher values than necessary because higher the heap size -> higher GC pause time:-) In my opinion 1GB should be good enough.
Hope it helps :-)
No comments:
Post a Comment