16.2.5 Formula for size of shared memory used by global buffers

Organization of this subsection
(1) When the standby-less system switchover (effects distributed) facility is not used
(2) When the standby-less system switchover (effects distributed) facility is used

(1) When the standby-less system switchover (effects distributed) facility is not used

The size of the shared memory used by global buffers is calculated for each dictionary server and back-end server, using Formula 1. If the calculations are made for each server machine, the values can differ depending on the options specified in the pdbuffer statement, as shown in Table 16-9.

Table 16-9 Calculation conditions depending on the options specified in the pdbuffer statement (when the standby-less system switchover (effects distributed) facility is not used)

pdbuffer statement optionCalculation condition
-rIf the server has an RDAREA for which -r is specified, that RDAREA is used in the calculation.
-iIf the server has an RDAREA that stores an index for which -i is specified, that server is used in the calculation.
-bIf the server has an RDAREA for which -b is specified, that server is used in the calculation.
-oIf there are any RDAREAs in the server that are not specified with pdbuffer -r, they are used in the calculation.

If Y is specified in the pd_dbbuff_modify operand, add Formula 2. The total value determined from Formulas 1 and 2 is the required shared memory area for the server's global buffers.

If the pdbuffer operand is omitted, HiRDB calculates the shared memory area automatically, so it need not be estimated.

FormulasShared memory calculation formula (KB)
Formula 1
32-bit mode
n
[Figure]{
i=1
[Figure]{736 + 64 + (280 + 561) [Figure] (Pi + 4)
+ (124 + 802 + 96 [Figure] A[Figure] Mi) [Figure] Ui} [Figure] 4096[Figure][Figure] 4096
+ Si[Figure] {Pi + 4 + (Ui[Figure] Mi[Figure] A)}
} [Figure] 1024
64-bit mode
n
[Figure]{
i=1
[Figure]{928 + 64 + (464 + 961) [Figure] (Pi + 4)
+ (176 + 962 + 136 [Figure] A [Figure] Mi) [Figure] Ui} [Figure] 4096[Figure][Figure] 4096
+ Si[Figure] {Pi + 4 + (Ui[Figure] Mi[Figure] A)}
} [Figure] 1024
Formula 2
32-bit mode
{[Figure][((s[Figure]1024[Figure]4) [Figure]8) + 112] [Figure]4096[Figure][Figure]4096[Figure][Figure]a[Figure](s[Figure]1024) [Figure]
}[Figure]1024
64-bit mode
{[Figure][((s[Figure]1024[Figure]4)[Figure]8) + 144][Figure]4096[Figure][Figure]4096[Figure][Figure]a[Figure](s[Figure]1024)[Figure]
}[Figure]1024
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: Value of SHMMAX
a: Total from Formula 1

1 Add this value in the case of a global buffer for LOB.

2 Add this value if at least 1 is specified in the pd_max_ard_process operand.

(2) When the standby-less system switchover (effects distributed) facility is used

When the standby-less system switchover (effects distributed) facility is used, the size of the shared memory used by global buffers is obtained for each unit using the formula. If the calculations are made for each unit, the values can differ depending on the options specified in the pdbuffer statement, as shown in Table 16-10.

Table 16-10 Calculation conditions depending on the options specified in the pdbuffer statement (when the standby-less system switchover (effects distributed) facility is used)

pdbuffer statement optionCalculation condition
-r, -bIf the unit has an RDAREA for which -r is specified and which belongs to the same HA group, that RDAREA is used in the calculation.
-iIf an RDAREA that contains the index specified with -i belongs to the same HA group, that RDAREA is used in the calculation.
-oIf there are any RDAREAs in the same HA group that are not specified with pdbuffer -r, they are used in the calculation.

If the pdbuffer operand is omitted, HiRDB calculates the shared memory area automatically, so it need not be estimated.

Shared memory calculation formula (KB)
32-bit mode
n
[Figure]{
i=1
(96 + ((736 [Figure] (A + B)) + (272 [Figure] (F + (8 [Figure] (A + B))))
+ 8 [Figure] F[Figure] (A + B) + 16) + H + D)
+ 2048 + G + (E[Figure] F + (8 [Figure] (A + B)))
} [Figure] 1024
64-bit mode
n
[Figure]{
i=1
((144 + ((928 [Figure] (A + B)) + (448 [Figure] (F + (8 [Figure] (A + B))))
+ (16 [Figure] F [Figure] (A + B))))+16 + H + D)
+ 2048 + G + (E[Figure] F + (8 [Figure] (A + B)))
} [Figure] 1024
n: Number of global buffer pools allocated to this unit
i: Global buffer pool definitions to be calculated
A: Number of host BESs
B: Maximum number of acceptable guest BESs
C: Number of batch input pages (value specified in pdbuffer -p)
D: Add this value if the prefetch facility is used (pdbuffer -m specified):
In the 32-bit mode:
2 [Figure] (((80 [Figure] U[Figure] C) + (80 [Figure] U) + (124 [Figure] U) + (8 [Figure] U[Figure] C)) [Figure] (A + B))
In the 64-bit mode:
2 [Figure] (((112 [Figure] U[Figure] C) + (96 [Figure] U) + (176 [Figure] U) + (16 [Figure] U[Figure] C)) [Figure] (A + B))
E: The value depends on the options specified in the pdbuffer statement. The following table lists and describes the options and formulas:
pdbuffer statement optionFormula for the maximum value
-r, -b(MAX ((buffer size (value of pdbuffer -l), MAX (page size of the specified RDAREA that belongs to the same HA group)))
-i(MAX (buffer size (value of pdbuffer -), MAX (page size of the RDAREA that stores the index specified with -i and that belongs to the same HA group)))
-o(MAX (buffer size (value of pdbuffer -l), MAX (page size of the RDAREA in the same HA group that is not specified with pdbuffer -r)))
F: Number of buffer sectors (value of pdbuffer -n)
G: Add this value if the prefetch facility is used (pdbuffer -m specified):
2 [Figure] ((E[Figure] U[Figure] C) [Figure] (A + B))
H: Add this value if LOB RDAREA is specified (pdbuffer -b specified):
In the 32-bit mode:
56 [Figure] (F + (8 [Figure] (A + B)))
In the 64-bit mode:
96 [Figure] (F + (8 [Figure] (A + B)))
U: Maximum concurrent prefetch count (value of pdbuffer -m)