16.2.4 Formulas for shared memory used by each server
(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.
- 32-bit mode
40 + b 1.3 + c + d + k + 1.6 n + x + y + 4 + {[(a + 12) 13] 1.1 + [(a + 62) 63] + 3.7} (e + 3) + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4 + 12 {(b 3) + 1 - mod(b 3, 2)} + 4 a {(e + 3) 2 + 1 + MAX(e 10, 5)} + 32 + {16 (f + 1) g} + 112 B + {(c 8) + 7} 64![[Figure]](figure/zueng010.gif) 8 + {(k 8) + 7} 64![[Figure]](figure/zueng010.gif) 8 + MAX{a (e + 3), c 8} 88 + MAX{a (e + 3), k 8}
24 + {(x 4) + 7} 64![[Figure]](figure/zueng010.gif) 8 + {[(y - (s 592 + t 916 + u 172)) 2] + 7} 64![[Figure]](figure/zueng010.gif)
8 + MAX{13 (e + 3), x 4} 88 + 60 MAX{21 (e + 3), (y - (s 592 + t 916 + u
172)) 2} + 44 + 256 + 1024 } 1024 + A + 7 I + (Ji) i=1
- Add this value if you specified INITIAL in the pd_def_buf_control_area_assign operand or omitted this operand.
+ {[(a + 12) 13] 1.1 + [(a + 62) 63] + 3.7} (e + 7)
- Add this when the HiRDB External Data Access facility is used.
+ { (40 + (32 + 144 C + D)) 512![[Figure]](figure/zueng010.gif) 512 } 1024 + (B 3616) 1024 ![[Figure]](figure/zueng010.gif)
(KB) |
- 64-bit mode
40 + b 1.3 + c + d + k + 1.6 n + x + y + 5 + {[(a + 12) 13] 1.2 + [(a + 62) 63] 1.5 + 4.1} (e + 3) + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4 + 12 {(b 3) + 1-mod(b 3, 2)} + 4 a {(e + 3) 2 + 1 + MAX(e 10, 5)} + 48 + {16 (f + 1) g} + {(c 8) + 7} 64![[Figure]](figure/zueng010.gif) 8 + {(k 8) + 7} 64![[Figure]](figure/zueng010.gif) 8 + MAX(a (e + 3), c 8) 104 + MAX{a (e + 3), k 8} 40 + {(x 4) + 7} 64![[Figure]](figure/zueng010.gif) 8 + {[(y-(s 600 + t 936 + u 184)) 2] + 7} 64![[Figure]](figure/zueng010.gif) 8 + MAX{13 (e + 3), x 4} 104 + 72 MAX{21 (e + 3), (y-(s 600 + t 936 + u 184)) 2} + 72 + 256 + 1536 } 1024 + A + 7 I + (Ji) i=1
- Add this value when INITIAL is specified in the pd_def_buf_control_area_assign operand or the operand is omitted.
+ {[(a + 12) 13] 1.2 + [(a + 62) 63] 1.5 + 4.1} (e + 7) (KB) |
(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 +
{(
(40 + (value obtained by adding Formulas 2 through 4))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
- For 64-bit mode (KB):
Formula 1 +
{(
(72 + (value obtained by adding Formulas 2 through 4))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
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.
- Add Formula 4 if the pd_dfw_awt_process operand is specified.
- If you omit the pd_max_commit_write_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_sysdef_default_option operand, add Formula 5. However, if you have already added Formula 3, you do not need to add this formula.
- If you omit the pd_sds_shmpool_size operand, the following value is set:
For 32-bit mode:
{(
(40 + (total of Formulas 2 through 4))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
For 64-bit mode:
{(
(72 + (total of Formulas 2 through 4))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
Condition | Shared memory calculation formula (KB) |
---|
Formula 1 (KB) | - 32-bit mode
b 1.3 + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4 + 12 {(b 3) + 1-mod(b 3, 2)} + 8 a {(e + 3) 2 + 1 + MAX(e 10, 5)} + 512 } 1024 + 3.5 + (224 v w) 1024 + 0.5 + {
(28 + ( (32 + (( g 127 + 1) 2048 + 128)) 32![[Figure]](figure/zueng010.gif) 32))
128![[Figure]](figure/zueng010.gif) 128 } 1024![[Figure]](figure/zueng010.gif) K + (Li) i=1
- 64-bit mode
b 1.3 + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4 + 12 {(b 3) + 1-mod(b 3, 2)} + 8 a {(e + 3) 2 + 1 + MAX(e 10, 5)} + 1024 } 1024 + 3.5 + (224 v w) 1024 + 0.5 + {
(56 + ( (56 + (( g 127 + 1) 2048 + 128)) 32![[Figure]](figure/zueng010.gif) 32))
128![[Figure]](figure/zueng010.gif) 128 } 1024![[Figure]](figure/zueng010.gif) K + (Li) i=1 |
Formula 2 (bytes) | - 32-bit mode
- 500
1024 - + (
372 g 16![[Figure]](figure/zueng010.gif) 16) + 328 h + 112 2403 - + 5072
(e + 15) + 96 z - + 32
m + 172 {a (e + 3) + (e + 3) 2 + 22} + 16 - + 48
p + 36 {(e + 3) 2 + 1 + MAX(5, [e + 3] 10)} - + 68
G + 641 + 3682 - + ((
( (g 8) + 3) 4 ) 4) m
- }
1024![[Figure]](figure/zueng010.gif)
- 64-bit mode
- 500
1024 - + (
472 g 16![[Figure]](figure/zueng010.gif) 16) + 344 h - + (
136 240 16![[Figure]](figure/zueng010.gif) 16)4 - + 9424
(e + 15) + 144 z - + 48
m + 336 {a (e + 3) + (e + 3) 2 + 22} + 16 - + 32
p + 72 {(e + 3) 2 + 1 + MAX(5, [e + 3] 10)} - + 68
G + 641 + 4482 - + ((
( (g 8) + 7) 8 ) 8) m
|
Formula 3 (bytes) | - 32-bit mode
(32 + 16 z) (G + 1) + 16
- 64-bit mode
(48 + 32 z) (G + 1) + 16 |
Formula 4 (bytes) | - 32-bit mode
88 + 52 H + 3400
- 64-bit mode
112 + 56 H + 7200 |
Formula 5 (bytes) | - 32-bit mode
(32 + 16 z) P + 16
- 64-bit mode
- (48 + 32
z) P + 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 When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use 112
MAX(r, i
1.2) for calculating instead of 112
240.
- 4 When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use (
136
MAX(r, (i
1.2))
16 ![[Figure]](figure/zueng010.gif)
16) for calculating instead of (
136
240
16 ![[Figure]](figure/zueng010.gif)
16).
(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 +
{(
(40 + (value obtained by adding Formulas 2 through 4, and Formula 7))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024
+
{(
(40 + Formula 6)
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
- For 64-bit mode (KB):
- Formula 1 +
{(
(72 + (value obtained by adding Formulas 2 through 5, and Formula 7))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024
+
{(
(72 + Formula 6)
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
For details about the variables used in these formulas, see (4) below.
- Notes on Formulas 1 through 8
- If any of the following conditions is satisfied, add Formula 3:
Y is specified in the pd_rdarea_open_attribute_use operand
Y is specified in the pd_lv_mirror_use operand
The rapid switchover facility is used
- If either of the following conditions is satisfied, add Formula 4:
commit is specified in the pd_dbsync_point operand
Y is specified in the pd_shared_rdarea_use operand
- If commit is specified in the pd_inner_replica_control operand, add Formula 5.
- If HiRDB External Data Access is installed, add Formula 5.
- If you omit the pd_max_commit_write_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_sysdef_default_option operand, add Formula 8. However, if you have already added Formula 4, you do not need to add this formula.
- If you omit the pd_bes_shmpool_size operand, the following value is set:
For 32-bit mode:
{(
(40 + (total of Formulas 2 through 5, 6, and 7))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024
+
{(
(40 + Formula 5)
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
For 64-bit mode:
{(
(72 + (total of Formulas 2 through 5, 6, and 7))
512 ![[Figure]](figure/zueng010.gif)
512)}
1024
+
{(
(72 + Formula 5)
512 ![[Figure]](figure/zueng010.gif)
512)}
1024 ![[Figure]](figure/zueng010.gif)
Condition | Shared memory calculation formula |
---|
Formula 1 (KB) | - 32-bit mode
- b
1.3
- + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4- + 12
{(b 3) + 1 - mod(b 3, 2)} - + 8
a {(e + 3) 2 + 1 + MAX(e 10, 5)} +512 +5121
- }
1024
- +
{72 + 8 v (8 + 3 w)} 1024![[Figure]](figure/zueng010.gif)
- +
{( g 127 + 1) 2048 + 128} 1024 ![[Figure]](figure/zueng010.gif) + {
(28 + ( (32 + (( g 127 + 1) 2048 + 128)) 32![[Figure]](figure/zueng010.gif) 32))
128![[Figure]](figure/zueng010.gif) 128} } 1024![[Figure]](figure/zueng010.gif) M + (Ni) i=1
- 64-bit mode
- b
1.3
- + {
![[Figure]](figure/zueng010.gif) b 64![[Figure]](figure/zueng010.gif) (8 16) ![[Figure]](figure/zueng010.gif) 4 4- + 12
{(b 3) + 1 - mod(b 3, 2)} - + 8
a {(e + 3) 2 + 1 + MAX(e 10, 5)} +1024 +5121
- }
1024
- +
{72 + 24 v (2 + w)} 1024![[Figure]](figure/zueng010.gif)
- +
{ (56 + ( (56 + (( g 127 + 1) 2048 + 128)) 32![[Figure]](figure/zueng010.gif) 32)) 128![[Figure]](figure/zueng010.gif) 128 } 1024![[Figure]](figure/zueng010.gif) M + (Ni) i=1 |
Formula 2 (bytes) | - 32-bit mode
- 500
1024 - + (308 + 481)
g + 328 h + 112 r4 - + 5072
(e + 15) + 96 z - + 32
m + 172 {a (e + 3) + (e + 3) 2 + 22} + 16 - + 48
p + 48 {(e + 3) 2 + 1 + MAX(5, [e + 3] 10)} - + 68
G + 144 F + 80 + 32 g + 642 + 963 - + ((
( (g 8) + 3) 4 ) 4) m
- 64-bit mode
- 500
1024 - + (400 + 561)
g + 344 h + 136 r5 - + 9424
(e + 15) + 144 z - + 48
m + 336 {a (e + 3) + (e + 3) 2 + 22} + 16 - + 64
p + 96 {(e + 3) 2 + 1 + MAX(5, [e + 3] 10)} - + 68
G + 160 F + 96 + 48 g + 642 + 1283 - + ((
( (g 8) + 7) 8 ) 8) m
|
Formula 3 (bytes) | - 32-bit mode
{{[(![[Figure]](figure/zueng010.gif) g 8 ![[Figure]](figure/zueng010.gif) 4 ) 4] + 8} (a [[e + 3] + e + 15)}
- 64-bit mode
{([(![[Figure]](figure/zueng010.gif) g 8 ![[Figure]](figure/zueng010.gif) 8 ) 8] + 8} (a [e + 3] + e + 15)} |
Formula 4 (bytes) | - 32-bit mode
(32 + 16 z) (e 2 + 7 + 1) + 16
- 64-bit mode
(48 + 32 z) (e 2 + 7 + 1) + 16 |
Formula 5 (bytes) | - 32-bit mode
32 + 144 C + (6160 + 112 + 48 e) B |
Formula 6 (bytes) | 56 E + 16 |
Formula 7 (bytes) | - 32-bit mode
88 + 52 H + 3400
- 64-bit mode
112 + 56 H + 7200 |
Formula 8 | - 32-bit mode
(32 + 16 z) P + 16
- 64-bit mode
(48 + 32 z) P + 16 |
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 When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use 112
MAX((i
1.2), r) for calculating instead of 112
r.
- 5 When you specify v6compatible or v7compatible in the pd_sysdef_default_option operand, use 136
MAX((i
1.2), r) for calculating instead of 136
r.
(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 operand1
- f: Total number of back-end servers
- g: Value of pd_max_rdarea_no operand
- h: Value of pd_max_file_no operand
- i: Total number of indexes in the server (for a partitioning key index, this is the number of partitions in the server)
- 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.
- n: Value of pd_alias_cache_size operand
- 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 DML2
- u: Total number of parameters for the plug-in functions used with DML2
- 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
- B: Value of the pd_max_foreign_server operand
- C: Total number of DBMSs supported by HiRDB External Data Access Adapters
- HiRDB External Data Access Adapters for HiRDB or XDM/RD E2 connection: 3
- HiRDB External Data Access Adapters for ORACLE connection: 1
- HiRDB External Data Access Adapters for DDB2 connection: 1
- If all HiRDB External Data Access Adapters are installed, the total number of supported DBMSs is 5.
- D: Total number of HiRDB External Data Access Adapters for SQL exchanges
- HiRDB External Data Access Adapters for HiRDB or XDM/RD E2 connection: 512
- HiRDB External Data Access Adapters for ORACLE connection: 2048
- HiRDB External Data Access Adapters for DB2 connection: 512
- 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
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
- P: Value of the pd_max_commit_write_reclaim_no operand
- 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')