4.2.4 Operands related to lock

14) pd_lck_pool_size = server-lock-pool-size
~<unsigned integer> (kilobytes)
  • 32-bit mode: ((1-2000000))<<16000>>
  • 64-bit mode and recommended mode: ((1-2000000000))<<128000>>
  • 64-bit mode and 0904 compatibility mode: ((1-2000000000))<<32000>>
For a HiRDB single server configuration, specifies in kilobytes the size of the shared memory area to be used by the single server for locking (lock pool).
For a HiRDB parallel server configuration, specifies in kilobytes the size of the shared memory area to be used for locking by back-end servers and dictionary servers. Use the pd_fes_lck_pool_size operand to specify the size of the shared memory area to be used for locking by front-end servers.
The area specified by this operand is used for tables for managing locked resources. Note the following relationship between the number of tables for managing locked resources, the number of lock requests, and the lock pool size:
Number of tables for managing locked resources = number of lock requests = size of lock pool[Figure] coefficient
Specification guidelines
  • In the 32-bit mode, the amount of lock pool space required for six lock requests is 1 kilobyte.
  • In the 64-bit mode, the amount of lock pool space required for four lock requests is 1 kilobyte.
  • The following formulas can be used to determine the value to be specified for this operand:
    HiRDB typeFormula
    HiRDB single server configuration (32-bit mode)[Figure]a[Figure] value of pd_lck_pool_partition[Figure][Figure] 6[Figure][Figure] value of pd_lck_pool_partition
    HiRDB parallel server configuration (32-bit mode)[Figure]b[Figure] value of pd_lck_pool_partition[Figure][Figure] 6[Figure][Figure] value of pd_lck_pool_partition
    HiRDB single server configuration (64-bit mode)[Figure]a[Figure] value of pd_lck_pool_partition[Figure][Figure] 4[Figure][Figure] value of pd_lck_pool_partition
    HiRDB parallel server configuration (64-bit mode)[Figure]b[Figure] value of pd_lck_pool_partition[Figure][Figure] 4[Figure][Figure] value of pd_lck_pool_partition
    a: Total number of transaction lock requests to be executed concurrently by the single server. The number of lock requests depends on the SQL. For details about how to determine the total number of lock requests, see D. Determining the Number of Locked Resources.
    b: Total number of transaction lock requests to be executed concurrently by each server (dictionary server or back-end server). The number of lock requests depends on the SQL. For details about how to determine the total number of lock requests, see D. Determining the Number of Locked Resources.
    Note
    When you execute DROP TABLE or DROP SCHEMA in a definition SQL, it is especially important to have already determined in advance an appropriate value for this operand.
Tuning the specified value
See the usage rate for the locked resources management table (% OF USE LOCK TABLE) displayed in the statistical information on system operation by the statistics analysis utility.# If the maximum usage rate equals or exceeds 80%, it is recommended that the operand's value be increased in preparation for future database expansion. If the maximum usage rate does not exceed 10%, it is recommended that the operand's value be decreased to conserve shared memory space.
#: For a HiRDB parallel server configuration, see the usage rate for the locked resources management table (% OF USE LOCK TABLE) displayed in the statistical information on system operation for each server for the dictionary servers and back-end servers.
Note
  • If the value specified for this operand is too small, an SQL statement might return an error.
  • Do not specify a larger value than necessary in this operand. A large value will increase the size of the shared memory used by HiRDB, which might cause a shortage of shared memory and prevent HiRDB from starting.
  • If you do an all-item search of a table that contains many rows while locking is in units of rows, this operand's value will need to be increased to reflect the large number of items, which will increase the amount of memory required. Instead, consider making the following adjustments in the UAP:
    [Figure]Acquire locks in table units
    [Figure]If you can use the unlocked search facility, perform searches unlocked
    [Figure]Narrow the search conditions, and divide the processing into several transactions
Relationship to other operands
  • This operand is related to the pd_lck_pool_partition operand.
15) pd_fes_lck_pool_size = front-end-server-lock-pool-size
~<unsigned integer> (kilobytes)
  • 32-bit mode: ((1-2000000))
  • 64-bit mode: ((1-2000000000))
