3.2.9 Operands related to lock

19) pd_lck_wait_timeout = lock-release-wait-time
~<unsigned integer>((0-65535)) (seconds)
Specifies in seconds the maximum amount of time to wait for lock release (the maximum amount of time in lock release wait status).This is the elapsed time from when a lock release request is placed in wait status until it is released.
If the wait status is not released within the specified amount of time, the SQL statement will return an error. When 0 is specified, lock wait time will not be monitored and waiting will continue until the wait status is released.
Specification guidelines
When you specify this operand, check that the following condition is satisfied:
Value specified in pd_watch_time operand
> value specified in PDCWAITTIME of client environment definition
> value specified in this operand
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, the default is the larger of the following two values:
  • 180
  • Value of the pd_watch_time operand
However, if v6compatible has been specified in the pd_sysdef_default_option operand, the default is 180.
Note
If this operand is omitted, the value of the pd_watch_time operand might be used as the default value in some cases. Although the pd_watch_time operand is invalid, even if it is specified for a HiRDB/Single Server, the specified value might be used as the default value for the pd_lck_wait_timeout operand in some cases. Therefore, we recommend that you omit the pd_watch_time operand for a HiRDB/Single Server.
Relationship to client environment definition
The value of this operand can be modified for a client. To do so, specify PDLCKWAITTIME in the client environment definition. For details about PDLCKWAITTIME, see the HiRDB Version 9 UAP Development Guide.
Relationship to other operands
This operand is related to the following operands:
  • pd_lck_deadlock_check
  • pd_lck_deadlock_check_interval
20) pd_lck_release_detect = interval | pipe
Specifies the method to be used by HiRDB to detect lock release (method of detecting whether the process that locked a resource has released that lock).
interval:
Determine the lock release status by checking the lock management area at a regular interval.
pipe:
Use a pipe file (process-to-process communication pipe) to receive the lock release notice.
Specification guidelines
Following are guidelines for specifying this operand:
Specified valueHiRDB processingAdvantages and application criteria
intervalDetermines whether the lock has been released by checking the lock management area in the shared memory.
HiRDB checks the lock management area at a regular interval; this interval is specified by the pd_lck_release_detect_interval operand.
Even if the process that has locked a resource releases the lock, the release will not be detected until the next time the lock management area is checked. Consequently, a UAP that has a fast processing time per transaction might end up waiting for a long time. However, this wait does not place any load on the CPU or open any file.
If a small value is specified for the pd_lck_release_detect_interval operand, the CPU usage might increase too much, adversely affecting the throughput. Specifying interval has the effect of reducing the CPU load when a slow CPU is being used.
pipeUses a semaphore to determine whether the lock has been released. The process that has locked a resource sends a lock release notice to the process that is waiting for release. When the process that has locked the resource releases it, the process that is waiting for the release can detect the release
  • Throughput improves if the processing time per transaction does not exceed the value specified by the pd_lck_release_detect_interval operand.
  • CPU workload increases if lock-release waits occur frequently.
  • If a high-speed CPU is used, this method improves throughput.
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, pipe is assumed for a HiRDB/Single Server and interval for a HiRDB/Parallel Server.
21) pd_lck_release_detect_interval = lock-release-detection-interval
~<unsigned integer>((1-1000)) (milliseconds)
Specifies the interval at which the lock management area is to be checked.
  • When 49 or less is specified
    The interval will begin at the value specified by this operand and thereafter will be 50 milliseconds.
  • When 50 or more is specified
    The interval will begin at 50 milliseconds and thereafter will be the value specified by this operand.
