Hitachi

uCosminexus Application Server System Design Guide


7.11.4 How to estimate using statistical information

You can use the statistical information to check the actual usage of Explicit heap with a J2EE server after J2EE server starts operating and for implementing the J2EE server tests. This subsection describes the procedure for checking the usage of Explicit heap using statistical information.

For details about the output contents of the statistical information and the settings to output the statistical information, and output destination of the statistics file, see 3.3 Statistics File Output Functionality in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.

Organization of this subsection

(1) Concept of estimations using statistical information

When estimating using statistical information, the memory size of the Explicit heap area required in the system is as follows:

  1. Memory size of the Explicit heap area used in HTTP session

  2. Memory size of the Explicit heap area used in container excluding the area mentioned in point 1.

  3. Memory size of the Explicit heap area used in applications and JavaVM

  4. Memory size (size-of-the-Survivor-area-of-Java-heap ×2) of the Explicit heap area used to manage Explicit memory block by JavaVM

You can confirm the memory size of points 1. to 3. from statistical information. In point 4., you can use the memory size of size-of-the-Survivor-area-of-Java-heap ×2 when the automatic release function of Explicit Memory Management is enabled.

The following table describes the examples using the Explicit heap area mentioned in the points 1 to 3. The points 1 to 3 correspond to the item numbers 1 to 3 in the table:

Table 7‒6: Concrete example of items using the Explicit heap area

No.

Explicit heap area

Concrete example of using the Explicit heap area

1

The Explicit heap area used in a HTTP session

HTTP session

2

The Explicit heap area used in a container

Objects used for managing HTTP sessions

3

The Explicit heap area used in applications and JavaVM

  • Application

  • JavaVM

(2) Precautions when acquiring statistical information used in estimation

Acquire the statistical information used for estimations in the actual environment or an environment same as the actual environment.

When the following items differ from the actual environment, you cannot estimate the appropriate memory size using the statistical information:

Furthermore, specify an option to set a maximum value for the size of the Explicit heap area to avoid completely used status of the Explicit heap area when acquiring the statistical information for estimation.

When you acquire statistical information in a status where maximum size of the Explicit heap area is insufficient, the Explicit heap area would be in a completely used state. You cannot estimate properly if the statistical information is acquired in a state whereby the Explicit area is completed used. You can confirm whether the Explicit heap area is in a completed used status by checking that the value of EHeapSize.HighWaterMark of statistical information is same as the value of maximum size of the Explicit heap area. The Explicit heap area is in completed used status when the value of EHeapSize.HighWaterMark of statistical information is same as the value of maximum size of the Explicit heap area.

(3) How to estimate

The following points describe how to estimate based on the statistical information:

(a) Memory size of the Explicit heap area used by HTTP session

You can acquire the memory size used by the HTTP sessions from the formulas for the memory size of the Explicit heap used by the HTTP sessions that are described in the 7.11.2 Memory size used by the object related to the HTTP session. Here, you can confirm the "Memory size used on one session" included in formula from the statistical information.

Memory size used in one session corresponds to the "Maximum size of Explicit memory block" output to statistical information. In the "Maximum size of Explicit memory block", the size of maximum items used is output from the Explicit memory block released in the statistical information collection interval. Therefore, round-out in unit of 64 kilobytes and estimate the Explicit heap. Additionally, when using the automatic allocation functionality of the Explicit Memory Management functionality, add 16 kilobytes, and then estimate the Explicit heap.

When estimating, please see the following values. Also, the number of sessions required in the system correspond to "Number of Explicit memory blocks":

  • Maximum size of Explicit memory blocks acquired in HTTP session (Value of HTTPSessionEMemoryBlockMaxSize.HighWaterMark)

  • Number of Explicit memory blocks acquired in HTTP session (Value of HTTPSessionEMemoryBlockCount.HighWaterMark)

(b) Memory size of the Explicit heap area used in container

