15.1.4 Formulas for shared memory used by a single server

This subsection lists and describes the formulas used for calculating the shared memory used by a HiRDB/Single Server.

For 32-bit mode (KB):
Formula 1 + [Figure] {([Figure] (value obtained by adding Formulas 2 through 6, 8, 9)) [Figure] 512 [Figure] x 512)} [Figure] 1,024 [Figure]
For 64-bit mode (KB):
Formula 1 + [Figure] {([Figure](72 + (value obtained by adding Formulas 2 through 8, 9)) [Figure] 512 [Figure] x 512)} [Figure] 1,024 [Figure]
Notes on Formulas 1 to 9:
  • If Y is specified in the pd_rdarea_open_attribute_use operand, add Formula 3.
  • If commit is specified in either the pd_dbsync_point operand or the pd_system_dbsync_point operand, add Formula 4. The default for the pd_system_dbsync_point operand is commit.
  • If the pd_dfw_awt_process operand is specified, add Formula 5.
  • If you omit the pd_sds_shmpool_size operand, the following value is set:
    For 32-bit mode:
    [Figure]{([Figure] (40 + (value obtained by adding Formulas 2 through 6, 8, 9)) [Figure] 512 [Figure] x 512)} [Figure] 1,024 [Figure]
    For 64-bit mode:
    [Figure]{([Figure] (72 + (value obtained by adding Formulas 2 through 8, 9)) [Figure] 512 [Figure] x 512)} [Figure] 1,024 [Figure]
  • If you omit the pd_max_commit_write_reclaim_no operand (except cases in which v6compatible or v7compatible is specified in the pd_sysdef_default_option operand), or you specify a value other than 0 in the pd_max_commit_write_reclaim_no operand, add Formula 7. However, if you have already added Formula 4, you do not need to add this formula.
  • If you specify the pd_max_resident_rdarea_no operand, add Formula 7.
  • If you specify the pd_max_temporary_object_no operand, add Formula 8.
  • If you specify the pd_max_tmp_table_rdarea_no operand, add Formula 9.

The following table shows Formulas 1 through 8.

