Nonstop Database, HiRDB Version 9 Installation and Design Guide

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

15.2.4 Formulas for shared memory used by each server

Organization of this subsection
(1) Formula for the shared memory used by a front-end server
(2) Formulas for the size of the shared memory used by a dictionary server
(3) Formulas for the size of the shared memory used by a back-end server
(4) Variables used in the formulas

(1) Formula for the shared memory used by a front-end server

Following is the formula for calculating the size of the shared memory that is used by a front-end server. For the variables used in this formula, see (4) below.

(2) Formulas for the size of the shared memory used by a dictionary server

This subsection lists and describes the formulas used for calculating the shared memory used by a dictionary server.

For 32-bit mode (KB):
Formula 1 + [Figure]{([Figure](40 + (value obtained by adding Formulas 2 through 5)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]

For 64-bit mode (KB):
Formula 1 + [Figure]{([Figure](72 + (value obtained by adding Formulas 2 through 5)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]

For the variables used in the formulas, see (4).

Notes
  • Add 3 to the formula if commit is specified in either the pd_dbsync_point operand or the pd_system_dbsync_point operand. The default for the pd_system_dbsync_point operand is commit.
    Otherwise, add Formula 5.
  • Add Formula 4 if the pd_dfw_awt_process operand is specified.
  • If you omit the pd_dic_shmpool_size operand, the following value is set:
    For 32-bit mode:
    [Figure]{([Figure](40 + (total of Formulas 2 through 5)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]
    For 64-bit mode:
    [Figure]{([Figure](72 + (total of Formulas 2 through 5)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]
    Condition Shared memory calculation formula (KB)
    Formula 1 (KB) [Figure] 32-bit mode
    b [Figure] 1.3
    + {
    [Figure]b [Figure] 64[Figure] [Figure] (8 [Figure] 16)[Figure] [Figure] 4 [Figure] 4
    + 12 [Figure] {(b [Figure] 3) + 1 - mod(b [Figure] 3, 2)}
    + 8 [Figure] a [Figure] {(e + 3) [Figure] 2 + 1 + MAX(e [Figure] 10, 5)}
    + 512
    } [Figure] 1,024
    + 3.5 + [Figure](224 [Figure] v [Figure] w) [Figure] 1,024[Figure] + 0.5
    + [Figure]{
    [Figure](28 + ([Figure](32 + (([Figure]g [Figure] 127[Figure] + 1) [Figure] 2,048 + 128)) [Figure] 32[Figure] [Figure] 32))
    [Figure] 128[Figure] [Figure] 128
    } [Figure] 1,024[Figure]
    K
    + [Figure](Li)
    i=1
    [Figure] 64-bit mode
    b [Figure] 1.3
    + {
    [Figure]b [Figure] 64[Figure] [Figure] (8 [Figure] 16)[Figure] [Figure] 4 [Figure] 4
    + 12 [Figure] {(b [Figure] 3) + 1 - mod(b [Figure] 3, 2)}
    + 8 [Figure] a [Figure] {(e + 3) [Figure] 2 + 1 + MAX(e [Figure] 10, 5)}
    + 1,024
    } [Figure] 1,024
    + 3.5 + [Figure](224 [Figure] v [Figure] w) [Figure] 1,024[Figure] + 0.5
    + [Figure]{
    [Figure](56 + ([Figure](56 + (([Figure]g [Figure] 127[Figure] + 1) [Figure] 2,048 + 128)) [Figure] 32[Figure] [Figure] 32))
    [Figure] 128[Figure] [Figure] 128
    } [Figure] 1,024[Figure]
    K
    + [Figure] (Li)
    i=1
    Formula 2 (bytes) [Figure] 32-bit mode
    500 [Figure] 1,024
    + ([Figure]372 [Figure] g [Figure] 16[Figure] [Figure] 16) + 432 [Figure] h + 112 [Figure] 240
    + 5,072 [Figure] (e + 15) + 96 [Figure] z
    + 32 [Figure] m + 172 [Figure] {a [Figure] (e + 3) + (e + 3) [Figure] 2 + 22} + 16
    + 48 [Figure] p + 36 [Figure] {(e + 3) [Figure] 2 + 1 + MAX(5, [e + 3] [Figure] 10)}
    + 68 [Figure] G + 152 [Figure] 120 + 80 + 64#1 + 368#2
    + (([Figure]([Figure](g [Figure] 8)[Figure] + 3) [Figure] 4[Figure]) [Figure] 4) [Figure] m
    [Figure] 64-bit mode
    500 [Figure] 1,024
    + ([Figure]472 [Figure] g [Figure] 16[Figure] [Figure] 16) + 448 [Figure] h
    + ([Figure]136 [Figure] 240 [Figure] 16[Figure] [Figure] 16)
    + 9,424 [Figure] (e + 15) + 144 [Figure] z
    + 48 [Figure] m + 336 [Figure] {a [Figure] (e + 3) + (e + 3) [Figure] 2 + 22} + 16
    + 64 [Figure] p + 72 [Figure] {(e + 3) [Figure] 2 + 1 + MAX(5, [e + 3] [Figure] 10)}
    + 68 [Figure] G + 184 [Figure] 120 + 96 + 64#1 + 448#2
    + (([Figure]([Figure](g [Figure] 8)[Figure] + 7) [Figure] 8[Figure]) [Figure] 8) [Figure] m
    Formula 3 (bytes)

    32-bit mode
    (32 + 16 [Figure] z) [Figure] (G + 1) + 16

    64-bit mode
    (48 + 32 [Figure] z) [Figure] (G + 1) + 16
    Formula 4 (bytes)

    32-bit mode
    72 + 52 [Figure] H + 68 [Figure] z
    If you specify 1 in the pd_dbbuff_trace_level operand, add:
    + 320 [Figure] z

    64-bit mode
    96 + 56 [Figure] H + 72 [Figure] z
    If you specify 1 in the pd_dbbuff_trace_level operand, add:
    + 640 [Figure] z
    Formula 5 (bytes)

    32-bit mode
    (32 + 16 [Figure] z) [Figure] 10 + 16

    64-bit mode

    (48 + 32 [Figure] z) [Figure] 10 + 16

#1: Add this if the pd_max_ard_process operand is specified with a value of at least 1.

#2: Add this value if the facility for predicting reorganization time is used.

(3) Formulas for the size of the shared memory used by a back-end server

This subsection lists and describes the formulas used for calculating the shared memory used by a back-end server.

For 32-bit mode (KB):
Formula 1 + [Figure]{([Figure](40 + (value obtained by adding Formulas 2 through 7)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]

For 64-bit mode (KB):
Formula 1 + [Figure]{([Figure](72 + (value obtained by adding Formulas 2 through 9)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]

For details about the variables used in these formulas, see (4) below.

Notes on Formulas 1 through 9
  • If any of the following conditions is satisfied, add Formula 3:
    [Figure] Y is specified in the pd_rdarea_open_attribute_use operand
    [Figure] Y is specified in the pd_lv_mirror_use operand
    [Figure] The rapid switchover facility is used
  • If either of the following conditions is satisfied, add Formula 4:
    [Figure] commit is specified in the pd_dbsync_point operand
    [Figure] Y is specified in the pd_shared_rdarea_use operand
    [Figure] Otherwise, add Formula 7.
  • If commit is specified in the pd_inner_replica_control operand, add Formula 5.
  • If the pd_dfw_awt_process operand is specified, add Formula 6.
  • If you omit the pd_bes_shmpool_size operand, the following value is set:
    For 32-bit mode:
    [Figure]{([Figure](40 + (value obtained by adding Formulas 2 through 7)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]
    For 64-bit mode:
    [Figure]{([Figure](72 + (value obtained by adding Formulas 2 through 9)) [Figure] 512[Figure] [Figure] 512)} [Figure] 1,024[Figure]
  • If you specify the pd_max_resident_rdarea_no operand, add Formula 8.
  • If the value of pd_max_temporary_object_no is 1 or greater, add Formula 9.
    Condition Shared memory calculation formula
    Formula 1 (KB)

    32-bit mode

    b [Figure] 1.3

    + {
    [Figure]b [Figure] 64[Figure] [Figure] (8 [Figure] 16)[Figure] [Figure] 4 [Figure] 4
    + 12 [Figure] {(b [Figure] 3) + 1 - mod(b [Figure] 3, 2)}
    + 8 [Figure] a [Figure] {(e + 3) [Figure] 2 + 1 + MAX(e [Figure] 10, 5)} + 512 + 512#1

    } [Figure] 1,024

    + [Figure]{72 + 8 [Figure] v [Figure] (8 + 3 [Figure] w)} [Figure] 1,024[Figure]

    + [Figure]{([Figure]g [Figure] 127[Figure] + 1) [Figure] 2,048 + 128} [Figure] 1,024[Figure]
    + [Figure]{
    [Figure](28 + ([Figure](32 + (([Figure]g [Figure] 127[Figure] + 1) [Figure] 2,048 + 128)) [Figure] 32[Figure] [Figure] 32))
    [Figure] 128[Figure] [Figure] 128}
    }[Figure] 1,024[Figure]
    M
    + [Figure](Ni)
    i=1
    [Figure] 64-bit mode
    b [Figure] 1.3
    + {
    [Figure]b [Figure] 64[Figure] [Figure] (8 [Figure] 16)[Figure] [Figure] 4 [Figure] 4
    + 12 [Figure] {(b [Figure] 3) + 1 - mod(b [Figure] 3, 2)}
    + 8 [Figure] a [Figure] {(e + 3) [Figure] 2 + 1 + MAX(e [Figure] 10, 5)} + 1,024 + 512#1
    } [Figure] 1,024
    + [Figure]{72 + 24 [Figure] v [Figure] (2 + w)} [Figure] 1,024[Figure]
    + [Figure]{
    [Figure](56 + ([Figure](56 + (([Figure]g [Figure] 127[Figure] + 1) [Figure] 2,048 + 128)) [Figure] 32[Figure] [Figure] 32))
    [Figure] 128[Figure] [Figure] 128
    } [Figure] 1,024[Figure]
    M
    + [Figure](Ni)
    i=1
    Formula 2 (bytes) [Figure] 32-bit mode
    500 [Figure] 1,024
    + (308 + 48#1) [Figure] g + 432 [Figure] h + 112 [Figure] r
    + 5,072 [Figure] (e + 15) + 96 [Figure] z
    + 32 [Figure] m + 172 [Figure] {a [Figure] (e + 3) + (e + 3) [Figure] 2 + 22} + 16
    + 48 [Figure] p + 48 [Figure] {(e + 3) [Figure] 2 + 1 + MAX(5, [e + 3] [Figure] 10)}
    + 68 [Figure] G + 152 [Figure] F + 80 + 32 [Figure] g + 64#2 + 96#3
    + (([Figure]([Figure](g [Figure] 8)[Figure] + 3) [Figure] 4[Figure]) [Figure] 4) [Figure] m
    [Figure] 64-bit mode
    500 [Figure] 1,024
    + (400 + 56#1) [Figure] g + 448 [Figure] h + 136 [Figure] r
    + 9,424 [Figure] (e + 15) + 144 [Figure] z
    + 48 [Figure] m + 336 [Figure] {a [Figure] (e + 3) + (e + 3) [Figure] 2 + 22} + 16
    + 64 [Figure] p + 96 [Figure] {(e + 3) [Figure] 2 + 1 + MAX(5, [e + 3] [Figure] 10)}
    + 68 [Figure] G + 184 [Figure] F + 96 + 48 [Figure] g + 64#2 + 128#3
    + (([Figure]([Figure](g [Figure] 8)[Figure] + 7) [Figure] 8[Figure]) [Figure] 8) [Figure] m
    Formula 3 (bytes)

    32-bit mode
    {{[([Figure]g [Figure] 8[Figure] [Figure] 4[Figure])[Figure] 4] + 8} [Figure] (a [Figure][[e + 3] + e + 15)}

    64-bit mode
    {([([Figure]g [Figure] 8[Figure] [Figure] 8[Figure]) [Figure] 8] + 8} [Figure](a [Figure] [e + 3] + e + 15)}
    Formula 4 (bytes)

    32-bit mode
    (32 + 16 [Figure] z) [Figure] (e [Figure] 2 + 7 + 1) + 16

    64-bit mode
    (48 + 32 [Figure] z) [Figure] (e [Figure] 2 + 7 + 1) + 16
    Formula 5 (bytes) 56 [Figure] E + 16
    Formula 6 (bytes)

    32-bit mode
    72 + 52 [Figure] H + 68 [Figure] z
    If you specify 1 in the pd_dbbuff_trace_level operand, add:
    + 320 [Figure] z

    64-bit mode
    96 + 56 [Figure] H + 72 [Figure] z
    If you specify 1 in the pd_dbbuff_trace_level operand, add:
    + 640 [Figure] z
    Formula 7 (bytes)

    32-bit mode
    (32 + 16 [Figure] z) [Figure] 10 + 16

    64-bit mode
    (48 + 32 [Figure] z) [Figure] 10 + 16
    Formula 8 (bytes) 16 + 112 + (48 + 48 [Figure] Q) + (48 + 32 [Figure] R)
    Formula 9
    (bytes)
    16 + 80 [Figure] S

#1: Add this value if neither pd_max_list_user nor pd_max_list_count operand is 0.

#2: Add this if the value of the pd_max_ard_process operand is at least 1.

#3: Add this if the value of the pd_max_reflect_process_count operand is at least 1.

(4) Variables used in the formulas

a: Value of pd_max_access_tables operand

b: Value of pd_sql_object_cache_size operand

c: Value of pd_table_def_cache_size operand

d: Value of pd_auth_cache_size operand

e: Value of pd_max_users operand#1

f: Total number of back-end servers

g: Value of pd_max_rdarea_no operand

h: Value of pd_max_file_no operand

k: Value of pd_view_def_cache_size operand

m: Number of global buffers for index
If Y is specified in the pd_dbbuff_modify operand, add the pd_max_add_dbbuff_no operand value of the server definition to the number of pdbuffer statements related to the server.

p: Value of pd_lck_until_disconnect_cnt operand

q: MIN (e + 3, p)

r: Value of pd_assurance_index_no operand

s: Number of plug-ins installed

t: Total number of plug-in functions used with DML#2

u: Total number of parameters for the plug-in functions used with DML#2

v: Value of pd_max_list_users operand

w: Value of pd_max_list_count operand

x: Value of pd_type_def_cache_size operand

y: Value of pd_routine_def_cache_size operand

z: Total number of global buffers (number of pdbuffer operands specified)
If Y is specified in the pd_dbbuff_modify operand, add the pd_max_add_dbbuff_no operand value of the server definition to the number of pdbuffer statements related to the server.

A: Value of pd_registry_cache_size operand

E: Value of the pd_inner_replica_control operand

F: Value of the pd_assurance_table_no operand

G: Maximum number of transactions in the server (2 [Figure] e + 7)

H: Value of the pd_dfw_awt_process operand

I: Total number of pdplgprm operands specified in the front-end server

Ji: Size of the shared memory specified in the ith pdplgprm operand specified in the front-end server

K: Total number of pdplgprm operands specified in the dictionary server

Li: Size of the shared memory specified in the ith pdplgprm operand specified in the dictionary server

M: Total number of pdplgprm operands specified in the back-end server

Ni: Size of the shared memory specified in the ith pdplgprm operand specified in the back-end server

Q: Value of the pd_max_resident_rdarea_no operand

R: Value of the pd_max_resident_rdarea_shm_no operand

S: Value of the pd_max_temporary_object_no operand

U: Number of tables that will use the free space reusage facility

#1: For a dictionary server, use the value of the pd_max_dic_process operand. For a back-end server, use the value of the pd_max_bes_process operand. If the pd_max_dic_process or pd_max_bes_process operand is omitted, use the value of the pd_max_users operand.

#2: You can use the following SQL statement to obtain the total number of plug-in functions and the total number of parameters for the plug-in functions used with DML:
SELECT COUNT(*),SUM(N_PARAM) FROM MASTER.SQL_PLUGIN_ROUTINES
WHERE PLUGIN_NAME  =  'plug-in-name'
AND (TIMING_DESCRIPTOR  =  'ADT_FUNCTION'
    OR TIMING_DESCRIPTOR IS NULL
    OR TIMING_DESCRIPTOR  =  'BEFORE_INSERT'
    OR TIMING_DESCRIPTOR  =  'AFTER_INSERT'
    OR TIMING_DESCRIPTOR  =  'BEFORE_UPDATE'
    OR TIMING_DESCRIPTOR  =  'AFTER_UPDATE'
    OR TIMING_DESCRIPTOR  =  'BEFORE_DELETE'
    OR TIMING_DESCRIPTOR  =  'AFTER_DELETE'
    OR TIMING_DESCRIPTOR  =  'BEFORE_PURGE_TABLE'
    OR TIMING_DESCRIPTOR  =  'AFTER_PURGE_TABLE'
    OR TIMING_DESCRIPTOR  =  'INDEX_SEARCH'
    OR TIMING_DESCRIPTOR  =  'INDEX_COUNT'
    OR TIMING_DESCRIPTOR  =  'INDEX_INSERT'
    OR TIMING_DESCRIPTOR  =  'INDEX_BEFORE_UPDATE'
    OR TIMING_DESCRIPTOR  =  'INDEX_AFTER_UPDATE'
    OR TIMING_DESCRIPTOR  =  'INDEX_DELETE'
    OR TIMING_DESCRIPTOR  =  'PURGE_INDEX'
    OR TIMING_DESCRIPTOR  =  'INDEX_MAINTENANCE_DEFERRED'
    OR TIMING_DESCRIPTOR  =  'BEFORE_INSERT_DC'
    OR TIMING_DESCRIPTOR  =  'BEFORE_UPDATE_DC'
    OR TIMING_DESCRIPTOR  =  'BEFORE_DATA_CHECK'
    OR TIMING_DESCRIPTOR  =  'AFTER_DATA_CHECK')