7.10.3 Memory size used by the object related to the HTTP session

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.10.5 How to estimate using statistical information(1) 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 [Figure] 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 [Figure] (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-5 Minimum size of the Explicit memory block depending on the use of the automatic allocation functionality of the Explicit Memory Management functionality

Item numberWhether the automatic allocation functionality of the Explicit Memory Management functionality is usedMinimum size of Explicit memory block
1Y16 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[Figure] 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-5.
#3
Number-of-Web-applications shows the number of running Web applications.
Organization of this subsection
(1) Estimation procedure
(2) Estimation example

(1) Estimation procedure

The estimation procedure is as follows:

  1. Change the J2EE server settings in such a way so that the object for communicating with redirector is not deployed in the Explicit heap.
    Perform J2EE server settings in a parameter for setting up the user property for the J2EE server of a logical J2EE server in the Easy Setup definition file. The setup value is as follows:
    Value specified in param-name
    ejbserver.server.eheap.ajp13.enabled
    Value specified in param-value
    false
  2. 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).
  3. Execute the javagc command to generate a full garbage collection.
  4. Check the information generated after executing a full garbage collection that is output to the event log of the explicit management heap functionality.
    The event log of the explicit management heap 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 the Explicit Memory Management functionality in the uCosminexus Application Server Maintenance and Migration Guide. These items are output when garbage collection occurs and are included in use status of Explicit heap.
  5. Based on contents checked in step (4), 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.
  6. Calculate the total memory size of Explicit heap used in the HTTP session by multiplying the value calculated in step (5) 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 management heap functionality. An output example of the explicit management heap functionality is as follows:

Output example of event log of explicit management heap 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 (5) 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.