This operand is applicable only to a HiRDB parallel server configuration.
Specifies in kilobytes the size of the shared memory area to be used by front-end servers for locking (lock pool). Use the pd_lck_pool_size operand to specify the size of the shared memory area to be used for locking by single servers, dictionary servers, and back-end servers.
The area specified by this operand is used for tables for managing locked resources. Note the following relationship between the number of tables for managing locked resources, the number of lock requests, and the lock pool size:
Number of tables for managing locked resources = number of lock requests = size of lock pool[Figure] coefficient
Specification guidelines
  • In the 32-bit mode, the amount of lock pool space required for six lock requests is 1 kilobyte.
  • In the 64-bit mode, the amount of lock pool space required for four lock requests is 1 kilobyte.
  • Use the following formula to determine the value of this operand:
    [Figure](a + b) [Figure] value of pd_fes_lck_pool_partition[Figure][Figure] c[Figure][Figure] value of pd_fes_lck_pool_partition (kilobytes)
    a: Total number of transaction lock requests to be executed concurrently by the front-end server. The number of lock requests depends on the SQL. For details about how to determine the total number of lock requests, see D. Determining the Number of Locked Resources.
    b: (value of pd_max_users + pd_max_reflect_process_count + 3) [Figure](value of pd_max_access_tables + 4)
    c: Use 6 and 4 for 32- and 64-bit modes, respectively.
Tuning the specified value
See the usage rate for the locked resources management table (%OF USE LOCK TABLE) displayed for the front-end server in the statistical information on system operation by the statistics analysis utility. If the maximum usage rate equals or exceeds 80%, it is recommended that the operand's value be increased in preparation for future database expansion. If the maximum usage rate does not exceed 10%, it is recommended that the operand's value be decreased to conserve shared memory space.
Operand default value
The default values of this operand are as follows:
[Figure]32-bit mode
{(pd_max_users + pd_max_reflect_process_count value + 3) [Figure] (pd_max_access_tables value + 4)} [Figure] 6
[Figure]64-bit mode
{(pd_max_users + pd_max_reflect_process_count value + 3) [Figure] (pd_max_access_tables value + 4)} [Figure] 4
Note
  • If the value specified for this operand is too small, an SQL statement might return an error.
  • Do not specify a larger value than necessary in this operand. A large value will increase the size of the shared memory used by HiRDB, which might cause a shortage of shared memory and prevent HiRDB from starting.
Relationship to other operands
This operand is related to the pd_fes_lck_pool_partition operand.
16) pd_lck_pool_partition = per-server-lock-pool-partition-count
~<unsigned integer>((1-5000))<<1>>
Specify this operand to distribute lock processing.
For a HiRDB single server configuration, specifies the number of lock pool partitions to be used in locking by the single server when distributing lock processing.
For a HiRDB parallel server configuration, specifies the number of lock pool partitions to be used in locking by back-end servers and dictionary servers when distributing lock processing. Use the pd_fes_lck_pool_partition operand to specify the number of lock pool partitions to be used in locking by front-end servers.
For details about distributing lock processing, see the HiRDB Version 9 System Operation Guide.
Tuning the specified value
For details about how to tune the number of lock pool partitions, see the HiRDB Version 9 System Operation Guide.
Notes
  • When the value set in this operand is too large, the size of the shared memory assigned to each lock pool partition becomes smaller, which might result in not enough lock pool partition capacity, causing SQL to return an error. Lock processing also takes time, so system performance declines. If this becomes an issue, specify a smaller value in this operand.
  • The lock pool size must be at least 1 kilobyte. If a value larger than the value of pd_lck_pool_size is specified, the KFPS00421-W message will be issued and the value of pd_lck_pool_size will be assumed for this operand.
  • If you specify a value of 2 or larger for this operand, the interval check mode is applied as the processing method for checking a deadlock, and a time lag occurs between the occurrence and detection of a deadlock. For details about the processing method for checking a deadlock, see Deadlocks and corrective measures in the HiRDB Version 9 UAP Development Guide.
Relationship to other operands
This operand is related to the following operands:
  • pd_lck_pool_size
  • pd_lck_deadlock_check_interval
