15.1.5 Formula for size of shared memory used by global buffers

The size of the shared memory used by the global buffers is calculated for each pdbuffer statement using Formula 1. If Y is specified in the pd_dbbuff_modify operand, add Formula 2. The total value obtained from Formulas 1 and 2 is the memory size required for use by the global buffers.

If the pdbuffer operand is omitted, HiRDB will automatically calculate the shared memory size, so it need not be estimated.

Organization of this subsection
(1) When shared memory used by the global buffer is not locked in real memory
(2) When shared memory used by the global buffer is locked in real memory

(1) When shared memory used by the global buffer is not locked in real memory

When the shared memory used by the global buffer is not locked in real memory (when free is specified in the pd_dbbuff_attribute operand), calculate the size using the following formulas.

FormulaShared memory calculation formula (KB)
Formula 1
32-bit mode
n
[Figure]{
i=1
[Figure]{752 + 64 + (296 + 64#1) x (Pi + 4)
+ (124 + 80#2 + 96 x A x Mi) x Ui} [Figure] 4,096[Figure] x 4,096
+ Si x {Pi + 4 + (Ui x Mi x A)}
} [Figure] 1,024
64-bit mode
n
[Figure]{management region part + data storage part} [Figure] 1,024
i=1
management region part:
[Figure]{944 + 64 + (480 + 112#1) x (Pi + 4)
+ (176 + 96#2 + 136 x A x Mi) x Ui} [Figure] 4,096[Figure] x 4,096
data storage part:
Si x {Pi + 4 + (Ui x Mi x A)}
Formula 2
32-bit mode
{{[Figure]([Figure](s x 1,024 [Figure] 2) [Figure] 8[Figure] + 112) [Figure] 2,048[Figure] x 2,048 x
[Figure]a[Figure] (s x 1,024)[Figure]} [Figure] 1,024
64-bit mode
{[Figure]([Figure](s x 1,024 [Figure] 2) [Figure] 8[Figure] + 144) [Figure] 2,048[Figure] x 2,048 x
[Figure]a[Figure] (s x 1,024)[Figure]} [Figure] 1,024
n: Number of global buffer pools
i: Global buffer pool definitions to be calculated
P: Number of global buffer sectors
A: If the asynchronous READ facility is used, 2; if it is not used, 1.
M: Maximum number of batch input pages
If at least 1 is specified in the pd_max_ard_process operand, this is twice the specified value.
U: Maximum number of concurrently executable prefetch operations
S: Maximum page length of the RDAREAs allocated to global buffer
s: SHMMAX specified value
a: Total from Formula 1
#1: Add this value for the LOB global buffer.
#2: Add this value if at least 1 is specified in the pd_max_ard_process operand.

(2) When shared memory used by the global buffer is locked in real memory

When the shared memory used by the global buffer is locked in real memory (when fixed is specified in the pd_dbbuff_attribute operand), calculate the shared memory size using one of the following formulas.

FormulaShared memory calculation formula (KB)
Formula 1
32-bit mode
n
[Figure]{
i=1
[Figure]{[Figure]{752 + 64 + (280 + 64#1) x (Pi + 4)
+ (124 + 80#2 + 96 x A x Mi) x Ui} [Figure] 4,096[Figure] x 4,096
+ Si x {Pi + 4 + (Ui x Mi x A)}} [Figure] p[Figure] x p
} [Figure] 1,024
64-bit mode
n
[Figure]{[Figure]{management region part + data storage part} [Figure] p[Figure] x p} [Figure] 1,024
i=1
management region part:
[Figure]{944 + 64 + (464 + 112#1) x (Pi + 4)
+ (176 + 96#2 + 136 x A x Mi) x Ui} [Figure] 4,096[Figure] x 4,096
data storage part:
Si x {Pi + 4 + (Ui x Mi x A)}
Formula 2
32-bit mode
{[Figure]{[Figure]([Figure](s x 1,024 [Figure] 2) [Figure] 8[Figure] + 112) [Figure] 2,048[Figure] x 2,048 x
[Figure]a[Figure] (s x 1,024)[Figure]} [Figure] p[Figure] x p} [Figure] 1,024
64-bit mode
{[Figure]{[Figure]([Figure](s x 1,024 [Figure] 2) [Figure] 8[Figure] + 144) [Figure] 2,048[Figure] x 2,048 x
[Figure]a[Figure] (s x 1,024)[Figure]} [Figure] p[Figure] x p} [Figure] 1,024
n: Number of global buffer pools
i: Global buffer pool definitions to be calculated
P: Number of global buffer sectors
A: If the asynchronous READ facility is used, 2; if it is not used, 1
M: Maximum number of batch input pages
If at least 1 is specified in the pd_max_ard_process operand, this is twice the specified value.
U: Maximum number of concurrently executable prefetch operations
S: Maximum page length of the RDAREAs allocated to the global buffer
p: Page size in a Windows Large Page
Can be checked with the pdntenv command.
s: Value of SHMMAX
a: Total from Formula 1
#1: Add this value for the LOB global buffer.
#2: Add this value if at least 1 is specified in the pd_max_ard_process operand.