9.7.4  Controlling Memory Usage

The WEBES Director and Analyzer subprocesses run within a Java environment on all the supported operating systems. WEBES can override the default maximum amount of memory used by the Director process and any Java subprocesses that the Director spawns.

WEBES controls the memory usage by setting the following two DESTA registry entries:

In Java, the heap is the main block of memory that is allocated by the process. Setting the maximum size of the heap controls how much memory the process can allocate.

The following examples show the registry entries with values set:

Note


WEBES is installed with default heap settings. It is only necessary to adjust the values if you are having problems with out-of-memory errors.


9.7.4.1  Circumstances Requiring Memory Changes

If the Director hangs or terminates unexpectedly, check the Director log files (see Section 2.5 for more information on log files). If the log files contain errors mentioning "out of memory" conditions, one of the following conditions may apply:

If the Java memory limits are responsible for the problem, you can raise the memory limits applied to the Director process and its subprocesses. After the limits have been increased, you can restart the Director and perform the actions that caused the out of memory error. The limits can be set as high as necessary, and are only constrained by the memory and paging space available on the system.

To determine which registry entry to change, find the "out of memory" message in the Director log file. All messages from the subprocesses start with a ">" character at the beginning of the line. If the "out of memory" messages begin with ">" characters, as in the following example, then the subprocess heap limit needs to be raised.

> java.lang.OutOfMemoryError
> at sun.misc.Resource.getBytes(Resource.java, Compiled Code)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java, Compiled Code)
...

The contents of the error message can vary widely. The important element is the OutOfMemoryError, which can be claimed by Java or other parts of the runtime system.

If the messages do not contain ">" characters at the beginning of the line, as in the following example, then the Director heap limit needs to be raised.

EXCEPTION java.lang.OutOfMemoryError
at com.compaq.svctools.ca.services.eventreaders.ReaderContext.readEvent (ReaderContext.java, Compiled Code)
at com.compaq.svctools.ca.services.eventreaders.ReaderContext.getEvent (ReaderContext.java, Compiled Code)

9.7.4.2  Changing Memory Settings

Before you begin changing the memory settings, check the current registry values to establish a baseline for your changes.

You can view the current values for the Director heap registry entry with the following commands:

desta dri get desta.director.maxHeapSize
desta dri get "desta.director.maxHeapSize"

You can view the current values for the subprocess heap registry entry with the following commands:

desta dri get desta.subprocess.maxHeapSize
desta dri get "desta.subprocess.maxHeapSize"

Once you have established a baseline value, you can modify the memory settings using the procedure for setting the heap size. The procedure varies slightly depending on your operating system.

Tru64 UNIX

To designate the maximum heap size for the Director set the value of the registry key:

  1. Set the value of the registry key by entering the following command at the command prompt:
# desta dri set desta.director.maxHeapSize XXm
Where XX is the desired heap size in megabytes.
  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).

To set the maximum heap size for subprocesses, use the following procedure:

  1. Set the value of the registry key by entering the following command at the command prompt:
# desta dri set desta.subprocess.maxHeapSize XXm
Where XX is the desired heap size in megabytes.
  1. Reset the subprocess command line in the desta registry by entering the following command at the command prompt:
# desta setsub

  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).

OpenVMS

Java on Windows and Tru64 UNIX uses more memory as needed up to the imposed limits. However, on OpenVMS, Java allocates the entire maximum heap size at startup for the lifetime of the process. Besides using the following commands to raise the heap sizes, you also can use them to reduce the heap sizes if the defaults are too resource-intensive for your system. Be aware that reducing the values limits the event processing that the Director can perform, and reducing them too much can cause the Director to fail during normal operation.

To designate the maximum heap size for the Director set the value of the registry key:

  1. Set the value of the registry key by entering the following command at the command prompt:
$ desta dri set "desta.director.maxHeapSize" "XXm"
Where XX is the desired heap size in megabytes.
  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).

To set the maximum heap size for subprocesses, use the following procedure:

  1. Set the value of the registry key by entering the following command at the command prompt:
$ desta dri set "desta.subprocess.maxHeapSize" "XXm"
Where XX is the desired heap size in megabytes.
  1. Delete the subprocess command line registry key by entering the following command at the command prompt:
$ desta dri del "desta.Subprocess.CommandLine"

  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).

Windows

To set the maximum heap size for the Director process, adjust the value of the registry entry:

  1. Set the value of the DESTA registry key with the following command:
C:\> desta dri set desta.director.maxHeapSize XXm
Where XX is the desired heap size in megabytes.
  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).

To set the maximum heap size for subprocesses, use the following procedure:

  1. Set the value of the registry key by entering the following command at the command prompt:
C:\> desta dri set desta.subprocess.maxHeapSize XXm
Where XX is the desired heap size in megabytes.
  1. Stop and restart the Director to apply the changes (see Sections 3.8 and  3.7).