OpenTP1 Version 7 System Definition

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

Appendix B.1 Estimating the shared memory requirements for TP1/Server Base

This appendix explains how to estimate the shared memory requirements for TP1/Server Base. The results of all formulas explained in this appendix are in bytes.

Organization of this subsection
(1) Estimating the static shared memory requirements (for nodes other than archive journal nodes)
(2) Estimating the static shared memory requirements (for an archive journal node)
(3) Estimating the dynamic shared memory requirements
(4) Estimating the shared memory requirements for the DAM service
(5) Estimating the shared memory requirements for the TAM service
(6) Estimating the shared memory requirements for the IST service
(7) Estimating the shared memory requirements for the real-time statistics service
(8) Estimating the shared memory pool size

(1) Estimating the static shared memory requirements (for nodes other than archive journal nodes)

This subsection explains how to estimate the size of the static shared memory to be specified in the static_shmpool_size operand of the system environment definition. Use the appropriate formula to estimate the size of the static shared memory.

(a) System manager
32-bit version

128 x (maximum number of servers specified in the system environment definition + 3) + 6024 + maximum number of user servers for which statistics are output to journal files by using the dcstats command x 1024

64-bit version

128 x (maximum number of servers specified in the system environment definition + 3) + 8000 + maximum number of user servers for which statistics are output to journal files by using the dcstats command x 1280

(b) Process server

944 x prc_process_count + 60624

(c) Timer server

32 x tim_watch_count + 1440

(d) Scheduler

[Figure]

Legend:
i: Number of defined schedule buffer groups
j: Number of defined service groups for which the scdbufgrp definition command is not specified
k: Number of defined service groups for which Y is specified in the service_hold operand of the user service definition
L: Number of defined service groups for which namedpipe is specified in the schedule_method operand of the user service definition
M: Number of multi-scheduler groups
N: Number of multi-scheduler daemons
o: Number of defined service groups for which the scdsvcdef definition command is specified in the user service definition (this value applies to queue-receiving server SPPs)
(e) Lock server
32-bit version

(lck_limit_foruser + lck_limit_fordam + lck_limit_fortam + lck_limit_formqa) x 544 + 62016 + 128

64-bit version

(lck_limit_foruser + lck_limit_fordam + lck_limit_fortam + lck_limit_formqa) x 544 + 62432 + 128

(f) Transaction manager
32-bit version

2048 + 1280 x (number of RM-name + RM-extension entries) + (816 + 128 x number of RM-name-and-RM-extension instances)

+ 128 x trn_max_subordinate_count value

+ [Figure] (63 + 4 x (number of RM-name + RM-extension entries) / 32 [Figure] x 32) x trn_tran_process_count + (C x (trn_max_crm_subordinate_count + 1) x trn_tran_process_count x 1216) + 128

Legend:
[Figure] [Figure]: A fraction part in the calculation result between these symbols is truncated.
C: When Y is specified in the trn_crm_use operand, C is 1. When N is specified in the trn_crm_use operand, C is 0.
64-bit version

2048 + 1280 x (number of RM-name + RM-extension entries) + (816 + 128 x (number of RM-name + RM-extension entries)) + 128 x trn_max_subordinate_count + [Figure] (63 + 4 x (number of RM-name.RM-extension entries) /32 [Figure] x 32) x trn_tran_process_count + (C x (trn_max_crm_subordinate_count + 1) x trn_tran_process_count value x 1248) + 128

Legend:
[Figure] [Figure]: A fraction part in the calculation result between these symbols is truncated.
C: When Y is specified in the trn_crm_use operand, C is 1. When N is specified in the trn_crm_use operand, C is 0.
(g) Journal server
Node for which journal data is not archived to the archive journal node

4864 + 256 x number of defined jnladdfg definition commands

+ 480 x m x number of defined jnladdfg definition commands

+ 64 x m

+ 128 x (m x 2 + 1)

+ 4096 x m x i

