Hitachi

uCosminexus Application Server System Design Guide


7.12.3 Memory size used in the application

Estimate the memory size used in the application and memory size setup in the -XX:HitachiExplicitHeapMaxSize option before starting the operations.

The memory size is estimated by executing the test after running the application that has implemented the Explicit Memory Management functionality, and then confirming the output log. The estimated value is setup in the -XX:HitachiExplicitHeapMaxSize option of execution environment used in the actual operating environment.

This subsection describes the two types of estimation methods according to the environment used for executing the test.

Following are the prerequisites when the test is executed using any of the method:

Prerequisites for estimation
  • Set up enough size for the maximum size of the Explicit heap and then execute the test.

  • In -XX:HitachiExplicitMemoryLogLevel option, do not set none.

For details about the output item of the event log used for estimation, see 5.11 Event log of Explicit Memory Management functionality in the uCosminexus Application Server Maintenance and Migration Guide.

Organization of this subsection

(1) When you can execute the test in an environment equivalent to the actual operating environment

When the test can be executed in an environment equivalent to the actual operating environment, the maximum value of allocated memory size of Explicit heap output to the event log, is considered as the memory size of Explicit heap.

The procedure for checking is as follows:

  1. Execute the application in usual manner in the test environment.

    If GC occurs while the application is running, information is output to the event log of the Explicit Memory Management functionality.

  2. Check whether the value of allocated memory size (<EH_TOTAL>) of Explicit heap is maximum among all the records (row) of the event log output.

Consider this value as the memory size of the Explicit memory heap. However, when the auto-release functionality of Explicit Memory Management is enabled, use the value with "Survivor-area-size × 2" added, as the Explicit heap memory size.

(2) When the test is executed in the small scale environment as compared to the actual operating environment

When the test is executed in the small scale environment as compared to the actual operating environment, estimate the memory size required in the actual operating environment using the following formula:

Explicit-memory-size-in-the-actual-operating-environment
= (maximum-size-of-the-Explicit-heap)/ (number-of-Explicit-memory-blocks) × number-of-Explicit-memory-blocks-in-the-actual-operating-environment 
+ Survivor-area-size×2#
#

Add "Survivor-area-size × 2" when the auto-release functionality of Explicit Memory Management is enabled.

The procedure for checking is as follows:

  1. Execute the application in usual manner in the test environment.

    If GC occurs while the application is running, information is output to the event log of the Explicit Memory Management functionality.

  2. Check whether the value of allocated memory size (<EH_TOTAL>) of Explicit heap is maximum among all the records (row) of the event log output. Also, check the number of valid Explicit memory blocks (Total of <AC_NUM> and <DA_NUM>) output to the same record.

  3. Divide the value of <EH_TOTAL> checked in step (2) with (<AC_NUM>+<DA_NUM>).

    You can calculate a rough size for one Explicit memory block.

  4. Multiply the maximum number of Explicit memory block calculated in the actual operating environment by the value calculated in step (3).

#

This method can be applied when the size of each Explicit memory block in development environment and actual environment is same and only the number is different.

Moreover, when Explicit heap is used for multiple purpose, you must check the Explicit heap for each purpose (the state where explicit memory block is not used other than the purpose of estimation).

Tip

The following table describes the correspondence of items output to thread dump and items output to statistical information:

Table 7‒7: Correspondence of items output to thread dump and statistical information

Item output to thread dump

Item output to statistical information

Output contents

<EH_TOTAL>

EHeapSize

Allocated memory size of Explicit heap

<AC_NUM>+<DA_NUM>

EMemoryBlockCount

Number of valid Explicit memory blocks output to same records