Effects on individual estimation formulas
If the value of the pd_lck_pool_partition operand is changed, the following estimation formulas are affected:
HiRDB Version 9 Installation and Design Guide:
  • Processes started by a HiRDB single server configuration
  • Formulas for shared memory used by a unit controller under Estimating the memory size required for a HiRDB single server configuration
  • Processes started by a HiRDB parallel server configuration
  • Formulas for shared memory used by a unit controller under Estimating the memory size required for a HiRDB parallel server configuration
17) pd_fes_lck_pool_partition = front-end-server-lock-pool-partition-count
~<unsigned integer>((1-5000))<<1>>
Specifies the number of lock pool partitions to be used in locking by front-end servers when distributing lock processing. Use the pd_lck_pool_partition operand to specify the number of lock pool partitions to be used in locking by single servers, dictionary servers, and back-end servers.
For details about distributing lock processing, see the HiRDB Version 9 System Operation Guide.
Tuning the specified value
For details about how to tune the number of lock pool partitions, see the HiRDB Version 9 System Operation Guide.
Notes
  • When the value set in this operand is too large, the size of the shared memory assigned to each lock pool partition becomes smaller, which might result in not enough lock pool partition capacity, causing SQL to return an error. Lock processing also takes time, so system performance declines. If this becomes an issue, specify a smaller value in this operand.
  • The lock pool size must be at least 1 kilobyte. If a value larger than the value of pd_lck_pool_size is specified, the KFPS00421-W message will be issued and the value of pd_lck_pool_size will be assumed for this operand.
  • If you specify a value of 2 or more for this operand, the interval check mode is applied as the processing method for checking a deadlock, and a time lag occurs between the occurrence and detection of a deadlock. For details about the processing method for checking a deadlock, see Deadlocks and corrective measures in the HiRDB Version 9 UAP Development Guide.
Relationship to other operands
This operand is related to the following operands:
  • pd_fes_lck_pool_size
  • pd_lck_deadlock_check_interval
Effects on individual estimation formulas
If the value of the pd_fes_lck_pool_partition operand is changed, the following estimation formula is affected:
HiRDB Version 9 Installation and Design Guide:
  • Formulas for shared memory used by a unit controller under Estimating the memory size required for a HiRDB parallel server configuration
18) pd_lck_until_disconnect_cnt = total-number-of-tables-and-RDAREAs-to-be-locked-per-server-UNTIL-DISCONNECT-specification
~<unsigned integer>((0-140000))
  • Servers other than the dictionary server and recommended mode: <<10000>>
  • Dictionary server and recommended mode: <<256>>
  • 0904 compatibility mode: <<256>>
Specifies the number of tables and RDAREAs to be held across transactions and the number of resources to be locked for inner replica configuration management and replica group configuration management. According to the value specified for this operand, tables, RDAREAs, and the blocks for which lock with UNTIL DISCONNECT is specified in inner replica configuration management and replica group configuration management are allocated in the shared memory.
Notes
For a HiRDB parallel server configuration, the method for estimating the value to be specified for this operand differs between back-end and dictionary servers. If you specify this operand in the server common definition, the specified value is applied to both back-end servers and dictionary servers. If you want to apply a different value to only the dictionary server, specify this operand in the dictionary server definition.
Specification guidelines
Normally, this operand need not be specified. Specification of a value other than the default value might be necessary in the following cases:
  • When the number of utilities to be executed concurrently increases
  • When a holdable cursor is used
  • When the local buffer specified in the pdlbuffer operand is used
  • When a shared RDAREA is used
  • When an SQL session-specific temporary table is used
For details about how to estimate the specification value for this operand, see C.5 Formula for determining total number of tables and RDAREAs per server locked with UNTIL DISCONNECT specified (pd_lck_until_disconnect_cnt).
Tuning the specified value
If the value specified for this operand is small, a transaction might roll back or a utility might terminate abnormally with return code 8. In such cases, the message KFPA11914-E or KFPH28001-E is output. If this occurs, increase the value of this operand.
When the value of this operand is increased, the amount of required memory space and the synchronization point dump file size increase proportionately. You must make estimates according to the description in Effects on individual estimation formulas.
Effects on individual estimation formulas
If the value of the pd_lck_until_disconnect_cnt operand is changed, the following estimation formulas are affected:
HiRDB Version 9 Installation and Design Guide:
  • Formulas for shared memory used by a unit controller under Estimating the memory size required for a HiRDB single server configuration
  • Formulas for shared memory used by a unit controller under Estimating the memory size required for a HiRDB parallel server configuration
  • Determining the number of records in a synchronization point dump file
  • Formula 2 under Formulas for shared memory used by a single server
  • Formula 2 under Formulas for the size of the shared memory used by a dictionary server
  • Formula 2 under Formulas for the size of the shared memory used by a back-end server