+ [Figure](128 x (34 + 2 x number of defined jnladdfg definition commands x 2 x m) / 8064)[Figure] x 8192

+ [Figure](jnl_max_datasize + 336) / 4096[Figure] x 4096 x (m x 2 + 1)

+ [Figure](jnl_max_datasize + 336) / 4096[Figure] x 4096 x 16 x m

+ [Figure](388 + 192 x m) / 4096[Figure] x 4096

+ n

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
i: When Y is specified for the jnl_dual operand in the system journal service definition, i is 2. When N is specified, i is 1.
m: Value of the jnl_max_file_dispersion operand in the system journal service definition
n: When Y is specified for the jnl_auto_unload operand in the system journal service definition, n is 128. When N is specified, n is 0.
Node for which journal data is archived to the archive journal node

4864 + 256 x number of defined jnladdfg definition commands

+ 480 x m x number of defined jnladdfg definition commands

+ 64 x m

+ 128 x (m x 2 + 1)

+ 4096 x m x i

+ [Figure](128 x (34 + 2 x number of defined jnladdfg definition commands x 2 x m) / 8064)[Figure] x 8192

+ [Figure](jnl_max_datasize + 336) / 4096 [Figure] x 4096 x (m x 2 + 1)

+ [Figure](jnl_max_datasize + 336) / 4096 [Figure] x 4096 x 16 x m

+ [Figure](388 + 192 x m) / 4096 [Figure] x 4096

+ n

+ 512

+ 128 x [Figure](j x 1024 x 1024 / (k x 1024))[Figure]

+ k x 1024 x [Figure](j x 1024 x 1024 / (k x 1024))[Figure]

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
[Figure] [Figure]: The calculation result between these symbols is rounded down to the nearest whole number.
i: When Y is specified for the jnl_dual operand in the system journal service definition, i is 2. When N is specified, i is 1.
m: Value of the jnl_max_file_dispersion operand in the system journal service definition
n: When Y is specified for the jnl_auto_unload operand in the system journal service definition, n is 128. When N is specified, n is 1.
j: Value of the jnl_arc_buff_size operand
k: Value of the jnl_arc_max_datasize operand
Node that uses journal fileless mode

The required amount of shared memory is 10,496 bytes.

(h) Checkpoint dump
32-bit version

17872 + number of definitions in the checkpoint dump service definition x 688 + (number of jnladdfg operands defined in the checkpoint dump service definition) x 400

64-bit version

18640 + number of definitions in the checkpoint dump service definition x 784 + (number of jnladdfg operands defined in the checkpoint dump service definition) x 400

Node that uses journal fileless mode

No shared memory is required.

(i) Server recovery journal
32-bit version

1376 + 6272 x n + ([Figure](a + 336) / 4096[Figure] + 1) x 4096 x n

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
n: When TP1/Message Queue is not used, n is the number of RMs provided by OpenTP1 + 2. When TP1/Message Queue is used, n is the number of internal RMs + 3.
a: Maximum record data length specified in the system journal service definition.
64-bit version

4448 x 6856 x n + ([Figure](a + 336) / 4096[Figure] + 1) x 4096 x n

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
n: When TP1/Message Queue is not used, n is the number of RMs provided by OpenTP1 + 2. When TP1/Message Queue is used, n is the number of internal RMs + 3.
a: Maximum record data length specified in the system journal service definition.
(j) Transaction journal
Node that does not use journal fileless mode