The memory size of the Explicit heap area used in the container corresponds to "Explicit heap size used in container" of statistical information. Use the maximum value (value of ContainerEHeapSize.HighWaterMark) from the acquired value for the statistical information used for estimation.

(c) Memory size of the Explicit heap area used in applications and JavaVM

The memory size of the Explicit heap area used in applications and JavaVM corresponds to "Explicit heap size used in applications" value of statistical information. Use the maximum value (ApplicationEHeapSize.HighWaterMark) from the acquired value for the statistical information used for estimation.

(4) Procedure to confirm the statistical information

This point describes the procedure to confirm the statistical information. This point also describes the confirmation procedures with estimation formula of statistical information in (3) as an example. For details about the output contents of the statistical information file, see 3.3 Statistics File Output Functionality in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.

Estimation formula

memory-size-of-the-required-Explicit-heap-area
=(value-where-HTTPSessionEMemoryBlockMaxSize.HighWaterMark-is-rounded-out-in-64-kilobytes-unit
×HTTPSessionEMemoryBlockCount.HighWaterMark)
+ ContainerEHeapSize.HighWaterMark
+ ApplicationEHeapSize.HighWaterMark
+ size-of-the-Survivor-area-of-Java-heap
×2(only-when-explicit-memory-management-automatic-release-function-is-enabled)

The following points describe how to confirm the respective values:

(a) Memory size of the Explicit heap area used by HTTP session

Confirm the memory size of the Explicit heap area used by HTTP session from the HTTPSessionEMemoryBlockMaxSize.HighWaterMark and HTTPSessionEMemoryBlockCount.HighWaterMark values output to statistical information file of JavaVM.

The following figure shows an example to output statistical information of memory size of the Explicit heap area used by HTTP sessions:

Figure 7‒13: Example to output statistical information of memory size of the Explicit heap area used by HTTP sessions

[Figure]

The maximum value of HTTPSessionEMemoryBlockMaxSize.HighWaterMark is 410472 bytes (400.85 kilobytes) acquired at 11:00:31 in the 1. in above figure.

If you round-out this value in unit of 64 kilobytes, the value would be 448 kilobytes. The maximum value of HTTPSessionEMemoryBlockCount.HighWaterMark is 57 acquired at 11:04:31 in the 2. in above figure.

The value acquired by multiplying these two values would be the memory size of the Explicit heap area used by HTTP session.

(b) Memory size of the Explicit heap area used in container

Confirm the memory size of the Explicit heap area used by the container from ContainerEHeapSize.HighWaterMark value output to statistical information file of JavaVM.

The following figure shows an example to output statistical information of memory size of the Explicit heap area used in container:

Figure 7‒14: Example to output statistical information of memory size of the Explicit heap area used in container

[Figure]

The maximum value of ContainerEHeapSize.HighWaterMark is 6815744 bytes (6656 kilobytes) acquired after 10:50:31 in the 1. in above figure.

This is the memory size of the Explicit heap area used in container.

(c) Memory size of the Explicit heap area used by applications and JavaVM

Confirm the memory size of the Explicit heap area used by applications and JavaVM from ApplicationEHeapSize.HighWaterMark value output to statistical information file of JavaVM.

The following figure shows an example to output statistical information of memory size of the Explicit heap area used by applications and JavaVM:

Figure 7‒15: Example to output statistical information of memory size of the Explicit heap area used by applications and JavaVM

[Figure]

The maximum value of ApplicationEHeapSize.HighWaterMark is 2424832 bytes (2368 kilobytes) acquired at 10:53:31 in the 1. in above figure.

(d) Memory size of the required Explicit heap area

The following is the memory size of the required Explicit heap area acquired from the statistical information described in (a) to (c):

448 (kilobytes)× 57 + 6656 (kilobytes) + 2368 (kilobytes)
=34560 (kilobytes)[Figure] 34 megabytes

When the auto-release functionality of Explicit Memory Management is enabled, a value with "Survivor-area-size-of- Java-heap × 2" added becomes the final estimated size of the Explicit heap area.