Nonstop Database, HiRDB Version 9 System Operation Guide

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

8.14 Monitoring the memory size of server processes (facility for monitoring the memory size of server processes)

This section explains the use of the facility for monitoring the memory size of server processes.

This facility need not be used in Linux.

Organization of this section
(1) Overview
(2) Advantages
(3) Application standard
(4) Specification of the facility for monitoring the memory size of server processes
(5) Notes

(1) Overview

When the amount of work memory being used by a server process exceeds a given value, the process is terminated at the time shown in the table below. This is called the facility for monitoring the memory size of server processes.

Table 8-14 Time of termination of a server process by the facility for monitoring the memory size of server processes

Server type Process name Process termination time
Single server pdsds At UAP disconnection#1
At utility termination#3
Front-end server pdfes
Dictionary server pddic At transaction completion#2
At utility termination#3
Back-end server pdbes

#1: For purposes of this facility, UAP disconnection means any of the following:
  • When the UAP terminates
  • When the UAP issues a DISCONNECT statement
  • When an OpenTP1 user server process that uses the HiRDB XA connection client library terminates
  • When a transaction being executed in the user server process is completed (committed or rolled back) when transaction is specified in the trn_rm_open_close_scope operand in an OpenTP1 user server that uses the HiRDB XA connection client library
  • During data commitment by HiRDB Datareplicator, when no commitment request is received before a certain amount of time (value specified in the target system's discintvl definition parameter) elapses after the end of the commitment information queue file has been detected

#2: For purposes of this facility, transaction completion means any of the following:
  • When a UAP disconnection as explained in footnote 1 above occurs
  • When the UAP issues a COMMIT or ROLLBACK statement
  • When the UAP is rolled back internally by an SQL error
  • When a transaction being executed in the user server process is completed (committed or rolled back) in an OpenTP1 user server that uses the HiRDB XA connection client library

#3: For purposes of this facility, utility termination applies to any of the following utilities:
  • Database load utility (pdload)
  • Database reorganization utility (pdrorg)
  • Free page reclaiming utility (pdreclaim)
  • Global buffer residence utility (pdpgbfon)

The amount of memory being used by SQL-related processing is monitored by this facility. The amount of memory allocated at the time of HiRDB activation is not monitored. The following figure shows the monitoring range of this facility.

Figure 8-16 Monitoring range of facility for monitoring the memory size of server processes

[Figure]

(2) Advantages

The facility for monitoring the memory size of server processes addresses the following problems:

HiRDB releases unneeded memory. However, even when a program releases memory, the OS uses the memory management function in the applicable server process to retain the memory area. Consequently, a process size that has grown large by using a large area even once never shrinks. Resident processes especially continue to impact the system. Because the facility for monitoring the memory size of server processes can terminate even resident processes, the memory shortage problem can be prevented.

This facility does not affect execution of jobs currently being used.

(3) Application standard

You should use this facility when the amount of memory used by HiRDB server processes becomes large, resulting in memory shortages. Note that some utilities and commands terminate server processes unconditionally.

(4) Specification of the facility for monitoring the memory size of server processes

To use the facility for monitoring the memory size of server processes, specify the maximum amount of memory to be used by a server process in the pd_svr_castoff_size operand in the server definition.

(5) Notes

  1. If the pd_work_buff_mode operand is omitted or if pool is specified, the value of the pd_work_buff_size operand will be included in the memory size allocated when HiRDB starts. Consequently, the value of the pd_work_buff_size operand will not be monitored by this facility. Therefore, this facility might not have much effect if a large value is specified in the pd_work_buff_size operand.
  2. In the cases shown in the following table, the facility for monitoring the memory size of server processes will not have any effect because server processes that use large amounts of memory cannot be terminated.

    Table 8-15 Cases in which facility for monitoring the memory size of server processes is not effective

    Condition Ineffective cases
    Single server or front-end server
    • A UAP connected to a server process that uses a large amount of memory does not issue a DISCONNECT statement (including when HiRDB SQL Executer does not disconnect from HiRDB).
    • Many OpenTP1 user server processes that do not use the HiRDB XA connection client library do not issue DISCONNECT statements, increasing the amount of memory used by the connected server processes.
    • Many OpenTP1 user server processes remain that use the HiRDB XA connection client library and for which process is specified in the trn_rm_open_close_scope operand, increasing the amount of memory used by the connected server processes. (In this case, the facility for monitoring the memory size of server processes is applied when the user server processes terminate and are disconnected.)
    Dictionary server or back-end server
    • A UAP connected to a server process that uses a large amount of memory does not issue a COMMIT or ROLLBACK statement (including when HiRDB SQL Executer does not issue a COMMIT or ROLLBACK statement).
    • Many OpenTP1 user server processes that do not use the HiRDB XA connection client library do not issue a COMMIT or ROLLBACK statement, increasing the memory size of the connected server processes.
    • Many transactions being executed in the user server processes in an OpenTP1 user server that use the HiRDB XA connection client library are uncompleted (committed or rolled back), increasing the amount of memory used by the connected server processes. (In this case, the facility for monitoring the memory size of server processes is applied when the transactions are completed.)