13472 + 1200 x trn_tran_process_count + 64 x (trn_tran_process_count x trn_max_subordinate_count) + ([Figure](J + 336) / 4096[Figure]) x 4096 + DAM + TAM + MCF + MQ

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
J: Value of the jnl_max_datasize operand specified in the system journal service definition.
DAM: When TP1/FS/Direct Access is not used, DAM is 0. When TP1/FS/Direct Access is used, DAM is the value obtained from the following expression:
128 + 128 x trn_tran_process_count + (4160 + ([Figure](J + 336) / 4096[Figure] x 4096)) x (trn_recovery_process_count) + 56 x (trn_tran_process_count x 2 + 2)
TAM: When TP1/FS/Table Access is not used, TAM is 0. When TP1/FS/Table Access is used, TAM is the value obtained from the following expression:
4288 + 240 x trn_tran_process_count + ([Figure] (J + 336) / 4096[Figure]) x 4096
MCF: When TP1/Message Control is not used, MCF is 0. When TP1/Message Control is used, MCF is the value obtained from the following expression:
128 + 240 x trn_tran_process_count + (4160 + ([Figure] (J + 336) / 4096[Figure] x 4096)) x (trn_recovery_process_count)
MQ: When TP1/Message Queue is not used, MQ is 0. When TP1/Message Queue is used, MQ is the value obtained from the following expression:
4288 + 240 x trn_tran_process_count + ([Figure] (J + 336) / 4096[Figure]) x 4096
Node that uses journal fileless mode

No shared memory is required.

(k) Status server

The required shared memory is 64 bytes.

(l) Name server

(name_total_size + name_cache_size) x 1024

The values of name_total_size and name_cache_size are calculated as follows:

name_total_size

