Fine-Tuning the Server

In this section:

You can fine-tune the server to optimize performance.

A Java Services folder on the Workspace Configuration navigation pane enables you to create and manage multiple client connections to JSCOM3, thereby supporting redundancy and load balancing, as well as the ability to refresh JSCOM3 instances while ensuring that at least one connection is always available.

Java exceptions are displayed in the edaprint.log file, and JVM version and path information is displayed in the edaprint.log file and on the Java Services Configuration pane.


Top of page

x
Using JVM Tuning Options to Improve Memory Usage

How to:

You can obtain better memory usage performance in production servers by properly tuning the JVM heap and stack sizes using three options on the JVM Settings tab of the Java Services Configuration pane. These options set initial Java heap size, maximum Java heap size, and Java thread stack size. The options update the odin.cfg file. For related information, see Editing Configuration Files.

Before setting these parameters, it is useful to understand the following relationships.

Heap Size

JSCOM3 is the server interface to the JVM. When you start JSCOM3, you can specify memory allocation for the JVM using the -X options shown in the following table.

JVM option passed to JSCOM3

Description

-Xms

Determines the initial (minimum) Java heap size.

-Xmx

Determines the maximum Java heap size

Heap size does not determine the amount of memory your process uses. As you monitor your Java process, you may notice that the amount of memory used exceeds the amount you have specified for -Xmx. This occurs because -Xmx limits the Java heap size and may allocate memory for other things, including a stack for each thread. Therefore, the total memory consumption of the JVM may exceed the value of -Xmx.

Stack Size

Each thread in the JVM is assigned a stack. The stack size limits the number of threads you can use. If the stack size is too large, you risk running out of memory since each thread is allocated more memory than it needs.

The following chart describes the JVM Option passed to JSCOM3.

JVM option passed to JSCOM3

Description

-Xss

Determines the stack size for each thread.

You can make this value as low as 1K: -Xss1K. However, if the stack space is too small, you will eventually see an exception class java.lang.StackOverflowError.

Controlling Heap and Stack Size

JSCOM3 uses default values for the minimum (initial) and maximum heap sizes and for the stack size of each thread. To improve performance, you can override the JSCOM3 default settings using the initial Java heap size, maximum Java heap size, and Java thread stack size options. For details, see How to Fine Tune JVM Settings From the Web Console.

You can also choose the Force Finalization option on the Java Services menu, which assists in memory management by releasing memory that is not currently in use by the Java Virtual Machine (JVM).



x
Procedure: How to Fine Tune JVM Settings From the Web Console
  1. From the Web Console menu bar, select Workspace.
  2. In the navigation pane, open the Java Services folder, right-click a service, and select Properties. The Java Services Configuration pane opens.
  3. Click the JVM Settings tab and enter values for the following parameters:
    • Initial Java Heap Size. This keyword defines the initial Java heap size in megabytes (MB), which reflects the minimum amount of memory that is already being used.

      Supply a positive integer number.

    • Maximum Java Heap Size. This keyword defines the maximum Java heap size in megabytes (MB).

      Supply a positive integer number.

      Note: With server-side Java applications like JSCOM3, it is good practice to set the initial (minimum) and maximum heap sizes to the same value.

    • Java thread stack size. This keyword defines the Java thread stack size in kilobytes (KB).

      Supply a positive integer number.

  4. Click Save and Restart Java Services to update the odin.cfg file and restart the server with the new settings.

iWay Software