OpenTP1 Version 7 Description

[Contents][Glossary][Index][Back][Next]

7.2.2 Shared memory

Shared memory can be shared by more than one process and can be referenced and updated by them. Most of this area is allocated for OpenTP1 control tables and shared buffers. Shared memory is made available via the shared memory function of the operating system and is used to reduce the overhead for communicating between processes.

Organization of this subsection
(1) Shared memory reserved by OpenTP1
(2) Displaying status of shared memory
(3) Shared memory used by DAM service, TAM service, and IST service
(4) Shared memory used by MCF service
(5) Shared memory used by real-time statistics service

(1) Shared memory reserved by OpenTP1

The shared memory used by OpenTP1 is specified in two operands in the system environment definition: Specify the static shared memory size in the static_shmpool_size operand, and the dynamic shared memory size in the dynamic_shmpool_size operand. OpenTP1 uses the combined total of these two sizes as shared memory. The data to be used during OpenTP1 operation is generally stored in static shared memory, and data that is accessed exclusively on-demand during execution of a service process is placed in dynamic shared memory.

When the buffer area of the shared memory is specified to be shared between the user servers, the amount of shared memory will be saved. For sharing the buffer table, see Section 3.4.4 Saving shared memory in sharing a buffer area.

(2) Displaying status of shared memory

You can use the dcshmls command to find out the status of shared memory which is being used during OpenTP1 execution. This command displays the total amount and the usage rate of shared memory. Command options enable you to separately display the status of static shared memory and dynamic shared memory.

(3) Shared memory used by DAM service, TAM service, and IST service

Part of dynamic shared memory is used to update DAM files. To use dynamic shared memory more efficiently, in the DAM service definition specify how many transaction branches for updating DAM files are to be activated concurrently. When the number of transaction branches is specified, dynamic shared memory for updating a DAM file is allocated at the start of OpenTP1. If more transaction branches than you specified try to update a DAM file concurrently, more dynamic shared memory is newly allocated at execution of the transaction. The dynamic shared memory which has been allocated temporarily is released when the transaction terminates.

When the DAM service is used, the DAM service allocates shared memory for the buffer area in which DAM blocks are saved. You can specify the memory size of this area in the DAM service definition. This area is separate from the shared memory that OpenTP1 allocates according to what was specified in the system environment definition.

When a TAM service is used, the TAM service allocates shared memory for TAM tables. You can specify the size of this area in the TAM service definition. This area is separate from the shared memory that OpenTP1 allocates according to the system environment definition.

The IST service, when used, allocates shared memory for internode shared tables. You can specify the size of this area in the IST service definition. This area is separate from the shared memory that OpenTP1 allocates according to the system environment definition.

(4) Shared memory used by MCF service

The MCF service uses both static and dynamic shared memory.

To allocate static shared memory, perform both of the following settings:

#
Calculate the MCF trace buffer size as follows:
value-specified-in-the-size-operand-of-the--t-option-in-the-mcfttrc-definition-command x 2

If a shortage of MCF static shared memory occurs, the MCF service automatically allocates an amount of space equal to half the size of the static shared memory (static_shmpool_size operand value in the system environment definition) that is specified in the -p option in the MCF manager common definition (mcfmcomn). This automatic memory allocation can be performed a maximum of 254 times. If a memory shortage occurs thereafter, the MCF service issues the KFCA10230-E log message and outputs error information. Note that if a shortage of static common memory is detected during automatic memory allocation before the allocation count reaches 254, the MCF service immediately issues the KFCA10240-E log message and outputs error information.

Use the -i option in the MCF manager common definition (mcfmcomn) to specify whether the KFCA10242-I log message is to be issued during additional memory allocation. If you want to be notified of a shortage of static common memory, specify msg in the -i option to enable message display.

(5) Shared memory used by real-time statistics service

In addition to the shared memory defined in the system environment definition, the real-time statistics service uses the shared memory for the RTS service in order to store acquired statistics.

The size of the shared memory for the RTS service is determined by the values specified in the rts_service_max and rts_item_max operands in the real-time statistics service definition.