How do I increase the memory of CmapTools and CmapServer?

Answers to the questions most commonly asked about CmapTools and CmapServer.
Post Reply
cmapadmin
Site Admin
Posts: 657
Joined: Sat Dec 13, 2008 2:22 pm

How do I increase the memory of CmapTools and CmapServer?

Post by cmapadmin » Wed Mar 18, 2009 7:33 pm

CmapTools and CmapServer are written in Java. The Java Virtual Machine (JVM) is assigned a specific amount of memory when launched, and is limited by that amount. On the other hand, the JVM consumes memory until it uses all the memory allocated to it, so you need to be careful not to allocate too much memory, particularly if your computer does not have a lot of memory.

If you are using many images/pictures as background to concepts or Cmaps, have opened and saved a lot of Cmaps from servers on the same session (which requires the generation of an image file for the Web Page version of the Cmap when saving), you have dozens of Cmaps opened, or have Cmaps with thousands of nodes, you may be experiencing "Out of Memory" problems.

By default, IHMC CmapTools is assigned 256 MB for the minimum heap size and 512 MB for the maximum heap size of memory. The IHMC CmapServer is assigned 512 Mb and 1024 Mb respectively. This has been found to be adequate for most users.

To increase this amount, you need to modify a file called "CmapTools.lax" for CmapTools (or “CmapServer.lax” for CmapServer) which is found in a directory (folder) called "bin", under the directory (folder) where the CmapTools (or CmapServer) program was installed. Read the FAQ entry titled What is the folder that CmapTools & CmapServer installs to? in order to know the default installations of CmapTools and CmapServer.

Under Windows/Linux (see below for Mac OS X):

Inside the file, using a text editor (e.g. NotePad, vi, textedit), find the line that indicates, in bytes, the amount of memory that will be used by CmapTools (or CmapServer). It should look something like (the number at the end may be different):

lax.nl.java.option.java.heap.size.max=536870912

where the number at the end indicates the number of bytes. To increase the amount of memory, for example to 768 MB, you need to change the line to:

lax.nl.java.option.java.heap.size.max=805306368

where 805306368 bytes = 768 * 1024 * 1024 = 768 MB

For this change to take effect, save the file and start CmapTools (or CmapServer) again.

Under Mac OS X:

Locate the folder where the CmapTools (or CmapServer) application is installed. Open the "bin" folder.

Right-click on the "CmapTools.app" (or “CmapServer.app”) file and select "Show Package Contents".

Open the "Contents" folder.

With a text editor, edit the "Info.plist" file.

Look for the entries:

<string>-Xms256M</string>
<string>-Xmx512M</string>

These are the minimum and maximum sizes in megabytes. Change and 256M and 512M for whatever value you need, particularly the maximum size.

For this change to take effect, save the file and start CmapTools (or CmapServer) again.

Post Reply