2.2.47 Operands related to the global buffers

216) pdbuffer -a global-buffer-name
{-r RDAREA-name[,RDAREA-name]...|
-b RDAREA-name[,RDAREA-name].. .|
-o |
-i authorization-identifier.index-identifier }
-n buffer-sectors-coun t[-l buffer-size]
[-m maximum-concurrently-executable-prefetches-count]
[-p maximum-batch-input-pages-count]
[-w updated-pages-output-rate-during-deferred-write-trigger]
[-c]
[-y update-buffer-sectors-count-for-deferred-write-trigger-event]
Specifies the RDAREAs to which a global buffer is to be allocated. A global buffer is an area for storing data during input of table data to or output of table data from RDAREAs; such a buffer is allocated in the shared memory.
Global buffers must be allocated to all RDAREAs. An SQL statement or the pdopen command cannot be executed for an RDAREA to which a global buffer has not been allocated. For details about how to design global buffers, see the HiRDB Version 9 Installation and Design Guide.
Operand rules
You can specify the pdbuffer operand up to 2,000,000 times. For a HiRDB parallel server configuration, you can specify this operand up to 2,000,000 times per server. However, the overall limit is 2,147,483,647.
Tuning the specified values
For details about how to tune global buffers, see the HiRDB Version 9 System Operation Guide.
Operand default value
If the pdbuffer operand is omitted, global buffers are allocated under the following conditions:
  • Global buffer name: gbuf00
  • Global buffer type: As specified by the -o option
  • Global buffer size: 6 MB
  • Number of buffer sectors: 6 MB [Figure] maximum-RDAREA-page-size
-a buffer-name ~<identifier>((1-16 characters))
Specifies a name for the global buffer. The same name cannot be repeated.
-r RDAREA-name[,RDAREA-name]...
~<identifier>((1-30 characters))
Specifies the names of RDAREAs to which the global buffer is to be allocated. The names of the following types of RDAREAs can be specified:
  • Master directory RDAREA
  • Data dictionary RDAREAs
  • Data directory RDAREA
  • User RDAREAs
  • Data dictionary LOB RDAREAs#
  • User LOB RDAREAs#
  • Registry RDAREA
  • Registry LOB RDAREA#
  • List RDAREA
#: It is recommended that a LOB global buffer defined with the -b option be allocated to a LOB RDAREA (by specifying both the -r and -b options).Allocating LOB global buffers improves performance.
Specification guidelines
When RDAREAs with the same or similar page sizes are allocated to the same global buffer, the number of inputs/outputs can be reduced. However, in the following cases, the number of inputs/outputs can be reduced if RDAREAs with the same page size are allocated to different global buffers:
  • RDAREAs that have tables with different purposes
  • RDAREAs that involve many random accesses and RDAREAs that involve sequential accesses