Condition
The interval option must be specified for the pd_lck_release_detect operand.
For a HiRDB/Parallel Server, interval is the default value.
Specification guidelines
  • As a rule, this operand can be omitted.
    Consider modifying the specified value if transaction processing performance declines significantly because many locks occur in a short period of time and a lock release wait has occurred.
  • If too small a value is specified, the CPU workload will increase if lock release waits occur frequently.
  • If too large a value is specified, the wait time might increase.
  • The value to be specified can be determined by referring to WAIT TIME in the statistical information related to system operation from the statistics analysis utility. If the wait time that is output in the statistical information is smaller than the value of this operand, reduce the value of this operand.
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, the default is 10.
22) pd_lck_deadlock_info = Y | N
Specifies whether deadlock information, timeout information and locked resource management table information are to be output. These types of information are output to a directory named %PDDIR%\spool\pdlckinf. For details about deadlock, timeout, and locked resource management table information, see the HiRDB Version 9 System Operation Guide.
Y:
Outputs deadlock information, timeout information, and locked resource management table information.
N:
Does not output deadlock information, timeout information, or locked resource management table information.
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, the default is Y.
Relationship to other operands
  • When N is specified in the pd_lck_deadlock_check operand, this operand is assumed to be N.
  • This operand is related to the pd_lck_deadlock_check operand.
23) pd_lck_deadlock_check = Y | N
Specifies whether checking for deadlock is to be performed.
Y: Checks for deadlocks.
N: Does not check for deadlocks.
Specification guidelines
In transaction systems that do not generate deadlocks, specifying N in this operand can improve SQL execution performance. This is especially true when the interval check mode is used as the deadlock detection method, because lock performance can deteriorate whenever a deadlock is detected if the number of pool partitions for locks is increased. Consequently, we recommend that you specify N in this operand in the case of designing a transaction system that does not generate deadlocks.
In a transaction system that does have potential to generate deadlocks, specify Y in this operand. Specifying N would mean that when a deadlock did occur, SQL would not terminate until the time specified in the pd_lck_timeout operand has elapsed. Also, because HiRDB does not output deadlock information, it might become impossible to determine what caused the deadlock.
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, the default is Y.
Notes
When you specify N in this operand, a transaction that generates a deadlock will not result in an error. Instead, the transaction will be canceled on the basis of one of the following:
  • The maximum time for checking lock release wait time elapses and the SQL statement returns an error.
  • The maximum wait time of the HiRDB client elapses and the request returns an error to the UAP.
Relationship to client environment definition
This operand is related to the following client environment definitions:
  • PDCWAITTIME
  • PDLCKWAITTIME
Relationship to other operands
This operand is related to the following operands:
  • pd_lck_deadlock_info
  • pd_lck_pool_partition
  • pd_fes_lck_pool_partition
  • pd_lck_deadlock_check_interval
  • pd_lck_wait_timeout
24) pd_lck_deadlock_check_interval = deadlock-check-interval
~<unsigned integer>((1-2000000000))(msec)
Specifies the interval for performing checking during monitoring for occurrence of deadlocks in the interval check mode.
Condition
Conditions for this operand depend on the server.
For a single server, back-end server, or dictionary server, both the following conditions must be satisfied:
  • Y is specified in the pd_lck_deadlock_check operand
  • 2 or greater is specified in the pd_lck_pool_partition operand
For a front-end server, both the following conditions must be satisfied:
  • Y is specified in the pd_lck_deadlock_check operand.
  • 2 or greater is specified in the pd_fes_lck_pool_partition operand
Specification guidelines
Specify a small value in this operand to reduce the time between occurrence and detection of a deadlock.
Operand default
When this operand is omitted, the specification of the same operand in the system common definition is assumed. When the same operand is also omitted in the system common definition, the default is 1000.
Notes
  • If too small a value is specified in this operand, system performance might be degraded.
  • If too large a value is specified in this operand, a transaction might be canceled for the following reasons:
    [Figure]The maximum time for checking the lock release wait time elapses and the SQL statement returns an error.
    [Figure]The maximum wait time of the HiRDB client elapses and the request returns an error to the UAP.
Relationship to client environment definition
This operand is related to the following client environment definition:
  • PDCWAITTIME
Relationship to other operands
This operand is related to the following operands:
  • pd_lck_deadlock_check
  • pd_lck_pool_partition
  • pd_fes_lck_pool_partition
  • pd_lck_wait_timeout