= [Figure](7176 + (number of nodes specified in all_node x 284 + number of nodes specified in all_node_ex x 284 + all_node_extend_number x 284 + all_node_ex_extend_number x 284) + ((number of SPPs#1 + number of RAP-processing servers#2 + number of XATMIs#3) x 264) + MCF#4 + DAM#5 + TAM#6 + CLT#7) / 1024[Figure]

name_cache_size = [Figure](total number of SPPs#1 started on nodes#8 specified in the all_node and all_node_ex operands x 224) / 1024[Figure]

Legend:

[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.

#1
This value is the number of service groups.

#2
When the RAP-processing server is started, specify the number of RAP-processing services.

#3
When the XATMI-API is used, this value is the total number of services defined in XATMI SPPs.

#4
When the MCF facility is used, this is the value obtained from the following expression:
(1 + number of MCF communication servers + number of MHPs) x 264

#5
When the DAM facility is used, this value is 936.

#6
When the TAM facility is used, this value is 1424.

#7
When the client extended service facility is used, this value is 936.

#8
Either the nodes specified for the all_node and all_node_ex operands in the system common definition or the nodes specified in the domain definition file
(m) Queue server

When a disk queue is used, use the following formula to estimate the shared memory requirements (no estimation is necessary when only a memory queue is used).

32-bit version

[Figure]

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
n: Number of defined quegrp definition commands in the message queue service definition

#1:
The total number of records in the physical files defined by using quegrp definition commands. The number of records in a physical file is specified in the -n option of the queinit command.

#2:
The number of records specified in the -n option of the queinit command

#3:
The record length specified in the -s option of the queinit command
64-bit version

[Figure]

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
n: Number of defined quegrp definition commands in the message queue service definition

#1:
The total number of records in the physical files defined by using quegrp definition commands. The number of records in a physical file is specified in the -n option of the queinit command.

#2:
The number of records specified in the -n option of the queinit command

#3:
The record length specified in the -s option of the queinit command
(n) Performance trace acquisition service
When N is specified for the prf_trace operand

The required shared memory is 1,024 bytes.

When Y is specified for the prf_trace operand

The required shared memory is 1,551,360 bytes.

(o) RAP-processing listener and RAP-processing server

1024 + 148 x A + [Figure](A / 8)[Figure] + 260 x B

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
A: The value specified in the rap_parallel_server operand.
B: The value specified in the rap_max_client operand.
(p) XA resource service

672 + A x value of the trn_tran_process_count operand

Legend:
A: When the xar_msdtc_use operand is set to N or omitted, A is 288. When the xar_msdtc_use operand is set to Y, A is the record length of XAR files specified in the xarfile definition command.
(q) DAM
32-bit version

288 x (number of defined damfile definition commands + dam_added_file) + 256 + 512

64-bit version

288 x (number of defined damfile definition commands + dam_added_file) + 288 + 512

(r) IST

2336 + (48 x number of tables defined in the IST service definition) + 512

(s) Message queue (Windows)

16 + (72 + 12 x n1) x n2

Legend:
n1: The largest of the results of calculating the following expression for each of the user service definitions:
[Figure]message_store_buflen / message_cell_size[Figure]
For the RAP-processing listener service definition, when the value of the rap_parallel_server operand is 3 or smaller, n1 is 8.
When the value of the rap_parallel_server operand is 4 or greater, n1 is the value obtained from the following expression:
[Figure]rap_parallel_server x 2.1[Figure]
n2: The value of the scd_server_count operand in the schedule service definition + 5
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
(t) Real-time statistics service

The required shared memory is 64 bytes.

(u) Client extended service
M x N

Legend:
M: The value specified in the message_store_buflen operand of the client service definition
N: When both the transactional RPC executing process and CUP executing process are used, N is 2. When either process is used, N is 1.

(2) Estimating the static shared memory requirements (for an archive journal node)

This subsection explains how to estimate the size of the static shared memory to be specified in the static_shmpool_size operand of the system environment definition. Use the appropriate formula to estimate the size of the static shared memory.

(a) System manager

128 x (maximum number of servers specified in the system environment definition + 3) + 5487 + maximum number of user servers for which statistics are output to journal files by using the dcstats command x 1024

(b) Process server

The required shared memory is 251,648 bytes.

(c) Timer server

32 x tim_watch_count + 1440

(d) Journal server

[Figure]

Legend:
[Figure] [Figure]: A fraction part in the calculation result between these symbols is truncated.
r: Number of resource groups specified using jnldfsv -a in the global archive journal service definition.
d: Coefficient of whether resource group i is duplicated.
  • When the value of the jnl_dual operand is N, d is 1.
  • When the value of the jnl_dual operand is Y, d is 2.
m: The value of the jnl_max_file_dispersion operand specified for resource i.
(e) Name server

(name_total_size + name_cache_size) x 1024

The values of name_total_size and name_cache_size are calculated as follows:

name_total_size

=[Figure] (7176 + (number of nodes specified in all_node x 284 + number of nodes specified in all_node_ex x 284 + all_node_extend_number x 284 + all_node_ex_extend_number x 284) / 1024[Figure]

name_cache_size

=[Figure] (number of archive-journal source nodes connected to the archive journal node x 224) / 1024[Figure]

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
(f) Performance trace acquisition service
When N is specified for the prf_trace operand

The required shared memory is 99,328 bytes.

When Y is specified for the prf_trace operand

The required shared memory is 1,551,360 bytes.

(3) Estimating the dynamic shared memory requirements

This subsection explains how to estimate the size of the dynamic shared memory to be specified in the dynamic_shmpool_size operand of the system environment definition. Use the appropriate formula to estimate the size of the dynamic shared memory.

Note that the formulas in this subsection are for a node that is not an archive journal node. For an archive journal node, specify 0 for the dynamic shared memory requirement.

(a) Transaction journal
Node that does not use journal fileless mode

(((1 + ([Figure](jnl_max_datasize in the system journal service definition + 512) / 4096[Figure])) x 4096) + 32) x trn_tran_process_count

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
Node that uses journal fileless mode

No shared memory is required.

(b) Queue server

When a disk queue is used, use the following formula to estimate the shared memory requirements (no estimation is necessary when only a memory queue is used).

[Figure](number of request messages concurrently issued by multiple transactions before synchronization point processing x 48 + 32) / 8192[Figure] x (8192 + 512)

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
(c) DAM
32-bit version

When the transaction access type is branch access:
(364 x [Figure]number of files opened per transaction branch / 10[Figure] + 72 x dam_update_block + 304) x number of concurrently running transaction branches

When the transaction access type is global access:
(364 x [Figure]number of files opened per transaction branch / 10[Figure] + 72 x dam_update_block + 304) x number of concurrently running transaction branches + (128 + 48 x [Figure]number of transaction branches occurring per global transaction / 10[Figure]) x number of concurrently running global transactions

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
64-bit version

When the transaction access type is branch access:
(488 x [Figure]number of files opened per transaction branch / 10[Figure] + 72 x dam_update_block + 304) x number of concurrently running transaction branches

When the transaction access type is global access:
(488 x [Figure]number of files opened per transaction branch / 10[Figure] + 72 x dam_update_block + 304) x number of concurrently running transaction branches + (128 + 52 x [Figure]number of transaction branches occurring per global transaction / 10[Figure]) x number of concurrently running global transactions

Legend:
[Figure] [Figure]: The calculation result between these symbols is rounded up to the nearest whole number.
(d) TAM

128 + 32 x tam_max_tblnum

(4) Estimating the shared memory requirements for the DAM service

This subsection explains how to estimate the size of the shared memory used as the buffer area for backing up DAM blocks. This size is the value obtained by adding 1024 to D1 or D2, whichever is greater:

D1: Buffer area size specified in the dam_cache_size operand of the DAM service definition

D2: A + B

Legend:
A: (Mb / 64 + 1) x 128 x n x Tr
B: {[Figure](A/576)[Figure]} x 32 + 64
[Figure] [Figure]: A fraction part in the calculation result between these symbols is truncated.
Mb: Block size of the logical file among those defined in the DAM service definition that has the largest block size + 8 (a multiple of the sector size)
n: Maximum number of update blocks specified in the dam_update_block operand of the DAM service definition
Tr: Number of transaction branches specified in the dam_tran_process_count operand of the DAM service definition

When the buffer area size allocated as the shared memory for the DAM service is specified in the dam_cache_size or dam_cache_size_fix operand of the DAM service definition, the value specified in kilobytes is automatically converted into bytes. The dam_kb_size operand specifies whether 1 KB is handled as 1000 bytes or 1024 bytes. For details, see the description of the dam_kb_size operand of the DAM service definition.

(5) Estimating the shared memory requirements for the TAM service

The shared memory required for the TAM table is obtained from the following formula:

[Figure]

Legend:
n: Number of tamtable definition commands specified in the TAM service definition
Fa: Maximum number of intra-transaction access tables specified in the TAM service definition
Fb: Maximum number of concurrently running transaction branches specified in the TAM service definition
Fc: Maximum number of TAM files used during online processing and specified in the TAM service definition
Fd: [Figure](320 + 256 x Fb) / Fe[Figure] x 2 + Fb x 2
Fe: Results of rounding up (72 + 128 x Fa) to a multiple of 32
Fg: Results of rounding up (210 + Fd x 4) to a multiple of 16
Fm: Results of rounding up the following value to a multiple of 16:
Maximum size of TAM files used during online processing and specified in the TAM service definition
Fs: Size of the TAM file for the tamtable definition command specified in the TAM service definition (The size of the TAM file is obtained by using the method used to estimate the TAM file size.)

(6) Estimating the shared memory requirements for the IST service

The shared memory required for the IST table is obtained from the following formula:

[Figure]

(7) Estimating the shared memory requirements for the real-time statistics service

The shared memory required for the real-time statistics service is obtained from the following formula:

304 + ([Figure](4 x rts_service_max) / 8[Figure] x 8) + (104 x (rts_service_max + 1)) + (144 x rts_item_max x (rts_service_max + 1))

(8) Estimating the shared memory pool size

The shared memory pool size is obtained from the following formula:

shared-memory-for-controlling-OpenTP1 (approximately 10,240 kilobytes)

+ value-specified-in-static_shmpool_size operand-of-system-environment-definition

+ value-specified-in-dynamic_shmpool_size operand-of-system-environment-definition