2.3.38 Operands related to the global buffers

179) pdbuffer -a buffer-name
{-r RDAREA-name[,RDAREA-name]...|
-b RDAREA-name[,RDAREA-name]... |
-o |
-i authorization-identifier.index-identifier }
-n buffer-sectors-count [-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 8 Installation and Design Guide.
Operand rules
You can specify the pdbuffer operand up to 2,000,000 times. For a HiRDB/Parallel Server, 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 8 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[Figure]<identifier>((1-16 characters))
Specifies a name for the global buffer. The same name cannot be repeated.
-r RDAREA-name[,RDAREA-name]...
[Figure]<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 3200 RDAREAs may be defined for a single global buffer.
-b RDAREA-name[,RDAREA-name]...
[Figure]<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 the method of estimating global buffer sizes, see the HiRDB Version 8 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 3200 RDAREAs may 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 may be specified only once. If it is specified more than once, the first specification is used.
-i authorization-identifier.index-identifier
authorization-identifier [Figure]<identifier>((1-8 characters))
index-identifier[Figure]<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.
-n buffer-sectors-count
[Figure]<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
  • 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.
  • Output operations to the database may 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.
  • Note that if the number of buffer sectors is too large, it may not be possible to allocate shared memory.
  • 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 applicable1HiRDB/Single ServerNumber of concurrently occurring SQL processing requests [Figure] number of pages used by one SQL (3-6)
    HiRDB/Parallel ServerNumber of concurrently executing users [Figure] average number of concurrently accessed tables per transaction [Figure] 3 [Figure] n2
    Global buffer to which specification of -b option is applicableNumber of data pages stored in LOB RDAREA [Figure] residency degree3 (%)
    Global buffer to which specification of -i option is applicable1Number of pages storing index [Figure] residency degree4 (%)
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 may cause an SQL error.
  • HiRDB/Single Server
    number-of-SQL-process-requests-that-occur-concurrently[Figure] 4
  • HiRDB/Parallel Server
    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 should provide (how high the buffer hit rate should be).
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, etc. 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 8 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 8 Installation and Design Guide.
Tuning the specified value
The value should be set so 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.
-l buffer-size
[Figure]<unsigned integer>((even number between 4 and 30))
Specifies in kilobytes the size of the global buffer. 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, the maximum page size of the RDAREA inside each server is used as the buffer size, and consequently, the buffer size may be different for each server.
In the following cases, consider changing the specification value:
  • A value on the larger side should be set 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
[Figure]<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 the raw I/O facility.
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
The number of times the SQLs to which the prefetch facility will be applied will be executed concurrently in the RDAREA table allocated to this global buffer should be specified. The SQLs to which the prefetch facility will be applied are listed below (note, however, that an executions count of 2 will be used for No. 3):
  1. SELECT, UPDATE, or DELETE statement (excluding = condition and IN condition) that does not use an index.
  2. SELECT, UPDATE, or DELETE statement (excluding = condition and IN condition) that performs ascending-order retrieval* using an index
  3. SELECT, UPDATE, or DELETE statement (excluding = condition and IN condition) that performs ascending-order retrieval* using a cluster key
* 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.
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 8 Installation and Design Guide.
-p maximum-batch-input-pages-count
[Figure]<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 (KB)
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
[Figure]<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 8 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. A low output rate should be specified for a global buffer with a high updated pages hit rate, and a high output rate should be specified 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 may increase. A value should be selected 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. Therefore, this option is ignored, even if you specify it when you are not using this facility.
  • Standby-less system switchover (1:1) facility
    The specification for this option determines how alternating global buffers are allocated. For the method of allocating the alternating global buffers, see the HiRDB Version 8 System Operation Guide.
    Note that if you omit both the -c and -o options, an alternate BES unit cannot be started.
  • Standby-less system switchover (effects distributed) facility
    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 8 System Operation Guide.
    For a unit that is the target of the standby-less system switchover (effects distributed) facility, a global buffer with the -o option specified, but not the -c option, is ignored.
-y update-buffer-sectors-count-for-deferred-write-trigger-event
[Figure]<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 may 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 8 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 x pd_dbbuff_rate_updpage operand value
    OmittedDetermined automatically by HiRDB