FormulaShared memory calculation formula
Formula 1 (KB)
32-bit mode
b x 1.3 + c + d + f + 1.6 + q + r + 4
+ { [ (a + 12) [Figure] 13] x 1.1 + [ (a + 62) [Figure] 63] + 3.7} x (e + 3) + 3.5
+ {
[Figure]([Figure] (b[Figure]64) [Figure]) x (8 [Figure] 16) [Figure] x 4 x 4
+ 12 x {(b[Figure] 3) + 1 - mod (b[Figure] 3, 2)}
+ 8 x a x {(e + 3) x 2 + 1 + MAX (e[Figure] 10, 5)} + 32 + 20,000
+ [Figure]{(c[Figure] 8) + 7} [Figure] 64[Figure] x 8 + [Figure]{(f[Figure] 8) + 7} [Figure] 64[Figure] x 8
+ MAX {a x (e + 3), c[Figure] 8} x 104 + MAX {a x (e + 3), f[Figure] 8} x 24
+ [Figure]{(q[Figure] 4) + 7} [Figure] 64[Figure] x 8
+ [Figure]{[(r - (s x 592 + t x 916 + u x 172)) [Figure] 2] + 7} [Figure] 64[Figure] x 8
+ MAX {13 x (e + 3), q[Figure] 4} x 88
+ MAX {21 x (e + 3), [r - (s x 592 + t x 916 + u x 172)] [Figure] 2} x 60
+ 44 + 256 + 1,024 + 512#1
} [Figure] 1,024 + y + 7.5
+ [Figure]{248 x v x w + 47 x v + 72} [Figure] 1,024[Figure]
+ [Figure] { [Figure] (28 + ([Figure](32 + (([Figure]g[Figure] 127[Figure] + 1) x 2,048 + 128)) [Figure] 32[Figure] x 32))
[Figure]128[Figure] x 128
} [Figure] 1,024[Figure]
D
+ [Figure](Ei)
i=1
Add this if the pd_def_buf_control_area_assign operand is specified as INITIAL or if the operand is omitted.
+ {[(a + 12) [Figure] 13] x 1.1 + [(a + 62) [Figure] 63] + 3.7} x (e + 7)
64-bit mode
b x 1.3 + c + d + f + 1.6 + q + r + 5
+ { [ (a + 12) [Figure] 13] x 1.2 + [ (a + 62) [Figure] 63] x 1.5 + 4.1} x (e + 3) + 3.5
+ {
[Figure]([Figure] (b[Figure] 64) [Figure]) x (8 [Figure] 16) [Figure] x 4 x 4 + 12
x {(b[Figure] 3) + 1 - mod (b[Figure] 3, 2)}
+ 8 x a x {(e + 3) x 2 + 1 + MAX (e[Figure] 10, 5)} + 48 + 20,000
+ [Figure]{(c[Figure] 8) + 7} [Figure] 64[Figure] x 8 + [Figure]{(f[Figure] 8) + 7} [Figure] 64[Figure] x 8
+ MAX {a x (e + 3),c[Figure] 8} x 104 + MAX {a x (e + 3), f[Figure] 8} x 40
+ [Figure]{(q[Figure] 4) + 7} [Figure] 64[Figure] x 8
+ [Figure]{[(r - (s x 600 + t x 936 + u x 182)) [Figure] 2] + 7} [Figure] 64[Figure] x 8
+ MAX {13 x (e + 3), q[Figure] 4} x 104
+ MAX {21 x (e + 3), [r - (s x 600 + t x 936 + u x 184)] [Figure] 2} x 72
+ 72 + 256 + 1,536 + 512#1
} [Figure] 1,024 + y + 7.5
+ [Figure]{248 x v x w + 64 x v + 72} [Figure] 1,024[Figure]
+ [Figure]{[Figure](56 + ([Figure](56 + (([Figure]g[Figure] 127[Figure] + 1) x 2,048 + 128)) [Figure] 32[Figure] x 32))
[Figure]128[Figure] x 128
} [Figure] 1,024
D
+ [Figure](Ei)
i=1
Add this if the pd_def_buf_control_area_assign operand is specified as INITIAL or if the operand is omitted.
+ {[(a + 12) [Figure] 13] x 1.2 + [(a + 62) [Figure] 63] x 1.5 + 4.1} x (e + 7)
Formula 2 (bytes)
32-bit mode
500 x 1,024
5,072 x (e + 15) + ([Figure]372 x g[Figure] 16[Figure] x 16) + 48#1 x g + 328 x h
+ 112 x (p + 240)#5
+ 96 x x + 32 x j + 132 x {19 + (e + 3) x 3}
+ 48 x n + 48 x {(e + 3) x 2 + 1 + MAX(5,(e + 3) [Figure] 10)}
+ 68 x B + 144 x A#7 + 80 + 32 x g + 64#2 + 368#3
+ (([Figure] ([Figure] (g[Figure] 8) [Figure] + 3) [Figure] 4 [Figure]) x 4) x j
64-bit mode
500 x 1,024
9,416 x (e + 15) + ([Figure]472 x g[Figure] 16[Figure] x 16)
+ ([Figure]56#1 x g[Figure] 16[Figure] x 16) + 344 x h
+ ([Figure]136 x (p + 240) [Figure] 16 [Figure] x 16)#6
+ 144 x x + 48 x j + 240 x {19 + (e + 3) x 3}
+ 64 x n + 96 x {(e + 3) x 2 + 1 + MAX(5,(e + 3) [Figure] 10)}
+ 68 x B + 160 x A#8 + 96 + 48 x g + 64#2 + 448#3
+ (([Figure] ([Figure] (g[Figure] 8) [Figure] + 7) [Figure] 8 [Figure]) x 8) x j
Formula 3 (bytes)
32-bit mode
{[([Figure][Figure]g[Figure] 8[Figure][Figure] 4[Figure]) x 4] + 8} x {(e + 3) x 2 + 12}
64-bit mode
{[([Figure][Figure]g[Figure] 8[Figure][Figure] 8[Figure]) x 8] + 8} x {(e + 3) x 2 + 12}
Formula 4 (bytes)
32-bit mode
(32 + 16 x x) x (e x 2 + 7 + 1) + 16
64-bit mode
(48 + 32 x x) x (e x 2 + 7 + 1) + 16
Formula 5 (bytes)
32-bit mode
72 + 52 x C + 68 x x
If you specify 1 in the pd_dbbuff_trace_level operand, add:
+ 320 x x
64-bit mode
96 + 56 x C + 72 x x
If you specify 1 in the pd_dbbuff_trace_level operand, add:
+ 640 x x
Formula 6 (bytes)
32-bit mode
(32 + 16 x x) x F + 16
64-bit mode
(48 + 32 x x) x F + 16
Formula 7 (bytes)16 + 112 + (48 + 48 x G) + (48 + 32 x H)
Formula 8
(bytes)
16 + 80 x I
Formula 9
(bytes)
[Figure](112 + (28 + J x 52)) [Figure] 8[Figure] x 8
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
f: Value of pd_view_def_cache_size operand
g: Value of pd_max_rdarea_no operand
h: Value of pd_max_file_no operand
i: Total number of indexes in the server
However, for partitioning key indexes this is the number of partitions in the server.
This variable must be considered if v6compatible or v7compatible is specified in the pd_sysdef_default_option operand.
j: Number of global buffers for indexes
If Y is specified in the pd_dbbuff_modify operand, add the pd_max_add_dbbuff_no operand value to the number of pdbuffer commands that have been specified.
n: Value of pd_lck_until_disconnect_cnt operand
p: Value of pd_assurance_index_no operand
q: Value of pd_type_def_cache_size operand
r: Value of pd_routine_def_cache_size operand
s: Number of plug-ins installed
t: Total number of plug-in functions used with DML#4
u: Total number of parameters for the plug-in functions used with DML#4
v: Value of pd_max_list_users operand
w: Value of pd_max_list_count operand
x: Total number of global buffers (number specified in the pdbuffer operand)
If Y is specified in the pd_dbbuff_modify operand, add the pd_max_add_dbbuff_no operand value to the number of pdbuffer commands that have been specified.
y: Value of pd_registry_cache_size operand
A: Value of the pd_assurance_table_no operand
B: Maximum number of transactions in the server (2 x e + 7)
C: Value of the pd_dfw_awt_process operand
D: Total number of specified pdplgprm operands
Ei: Size of the shared memory specified by the ith pdplgprm operand.
F: Value of the pd_max_commit_write_reclaim_no operand
G: Value of the pd_max_resident_rdarea_no operand
H: Value of the pd_max_resident_rdarea_shm_no operand
I: Value of the pd_max_temporary_object_no operand
J: Value of the pd_max_tmp_table_rdarea_no operand
T: Number of tables that will use the free space reusage facility
#1: Add this value if neither the pd_max_list_users nor pd_max_list_count operand is 0.
#2: Add this value if at least 1 is specified in the pd_max_ard_process operand.
#3: Add this value if the facility for predicting reorganization time is used.
#4: 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')

#5: When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use 112 x MAX(p, i x 1.2) for calculating instead of 112 x (p + 240).
#6: When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use ([Figure] 136 x MAX(p, (i x 1.2)) [Figure] 16 [Figure] x 16) for calculating instead of ([Figure] 136 x (p + 240) [Figure] 16 [Figure] x 16).
#7: When you specify v7compatible in the pd_sysdef_default_option operand, use 144 x MAX(A, T + 100) instead of 144 x A.
#8: When you specify v7compatible in the pd_sysdef_default_option operand, use 160 x MAX(A, T + 100) instead of 160 x A.