7.11.2 Memory size used by the object related to the HTTP session
This section describes about how to estimate the memory size used by the object related to the HTTP session.
- Important note
-
Note that by this procedure you cannot estimate the memory size when using the functionality for reducing Explicit heap memory size utilized by an HTTP session. Follow the procedure described in 7.11.4 How to estimate using statistical information for the memory size if you are using functionality for reducing Explicit heap memory size utilized by an HTTP session.
The memory size of the Explicit heap used by HTTP session-related objects is estimated with the following formula:
Memory-size-of-the-Explicit-heap-used-by-HTTP-session-related-objects = Memory-size-of-the-Explicit-heap-used-in-the-HTTP-session + Memory-size-of-the-Explicit-heap-area-used-in-the-Web-container
The memory size of the Explicit heap used by the HTTP session is estimated with the following formula:
Memory-size-of-the-Explicit-heap-used-in-the-HTTP-session = Memory-size-used-in-one-session#1 × Number-of-sessions-required-in-the-system
The memory size of the Explicit heap area used in the Web container for the HTTP session is estimated with the following formula:
Memory-size-of-the-Explicit-heap-area-used-in-the-Web-container = Size-of-the-objects-used-for-managing-the-HTTP-sessions#2 × (Number-of-Web-applications#3 + 2)
- #1
-
Memory-size-used-in-one-session is equivalent to the size of one Explicit memory block. To estimate the size of one Explicit memory block, actually run the application and check the usage of the Explicit heap. Note that the minimum size of the Explicit memory block differs depending on the use of the automatic allocation functionality of the Explicit Memory Management functionality. The following table describes the minimum size of the Explicit memory block depending on the use of the automatic allocation functionality of the Explicit Memory Management functionality.
Table 7‒4: Minimum size of the Explicit memory block depending on the use of the automatic allocation functionality of the Explicit Memory Management functionality Item number
Whether the automatic allocation functionality of the Explicit Memory Management functionality is used
Minimum size of Explicit memory block
1
Y
16 kilobytes
2
--
64 kilobytes
- Legend:
-
Y: Automatic allocation functionality of the Explicit Memory Management functionality is used.
--: Automatic allocation functionality of theExplicit Memory Management functionality is not used.
You can extend the Explicit memory block in 64 kilobyte units. Therefore, the size would be "size-of-one-Explicit-memory-block ≥ memory-size-used-in-one-session". Also, estimate the size by adding 16 kilobytes when using the automatic allocation functionality of theExplicit Memory Management functionality.
- #2
-
Size-of-the-objects-used-for-managing-the-HTTP-sessions is the minimum size of the Explicit memory block described in Table 7-4.
- #3
-
Number-of-Web-applications shows the number of running Web applications.
- Organization of this subsection
(1) Estimation procedure
The estimation procedure is as follows:
-
Start the application that creates the HTTP session, and then execute the processes up to the last process executed immediately before the session annulment (such as logout).
-
Trigger Full GC by executing the javagc command.
-
Check the information output to the event log of the Explicit Memory Management functionality after Full GC is executed.
The event log of the Explicit Memory Management functionality is output to a file or directory specified in the -XX:HitachiExplicitMemoryJavaLog option which is the startup option of JavaVM. The default output destination is as follows:
- In Windows
-
Cosminexus-installation-directory\CC\server\public\ejb\J2EE-server-name\logs\ehjavalogn.log
- In UNIX
-
/opt/Cosminexus/CC/server/public/ejb/J2EE-server-name/logs/ehjavalogn.log
Check the size used in Explicit heap and the number of Explicit memory blocks required in the series of businesses.
While calculating the memory size, check the following items from among the output items of the event log:
-
Allocated size of the Explicit heap
-
Number of Explicit memory blocks
For details about the contents of the Explicit Memory Management functionality event logs, see 5.11 Event log of Explicit Memory Management functionality in the uCosminexus Application Server Maintenance and Migration Guide. These items are output when GC occurs and are included in use status of Explicit heap.
-
Based on contents checked in step (3), calculate the size of one Explicit memory block.
You can calculate the size using the following formula:
Size-of-one-Explicit-memory-block =allocated-size-of-Explicit-heap/number-of-Explicit-memory-blocks
size-of-one-Explicit-memory-block is equivalent to the memory size used in one session.
-
Calculate the total memory size of Explicit heap used in the HTTP session by multiplying the value calculated in step (4) with the number of sessions required in business.
(2) Estimation example
This point shows an estimation example based on the output example of event log of the Explicit Memory Management functionality. An output example of the Explicit Memory Management functionality is as follows:
- Output example of event log of the Explicit Memory Management functionality:
[ENS]Thu Oct 21 14:55:50 2007[EH: 12672K->12800K(12800K/65536K)][E/F/D: 200/0/0][cause:GC][CF: 0]
In this example, the allocated size of Explicit heap is 12,800 Kilobytes, and the number of Explicit memory block is 200. If this value is applied according to step (4) of (1) Estimation procedure, it is displayed as follows:
- Estimation example of Explicit memory block size:
Size-of-one-Explicit-memory-block = allocated-size-of-Explicit-heap-(12,800 Kilobytes)/number-of-Explicit-memory-size-(200) =64 Kilobytes
The value multiplied with the number of sessions assumed in the businesses is considered as the total memory size of Explicit heap used in the HTTP session.