Nonstop Database, HiRDB Version 9 Installation and Design Guide

[Contents][Index][Back][Next]

15.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 the following table.

Table 15-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 option Calculation condition
-r If the server has an RDAREA for which -r is specified, that RDAREA is used in the calculation.
-i If the server has an RDAREA that stores an index for which -i is specified, that server is used in the calculation.
-b If the server has an RDAREA for which -b is specified, that server is used in the calculation.
-o If 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 you specify fixed for the pd_dbbuff_attribute operand, pages are locked in real memory, which reduces the real memory portion of the virtual memory by the same size. In addition, the same size is allocated from virtual memory, which consists of the remaining real memory and swap area.

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

Formulas Shared memory calculation formula (KB)
Formula 1

32-bit mode
n
[Figure]{
i=1
[Figure]{752 + 64 + (296 + 64#1) [Figure] (Pi + 4)
+ (124 + 80#2 + 96 [Figure] A [Figure] Mi) [Figure] Ui} [Figure] 4,096[Figure] [Figure] 4,096
+ Si [Figure] {Pi + 4 + (Ui [Figure] Mi [Figure] 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) [Figure] (Pi + 4)
+ (176 + 96#2 + 136 [Figure] A [Figure] Mi) [Figure] Ui} [Figure] 4,096[Figure] [Figure] 4,096
data storage part:
Si [Figure] {Pi + 4 + (Ui [Figure] Mi [Figure] A)}
Formula 2

32-bit mode
{[Figure]([Figure](s [Figure] 1,024 [Figure] 2) [Figure] 8[Figure] + 112) [Figure] 2,048[Figure] [Figure] 2,048 [Figure]
[Figure]a [Figure] (s [Figure] 1,024)[Figure]} [Figure] 1,024

64-bit mode
{[Figure]([Figure](s [Figure] 1,024 [Figure] 2) [Figure] 8[Figure] + 144) [Figure] 2,048[Figure] [Figure] 2,048 [Figure]
[Figure]a [Figure] (s [Figure] 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: 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 the following table.

Table 15-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 option Calculation condition
-r, -b If 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.
-i If an RDAREA that contains the index specified with -i belongs to the same HA group, that RDAREA is used in the calculation.
-o If there are any RDAREAs in the same HA group that are not specified with pdbuffer -r, they are used in the calculation.

When fixed is specified for the pd_dbbuff_attribute operand, pages are locked in real memory, which reduces the real memory portion of the virtual memory by the same size. In addition, the same size is allocated from virtual memory, which consists of the remaining real memory and swap area.

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 + ((752 [Figure] (A + B)) + (288 [Figure] (F + (8 [Figure] (A + B))))
+ 8 [Figure] F [Figure] (A + B) + 16) + H + D)
+ 2,048 + G + (E [Figure] F + (8 [Figure] (A + B)))
} [Figure] 1,024

64-bit mode
n
[Figure]{management region part + data storage part} [Figure] 1,024
i=1
management region part:
((144 + ((944 [Figure] (A + B)) + (464 [Figure] (F + (8 [Figure] (A + B))))
+ (16 [Figure] F [Figure] (A + B)))) + 16 + H + D)
data storage part:
2,048 + G + (E [Figure] F + (8 [Figure] (A + B)))

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 option Formula 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 -l), 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:
64 [Figure] (F + (8 [Figure] (A + B)))
In the 64-bit mode:
112 [Figure] (F + (8 [Figure] (A + B)))

U: Maximum concurrent prefetch count (value of pdbuffer -m)