Xms and Xmx are the minimum and the maximum heap (essentially where the objects are stored) size the java program can use.
In your case the java program is the WebLogic server on which your application is deployed. By default the Xms and Xmx values set by WebLogic server are : 256m and 512m.
Looks like your application needs more than 512MB heap memory. So you need to increase the maximum heap size (Xmx) to avoid frequent OutOfMemory error.
The new value of Xmx can be 1024m or more. You (or Performance team, if there is one.) have to do rigorous Performance, Scalability, Reliability testing with your application and with different Xmx values to determine what is the best for the application.
Setting the Memory Arguments (i.e Xms, Xmx) can be done at the script level (if you are using startWebLogic.sh/startManagedWebLogic.sh scripts to start the servers).
Script Level Changes:
- Open setDomainEnv.sh and search for 'IF USER_MEM_ARGS the environment variable is set' and in the next line insert
USER_MEM_ARGS="-Xms256m -Xmx1024m"
- You can even change this setting from server to server by using
SERVER_NAME
variable which holds the server that is being started. For example to have this setting only for non-Admin servers, insert [ "${SERVER_NAME}" != "AdminServer" ] && USER_MEM_ARGS="-Xms256m -Xmx1024m"
Console Changes (Only if you use Admin Console to start the managed servers):
- Login to AdminConsole–>Environments—>Servers—>—>Configuration—>ServerStart—>Arguments:(TextArea).
- Enter :
-Xms256m -Xmx1024m
and Save.
Oh, btw JRockit does not have any concept of PermSize.