Configuring Memory
Right now, our current recommendation for a server is a multi-core processor such as an i5/i7 or Xeon equivalent and more importantly plenty of RAM. 4GB is a minimum but 8GB is more practical. Youโll struggle to use the Import Utility and Viewer together on a system with only 4GB of RAM. Assuming youโre running all the components on the same server (which is perfectly fine and can yield great performance) then hereโs how weโd allocate the RAM across the main componentsโฆ
Tomcat running Essential Viewer โ 2GB RAM Tomcat running Essential Import Utility โ 2GB RAM Weโd install the Essential Import Utility on a separate instance running on a different port e.g. 9080 as it improves stability and performance If running both on a single instance then allocate 4GB RAM to Tomcat Protege โ 1.5GB RAM If running a Database configuration weโll ensure thereโs about 1GB for that We need some memory for the OS to run smoothly so about 1GB for that This adds up to about 7.5GB. In reality, youโll rarely use all that RAM simultaneously however this configuration is one weโve used countless times with excellent performance.
So, now youโve got plenty of RAM then how do you configure the components to use that.
First up, make sure youโre using the 64bit versions of all your components. If youโre running 32bit versions, youโll max out a 1.5GB which will work whilst the repository is small but will cause you problems later on.
Protege
On Windows:
Start Protege. Go to File->Preferences->Protege.lax Update the row for the property โlax.nl.java.option.java.heap.size.maxโ This is set in bytes, so set this to 2048000000 for installs with the 64-bit Java environment. Click OK Restart Protege
On Mac: If you run Protege on a Mac by double-clicking an icon, you need to edit the Info.plist file that is hidden within that icon. Right-click the icon (or ^-click for one-button mouses) and click โshow package contentsโ. A new finder window will come up. Double click โContentsโ and then โInfo.plistโ. Traverse down the tree as follows: โRootโ โ> โJavaโ โ> โVMOptionsโ. In VMOptions edit the -Xmx line to indicate the correct memory usage, e.g. 2048M. Note that this can be specified in megabytes by using the โMโ value.
For example, here are typical settings: VMOptions -Xms250M -Xmx2048M -XX:MaxPermSize=512m Save the changes that youโve made and restart Protege for these to take effect.
This principle also applies to the Protege server. If you have not already, update the โrun_protege_server.batโ / โrun_protege_server.shโ file to increase the maximum memory JVM option as follows by setting the -Xmx parameter:
For Unix / Mac / Linux:
MAX_MEMORY=-Xmx2048M -XX:MaxPermSize=512m On 64-bit Windows platforms (with the 64-bit Java installation):
set MAX_MEMORY=-Xmx2048M On 32-bit JVMs on 64/32-bit Windows, thereโs a limit to how much memory can be allocated:
set MAX_MEMORY=-Xmx1536M
Tomcat / Essential Viewer / Essential Import Utility The memory settings for the Tomcat that is running the Essential Viewer should also be set to around 2GB for 64-bit Java environments.
On Windows
If you are running Tomcat as a Windows service, you can set the upper memory limit using the tomcat8w.exe program. Youโll find this either in the start menu or in the install folder of Tomcat. This will pop up a configuration panel.
Select the โJavaโ tab and then set the parameter for the Maximum memory pool to 2048 Click Apply restart Tomcat for these settings to take effect. On Mac
If running the Viewer Tomcat on a Mac / Linux platform, you can set these using the โsentenv.shโ file in /bin and set the CATALINA_OPTS variable, e.g.:
export CATALINA_OPTS=โ-Xms128m -Xmx2048m -XX:MaxPermSize=512mโ export JAVA_OPTS=โ-Djava.awt.headless=trueโ
If this file doesnโt exist then simply create a new text file and save it as setenv.sh with these lines in it.
Again, you must restart Tomcat for these settings to take effect.
Troubleshooting
If things arenโt working as expected, then the Log files are your friends. The Protege log is in the Protege install folder under logs and is called protege_###.log. The Tomcat log is in the Tomcat install folder under logs and is called catalina.out. What youโre looking for is anything that mentions โmemoryโ or โheapโ. If youโre seeing these errors then you havenโt properly configured the settings.
As always, you can post your questions on the Essential Forums at http://enterprise-architecture.org/forums and weโll answer as quickly as we can. Donโt forget to use the search too as there are over five years of posts and thereโs a good chance your question has been answered before.
Once youโve got these settings right, you should have many years of stability and performance from your Essential Install. If youโre still having problems though and would like some professional support then contact EAS via the Services menu for more information on how we can help.