19) pd_max_open_holdable_cursors = maximum-number-of-holdable-cursors-that-can-be-concurrently-open-when-LOCK-statement-with-UNTIL-DISCONNECT-specification-is-not-executed
~<unsigned integer>((16-1024))<<16>>
When you use holdable cursors for a table for which a LOCK statement with the UNTIL DISCONNECT specification is not executed, this operand specifies the maximum number of holdable cursors that can be concurrently open for each transaction.
Note
Specifying a value other than the default value for this operand increases the amount of shared memory used.
Relationship to other operands
The values specified for this operand and the following operands are used for computing the shared memory size for lock servers. For a 32-bit mode HiRDB system, if the values specified for these operands are too large, the shared memory size of the lock servers exceeds 2 GB, and as a result, HiRDB might not start. Therefore, adjust the values specified for these operands so that the shared memory size of the lock servers does not exceed 2 GB.
  • pd_max_access_tables
  • pd_max_users
  • pd_max_bes_process
  • pd_max_dic_process
  • pd_lck_hash_entry
  • pd_lck_pool_size
For details about shared memory, see the HiRDB Version 9 Installation and Design Guide.
20) pd_lck_hash_entry = lock-pool-hash-entry-count
~<unsigned integer>((0-2147483647))<<0>>
Specifies the number of hash table entries to be used in the lock pool. According to the value specified here, HiRDB allocates a lock pool in the shared memory for the unit controller in each server (single server, front-end server, back-end server, and dictionary server).
Specification guidelines
Normally, omit this operand.
Consider specifying a value for this operand in the following cases:
  • If you do not wish to change the shared memory size if possible when upgrading to version 06-02 or later, specify 11261. In this case, the same number of hash entries is allocated as in the earlier version, the hash table size inside the lock pool remains the same as before.
  • It is possible to improve performance by specifying in this operand a value greater than the recommended value shown below. However, specifying a value greater than variable a (also shown below) will not improve performance over the case in which a is specified.
    The recommended value is as follows:
    Recommended value = Largest prime number not exceeding MAX([Figure]a[Figure] 10[Figure], 11,261)
    VariableFormula for computing the variable
    aSingle server(pd_max_users + pd_max_reflect_process_count value + 3) [Figure] (pd_max_access_tables value + 14) + pd_lck_pool_size[Figure] c
    Front-end serverIf pd_fes_lck_pool_size is omitted(b + 3) [Figure] (pd_max_access_tables value + 4)
    If pd_fes_lck_pool_size is specifiedpd_fes_lck_pool_size value [Figure] c
    Back-end server or dictionary server(b + 3) [Figure]10 + pd_lck_pool_size value [Figure] c
    bFront-end serverMultiple front-end serverpd_max_users + pd_max_reflect_process_count value + 1
    Not multiple front-end serverpd_max_users + pd_max_reflect_process_count value
    Back-end serverIf pd_max_users value > pd_max_bes_process valuepd_max_users + pd_max_reflect_process_count value
    If pd_max_users value [Figure] pd_max_bes_process valuepd_max_bes_process + pd_max_reflect_process_count value
    Dictionary serverIf pd_max_users value > pd_max_dic_process valuepd_max_users + pd_max_reflect_process_count value
    If pd_max_users value [Figure] pd_max_dic_process valuepd_max_dic_process + pd_max_reflect_process_count value
    c6 for the 32-bit mode; 4 for the 64-bit mode
Operand rules
  • If this operand is omitted or specified to 0 and the pd_lck_hash_entry operand for each server definition is omitted, HiRDB calculates the recommended value for each server.
  • When a value that is neither 0 nor a prime number is specified in this operand, HiRDB assumes that the specification is the largest prime number that does not exceed the specified value.
Notes
If the value specified in this operand is too small, there might be an insufficient number of hash entries, and performance might deteriorate. If this operand is omitted, there will never be a shortage of hash entries and performance will not deteriorate due to an insufficient number of hash entries.