Increasing the Java Heap size for a Admin Server & managed server in Weblogic
As per performance tuning guidelines it is good practice to start Admin server with lower JVM heap size than your other managed servers because the Admin server doesn’t required much resources.
By doing this you can utilize the free memory with others where it is needed (This makes sense when you are running Admin and Managed servers on same host)
The size is set in the setDomainEnv.sh file for Linux or setDomainEnv.cmd for Windows, which is in the $DOMAIN_HOME/bin directory.
Steps to set the heap size for Admin and managed server:
1. Shutdown Admin and Managed servers
2. Take backup of setDomainEnv.sh or setDomainEnv.cmd file in case something goes wrong, you can revert the changes. It is best practice to take backup before you made changes in the servers.
3. Open setDomainEnv file that is under the $DOMAIN_HOME/bin directory.
4. Copy and paste the below lines in the setDomainEnv file. Make sure you paste the below line at suitable location.
#In case of Admin Server
if [ "${SERVER_NAME}" == "AdminServer" ] ; then
USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"
export USER_MEM_ARGS
fi
#In case of osb_server1 Server
if [ "${SERVER_NAME}" == "osb_server1" ] ; then
USER_MEM_ARGS="-Xms512m -Xmx4096m -XX:MaxPermSize=4096m"
export USER_MEM_ARGS
fi
Xms: The initial heapsize
Xmx: The max heapsize
5. Start the Admin server and Managed server.
6. Verify the changes via weblogic console or in logs.
great post!
Muy buena información entregada en esta discusión, muy clara y concisa, me gustó tu blog , muy interesante el tema del cual hay mucho por aprender
Quiero dejar esta página en la cual puedes ver productos de los retail de todo Chile,
y comparar los precios de catálogo unimarc con las otras tiendas
Hi
where is suitable location ? Because I have duplicate parameter Xms, Xmx and I don't know which one is use ?
weblogic@testhost:~$ pargs 16578
16578: /weblogic/jdk1.6.0_38/bin/java -server -Xms512m -Xmx1024m -XX:MaxPermSi
argv[0]: /weblogic/jdk1.6.0_38/bin/java
argv[1]: -server
argv[2]: -Xms512m
argv[3]: -Xmx1024m
argv[4]: -XX:MaxPermSize=256m
argv[5]: -Xms1536m
argv[6]: -Xmx1536m
argv[7]: -Dweblogic.Name=AdminServer
argv[8]: -Djava.security.policy=/weblogic/oracle/middleware/wlserver_10.3/server/lib/weblogic.policy
argv[9]: -Dweblogic.ProductionModeEnabled=true
argv[10]: -da
argv[11]: -Dcom.sun.management.jmxremote=true
argv[12]: -Dcom.sun.management.jmxremote.port=10052
argv[13]: -Dcom.sun.management.jmxremote.ssl=false
argv[14]: -Dcom.sun.management.jmxremote.authenticate=false
argv[15]: -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
argv[16]: -Dplatform.home=/weblogic/oracle/middleware/wlserver_10.3
argv[17]: -Dwls.home=/weblogic/oracle/middleware/wlserver_10.3/server
argv[18]: -Dweblogic.home=/weblogic/Oracle/Middleware/wlserver_10.3/server
argv[19]: -Dweblogic.management.discover=true
argv[20]: -Dwlw.iterativeDev=false
argv[21]: -Dwlw.testConsole=false
argv[22]: -Dwlw.logErrorsToConsole=false
argv[23]: -Dweblogic.ext.dirs=/weblogic/oracle/middleware/patch_wls1036/profiles/default/sysext_manifest_classpath
argv[24]: -Xms1536m
argv[25]: -Xmx1536m
argv[26]: -XX:PermSize=760m
argv[27]: -XX:MaxPermSize=1024m
argv[28]: -Djava.security.egd=file:/dev/../dev/urandom
argv[29]: -Dweblogic.MaxMessageSize=40000000
argv[30]: weblogic.Server
Thanks for sharingcustom erp solutions