Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix D Estimating Resources

D.1 Estimating Local Memory Requirements when Java APIs are Used

Use the following procedure to obtain an approximate estimate of the amount of memory used by the Shunsaku APIs when an application runs.

The following table shows the formulas for estimating the memory requirements when Java APIs are used.

[Table D-1 List of Formulas for Estimating the Memory Requirements when Java APIs are Used]

Application usage

Variable elements

Estimation formula (kilobytes)

Looking up data

  • Maximum data length of a single XML or text format record to be obtained
  • Number of data items displayed on a single screen
  • Number of concurrent processes

2.1 x maximum data length of a single XML or text format record to be obtained (kilobytes) x number of data items displayed on a single screen x number of concurrent processes. (See Note below.)

Updating data

  • Maximum data length of a single XML format record to be added
  • Number of data items added with a single executeInsert call
  • Number of concurrent processes

4.8 x maximum data length of a single XML format record to be added (kilobytes) x number of data items added with a single executeInsert call x number of concurrent processes

This is the amount of memory used to execute a search and obtain results. If the ResultSet object is held after the search has completed, and then the next data lookup is executed, additional memory space is required (equal to the length of the data being held x the number of data items).

An estimation example of the local memory requirements when Java APIs are used is as follows:

If the variable elements are as follows:

Searching data

2.1 x 1 x 100 x 100 = 21,000 KB (approx. 20 MB)

Updating data

4.8 x 1 x 100 x 100 = 48,000 KB (approx. 50 MB)

The Java APIs use only an area of memory called the "heap area" that is managed by the Java Virtual Machine. Change the size of the Java heap according to the calculation results of memory requirements. Refer to the following for details on how to change the heap size.

mark1How to Change the Heap Size

The initial size of Java heap is set in advance (for J2SDK 1.3 or later, the initial size is 2 MB and the maximum size is 64 MB). The heap size can be changed by specifying Java command options. These options are explained in the following table.

[Table D-2 List of Options for the Java Command]

Item

Option

Explanation

Initial size

-Xms

Specifies the initial size of the Java heap in bytes. The value specified must be a multiple of 1024, greater than 1 MB. To specify a value in kilobytes, add a "k" or "K" character. To specify a value in megabytes, add an "m" or "M" character. The default value is 2 MB.

Maximum size

-Xmx

Specifies the maximum size of the Java heap in bytes. The value specified must be a multiple of 1024, greater than 2 MB. To specify a value in kilobytes, add a "k" or "K" character. To specify a value in megabytes, add an "m" or "M" character. The default value is 64 MB.

An execution example for the Java command is shown below.

Example

To set the maximum size of the Java heap for the "AppClass" Java application to 128 MB:
Java -Xmx128m AppClass

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006