Salesforce

WorldServer - How to change the Java Heap Memory

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer
Symptoms/Context

We are encountering errors and/or slowness associated with java.lang.OutOfMemoryError in the ws.log file. How do we change the Java Heap memory size on the server where WorldServer is installed and allocate more memory?
Resolution
Note: changing the Java Memory settings is typically considered a tuning exercise. Depending on environment, different values may work for different setups. Please refer to the System requirement page in our SDL Documentation Center.

When changing the Java Heap settings, it is suggested doubling the number currently in place (i.e. from 128 to 256) and monitoring the system further. If issues are still seen, especially slowness associated with Out of Memory errors in the ws.log), try doubling again so 512, 1024 etc.

Starting from WorldServer version 10.4.5, the Java Memory settings are now stored in the WorldServer\tomcat\bin directory. Follow these steps:

1- Before making any changes, stop WorldServer (Idiom service). Note that the User Interface will be unavailable.

2- Open/double click on the IdiomRunw.exe file and go to the Java tab. Note: depending on how you have installed WorldServer, you might not find IdiomRunw.exe. If that is the case, refer to tomcat9w.exe instead and follow the same steps.

3- In the Java Options field, scroll down and you will find the Java Memory values that you can change. Per default, these are set to 2 GB of allocated memory:

-Xms1024m
-Xmx2048m


If you want to increase them to 4 GB, change the values to 
-Xms1024m
-Xmx4096m


If you want to increase them to 6 GB, change the values to 
-Xms1024m
-Xmx6144m


If you want to increase them to 8 GB, change the values to 
-Xms1024m
-Xmx8192m


If you want to increase them to 10 GB, change the values to 
-Xms1024m
-Xmx10240m


If you want to increase them to 12 GB, change the values to 
-Xms1024m
-Xmx12288
m

4- Change the Xmx value as well, if required

5- Click OK and restart WorldServer (Idiom service) for the change to take effect. You can enter the same values in the Initial Memory Pool and in the Maximum Memory Pool for consistency before confirming the change. As an example, see screenshot below where Java Heap has been set to Max 8 GB:


User-added image
Root Cause
Reference
These articles are relevant:



For SDL WorldServer 10.4.4. and earlier versions, please refer to:

Tuning performance of SDL WorldServer 10.4.4. and earlier version by changing the Java max Heap settings
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by