Operand rules
  • If the name of an RDAREA includes characters other than single-byte alphanumeric characters, the name must be enclosed in quotation marks (").
  • When an RDAREA name is enclosed in quotation marks ("), the name becomes case sensitive (lowercase characters are distinguished from uppercase characters). However, if an RDAREA name is not enclosed in quotation marks, all the characters are handled as uppercase characters.
  • A maximum of 4,096 RDAREAs can be defined for a single global buffer.
-b RDAREA-name[,RDAREA-name]...
~<identifier>((1-30 characters))
Specifies the names of RDAREAs to which a LOB global buffer is to be allocated. The names of the following types of RDAREAs can be specified:
  • Data dictionary LOB RDAREAs
  • User LOB RDAREAs
  • Registry LOB RDAREA
A LOB RDAREA specified here must also be specified in the -r option. If the -b option only is specified, the LOB RDAREA cannot be accessed. A specification example follows:
Examples
Global buffers are allocated to a LOB RDAREA (RDLOB01) by specifying the -r and -b options:

   pdbuffer -a gbuf01 -r RDLOB01 -n 1000
   pdbuffer -a gbuf02 -b RDLOB01 -n 1000

Remarks
  • The LOB RDAREA consists of a directory portion and a data portion. These portions are managed by different global buffers. The directory portion is cached in the global buffer with the -r option and the data portion is cached in the global buffer with the -b option. Therefore, both the -r (or -o) and -b options must be simultaneously specified.
  • Because the global buffer with the -r option and the global buffer with the -b option are used for different purposes, their sizes must be separately estimated. Because the global buffer with the -r option caches only the directory portion, it can be relatively small. In contrast, the global buffer with the -b option caches the data portion of the LOB RDAREA. Therefore, estimate the size of this global buffer by taking into consideration both the available memory size and hit rates. For details about how to estimate global buffer sizes, see the HiRDB Version 9 Installation and Design Guide.
Specification guidelines
The following types of LOB RDAREAs can be specified:
  • LOB RDAREAs for storing plug-in indexes
  • LOB RDAREAs for storing a small volume of data that is accessed frequently
It is recommended that a single LOB RDAREA be allocated to a single LOB global buffer.
Operand rules
  • If the name of an RDAREA includes characters other than single-byte alphanumeric characters, the name must be enclosed in quotation marks (").
  • When an RDAREA name is enclosed in quotation marks ("), the name becomes case sensitive (lowercase characters are distinguished from uppercase characters). However, if an RDAREA name is not enclosed in quotation marks, all the characters are handled as uppercase characters.
  • A maximum of 4,096 RDAREAs can be defined for a single global buffer.
Notes
LOB global buffers do not use the prefetch facility or the deferred write trigger facility. Therefore, the -m, -p, and -w options need not be specified.
-o
Specifies that this global buffer is to be allocated to all RDAREAs that are not specified in the -r option. The -o option can be specified only once. If it is specified more than once, the first specification is used.
-i authorization-identifier.index-identifier
authorization-identifier: ~<identifier>((1-30 characters))
index-identifier : ~<identifier>((1-30 characters))
Specifies the name (authorization-identifier.index-identifier) of an index to which the global buffer is to be allocated as an index global buffer.
Specification guidelines
Specify an index that is used frequently. When a global buffer is allocated to a frequently used index, the memory residency of the index page increases, and as a result, the number of inputs and outputs can be reduced.
This effect can be especially large if an index defined as a cluster key or unique key is allocated to the global buffer. Note that because the index identifier of a cluster key is determined by HiRDB, check the index identifier by searching the dictionary table (INDEX_NAME column of the SQL_INDEXES table) after a table has been defined.
If all indexes are allocated to the global buffer for indexes, the overall efficiency of the global buffer declines. Therefore, carefully select the indexes to be allocated to the global buffer according to the memory size.
Operand rules
  • Each authorization-identifier.index-identifier to be specified must be unique.
  • When an authorization identifier or index identifier includes characters other than single-byte alphanumeric characters, the authorization identifier or index identifier must be enclosed in quotation marks (").
  • When an authorization identifier or index identifier is enclosed in quotation marks ("), the name becomes case sensitive (lowercase characters are distinguished from uppercase characters). However, if an authorization identifier or index identifier is not enclosed in quotation marks, all the characters are handled as uppercase characters.
Notes
  • A global buffer must also be allocated to the RDAREA that stores the index specified in the -i option. Either specify an RDAREA in the -r option or allocate a global buffer by using the -o option.
    RDAREAs store the directory section (directory pages), the data section (table-data pages), and the index section (index pages). Because only the index section is cached in the index global buffer, a global buffer with -r or -o specified is needed to cache the directory and data sections.
  • If DROP TABLE or DROP INDEX is executed, the index global buffer allocated to the deleted index will no longer be used. If an index having the same name as the deleted index is defined, its index global buffer cannot be used. To use that index global buffer, normally terminate HiRDB, and then restart it.
  • If a nonexistent index is specified in the -i option when HiRDB starts, its index global buffer is not allocated. In this case, the KFPH23014-W message is issued.
    If the index specified in the -i option is defined after HiRDB has started, its index global buffer cannot be used. To use that index global buffer, normally terminate HiRDB, and then restart it.
  • An index global buffer allocated to a temporary table index is disabled when HiRDB starts. In this case, the KFPH23014-W message is issued.
  • If an index storage RDAREA whose page size is larger than the size of the index global buffer is added with ALTER TABLE, the index pages in the added RDAREA are not cached in the index global buffer. To cash those index pages in the index global buffer, normally terminate HiRDB, and then restart it.
  • If the page size of the RDAREA is made larger than the size of the index global buffer by using the RDAREA re-initialization feature of the database structure modification utility, the index pages of the re-initialized RDAREA are not cached in the index global buffer. To cache those index pages in the index global buffer, normally terminate HiRDB, and then restart it.
-n buffer-sectors-count
~<unsigned integer>
[Figure]32-bit mode: ((4-460000))
[Figure]64-bit mode: ((4-1073741824))
Specifies a sectors count for the global buffer. This option is required.
Specification guidelines
  • Output operations to the database might become concentrated depending on the synchronization point acquisition timing and the updated pages rate in the global buffer. Therefore, the balance of I/O operations must be taken into consideration as well.
  • The following table can be used to determine an appropriate global buffer sectors count:
    ConditionAppropriate global buffer sectors count
    Global buffer to which specification of -r or -o option is applicable#1HiRDB single server configurationNumber of concurrently occurring SQL processing requests[Figure] number of pages used by one SQL statement (roughly 3 to 6)
    HiRDB parallel server configurationNumber of concurrently executing users[Figure] average number of concurrently accessed tables per transaction[Figure] 3 [Figure] n#2
    Global buffer to which specification of -b option is applicableNumber of data pages stored in LOB RDAREA[Figure] residency degree#3 (%)
    Global buffer to which specification of -i option is applicable#1Number of pages storing index[Figure] residency degree#4 (%)
#1
The minimum number of buffer sectors necessary is explained below. Specify a value that at least equals this value for the buffer sector count. If a value smaller than this value is specified, a buffer shortage might cause an SQL error.
  • HiRDB single server configuration
    number-of-SQL-process-requests-that-occur-concurrently[Figure] 4
  • HiRDB parallel server configuration
    number-of-concurrently-executing-users[Figure] average-number-of-concurrently-accessed-tables-inside-each-transaction[Figure] 4
#2
A buffer sectors count derived with n = 1 cannot increase the buffer hit rate. A count needs to be specified that takes into consideration how many extra sectors the coefficient needs to provide (how high of a buffer hit rate you want).
#3
Although a residency degree of 1 (100%) is desirable, the value that is used must take into account the memory capacity, data access frequency, and so on. For details about the total number of pages in a user LOB RDAREA and the total number of pages in a registry RDAREA, see the HiRDB Version 9 Installation and Design Guide.
#4
Although a residency degree of 1 (100%) is desirable, the value that is used must take into account the memory capacity and importance of the index. For details about the number of pages for storing an index, see the HiRDB Version 9 Installation and Design Guide.
Tuning the specified value
Set a value such that the buffer hit rate is at least 80% for HiRDB jobs. The buffer hit rate can be determined as follows:
  • With the statistics analysis utility (check the updated buffer hit rate and referenced buffer hit rate in the statistical information on the global buffer)
  • By checking the header HIT from the pdbufls command.
Notes
  • If an unnecessarily large value is specified, the number of inputs/outputs will decrease but the overhead for buffer retrieval will increase.
  • Because global buffers are allocated in the shared memory, allocating an unnecessarily large area will cause frequent paging during use of other memory, resulting in degraded performance.
  • Note that if the number of buffer sectors is too large, it might not be possible to allocate shared memory.
  • If the number of users accessing the same global buffer increases and a shortage occurs in the number of buffer sectors, an SQL error might occur.
-l buffer-size
~<unsigned integer>((even number between 4 and 30) ) (kilobytes)
Specifies, in kilobytes, the size of one global buffer sector. Specify this option with the -n option.
Specification guidelines
Normally, omit this option. If this option is omitted, the maximum page size of the RDAREA allocated to this global buffer is used as the buffer size. For a HiRDB parallel server configuration, the maximum page size of the RDAREA inside each server is used as the buffer size, and consequently, the buffer size might be different for each server.
In the following cases, consider changing the specification value:
  • Set a value on the larger side when an RDAREA with a page size exceeding the value that would be set in this option will be added later or the maximum RDAREA page size will be increased through reinitialization. However, if HiRDB can be stopped, there is no need to change the specification value because the maximum page size will be set for the buffer size during the subsequent HiRDB startup.
Operand rules
  • If the value specified for this option is smaller than the maximum page size of the RDAREAs, the latter value will be used as the buffer size.
  • If an odd number is specified for this option, the actual buffer size will be 1 greater than the specified value.
Note
When the value of this option is changed, the new value will not go into effect until HiRDB is started normally. When HiRDB is restarted, the buffer size that was in effect during the last operation (the size before the change) is used.
-m maximum-concurrently-executable-prefetches-count
~<unsigned integer>((0-95000))<<0>>
Specifies the maximum number of prefetch facilities that can be used concurrently. The prefetch facility can reduce the input/output time when a large volume of data is retrieved using a character special file.
When 0 is specified or this option is omitted, the prefetch facility will not work. To use the prefetch facility, a value of at least 1 must be specified.
Specification guidelines
Specify the number of times an SQL statement or utility, to which the prefetch facility will be applied, can be executed concurrently in the RDAREA table allocated to this global buffer. The prefetch facility loads pages in the batch mode for the following SQL statements or utility:
  1. Data pages are loaded in the batch mode for the SELECT, UPDATE, or DELETE statement that does not use an index.
  2. Index leaf pages are loaded in the batch mode for the SELECT, UPDATE, or DELETE statement (excluding = condition and IN condition) that performs ascending-order retrieval# using an index.
  3. Index leaf pages and data pages are loaded in the batch mode for the SELECT, UPDATE, or DELETE statement (excluding = condition and IN condition) that performs ascending-order retrieval# using a cluster key.
  4. Index leaf pages and data pages are loaded in the batch mode for the unload processing of the database reorganization utility (pdrorg) which does not use a local buffer.
#: In the order specified in the index definition in the case of a multicolumn index
Notes
When the prefetch facility is used, a buffer dedicated for batch input is allocated in the shared memory for global buffers, separately from the global buffers. Consequently, the size of the shared memory must be estimated again.
If the SQL statements or utilities to which the prefetch facility is applied are concurrently executed in a table in the RDAREA allocated to the global buffer and any of the SQL statements or utilities exceeds the specified execution count, the prefetch facility is no longer applied to that SQL statement or utility.
For details about the prefetch facility and the formula for determining the size of the shared memory to be used by global buffers, see the HiRDB Version 9 Installation and Design Guide.
-p maximum-batch-input-pages-count
~<unsigned integer>((2-256))<<32>>
Specifies the maximum number of pages that can be input in a batch by the prefetch facility. This option is valid only when a value of at least 1 is specified for the -m option.
Specification guidelines
The value to be specified is based on the size of the shared memory and its reduction cost performance so that it satisfies the following formula:
a[Figure] b = 64-128 (kilobytes)
a: Page size of the RDAREA that stores the data or index to be prefetched.
b: Maximum number of pages to be input in a batch.
-w updated-pages-output-rate-during-deferred-write-trigger
~<unsigned integer>((0-100))<<20>> (%)
Specifies as a percentage the updated pages output rate at a deferred write trigger. For details about the deferred write trigger, see the HiRDB Version 9 Installation and Design Guide.
If 0 is specified in this option, updated pages are not output at a deferred write trigger.
Specification guidelines
  • The value to be specified is determined by using the statistics analysis utility to check the number of inputs/outputs and the updated pages hit rate for each global buffer. Specify a low output rate for a global buffer with a high updated pages hit rate, and specify a high output rate for a global buffer with a low updated pages hit rate.
  • If an unnecessarily large value is specified, frequent updates will result in a large number of input/output operations. Moreover, the number of pages that must be written into the database during delayed write will increase, reducing the throughput. Conversely, if an unnecessarily small value is specified, the number of pages that must be written into the database during a synchronization point dump might increase. Select a value that minimizes the number of times the same page is written into the database during synchronization point dump output intervals.
  • If all pages are in the global buffer and multiple transactions update the same page frequently, specify 0 for this operand. Specifying 0 can reduce the total number of pages that are output to the database within the synchronization point interval.
-c
This option is related to the standby-less system switchover facility. If you will not be using this facility, do not specify this option.
  • Standby-less system switchover (1:1) facility
    Specify this option if you create a global buffer that will be used by the RDAREA or indexes for the normal BES and also on the target alternate BES. If this option is omitted, no global buffer is created on the alternate BES. In this case, the global buffer with the -o option specified that is defined for the alternate BES is used during alternation.
    Note that if you omit both the -c and -o options, an alternate BES unit cannot be started.
    The specification for this option determines how alternating global buffers are allocated. For details about how to allocate global buffer during alternation, see Definition of global buffers (standby-less system switchover (1:1) facility only) in the HiRDB Version 9 System Operation Guide.
  • Standby-less system switchover (effects distributed) facility
    Specify this option to define global buffers for the RDAREAs or indexes located on the back-end server that is subject to standby-less system switchover. The global buffers defined here are created on all units in the same HA group.
    If the -c option is omitted, an RDAREA that uses this global buffer cannot be accessed because this global buffer is not allocated.
    The specification of this operand determines the method of allocating global buffers to the RDAREAs or indexes of the back-end server that is the target of the standby-less system switchover (effects distributed) facility. For details about how to allocate global buffers when the standby-less system switchover (effects distributed) facility is being used, see the HiRDB Version 9 System Operation Guide.
-y update-buffer-sectors-count-for-deferred-write-trigger-event
~<unsigned integer>((2-2147483647))
Specifies the deferred write trigger in terms of a number of update buffer sectors. When the number of update buffer sectors reaches the specified value, the updated pages are written to the disk. Use this option to set the deferred write trigger for each global buffer.
Specification guidelines
Normally omit this operand. Deferred write processing might not always be completed within the synchronization point dump acquisition interval. You can specify this operand for such cases if you want to shorten the writing time by reducing the number of updated buffers and reducing slightly the updated buffer hit rate. A guideline for this operand's value is to use 50% (the initial value set by HiRDB) or determine the operand's value by referring to Tuning the synchronization point processing time when deferred write processing is used in the HiRDB Version 9 System Operation Guide.
Operand rules
If the value specified in this option is greater than the number of global buffer sectors, the number of the global buffer sectors is used.
Notes
If the value of this option is too small, the number of times deferred write processing is executed increases, resulting in an increase in the workload; therefore, it is recommended that you specify an appropriate value in accordance with the specification guidelines.
Relationships to other operands
This operand has the following relationships with the pd_dbbuff_rate_updpage operand:
  • The value set for the pd_dbbuff_rate_updpage operand applies to all the global buffers.
  • The value of the pdbuffer operand's -y option applies to each global buffer.
  • The pdbuffer operand's -y option takes precedence.
  • If the pdbuffer operand's -y option is omitted, the number of update buffer sectors for deferred write trigger event depends on the specification of the pd_dbbuff_rate_updpage operand, as shown below:
    pd_dbbuff_rate_updpage operand specificationNumber of update buffer sectors for deferred write trigger event
    SpecifiedNumber of global buffer sectors[Figure] pd_dbbuff_rate_updpage operand value
    OmittedDetermined automatically by HiRDB
Effects on individual estimation formulas
If the value of the pdbuffer 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
  • Calculation of required memory under Estimating the memory size required for a HiRDB single server configuration
  • Formula for size of shared memory used by global buffers under Estimating the memory size required for a HiRDB parallel server configuration
  • Calculation of required memory under Estimating the memory size required for a HiRDB parallel server configuration
  • Estimating HP-UX OS parameter values
  • Determining the value of S under Determining the size of status files
  • Formula for size of shared memory used by global buffers
  • Formula 1, Formula 4, Formula 5, and Formula 6 under Formulas for shared memory used by a single server
  • Formula 2, Formula 3, Formula 4, and Formula 5 under Formulas for the size of the shared memory used by a dictionary server
  • Formula 2, Formula 4, Formula 5, and Formula 6 under Formulas for the size of the shared memory used by a back-end server
  • Estimating the sizes of message queues and semaphores
  • HiRDB single server configuration under Determining Environment Variables Related to the Number of Resources
  • HiRDB parallel server configuration under Determining Environment Variables Related to the Number of Resources