How to check Heap Usage in Weblogic and Change Heap Memory
Checking Heap Usage:
- Sign on to the Weblogic Administration Console by entering the following URL in a browser: http://funoracle.lab:7001/console.
- Expand your WebLogic domain then expand Servers.
- Click the server you intend to monitor.
- Select the Monitoring tab, and the Performance sub-tab.
Increasing Heap Memory
As a good practice to start an Admin server with a lower JVM heap size than your other managed servers because the Admin server doesn’t require many resources.
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(Same for Admin and Managed Servers)
1. Shutdown Admin and Managed servers
2. Take a backup of setDomainEnv.sh or setDomainEnv.cmd file in case something goes wrong, you can revert the changes.
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 a 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 soa_server1 Server
if [ "${SERVER_NAME}" == "soa_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.
Post a Comment
Post a Comment