6.1.3 Resources for using CTM
The following subsection describes the estimation of resources used for CTM (Scheduling functionality for batch applications), for each OS.
Note that the Example of option settings in each table of estimation of resources used differs according to the OS and the kernel versions in use. Reference the manual of the OS being used and set up the estimates based on the estimation formula in the table. The settings are not required when the corresponding kernel parameter is not applicable in the OS being used.
- Organization of this subsection
(1) In AIX
The following table describes the estimation of resources used for CTM.
|
System resource |
Parameter |
Requirement |
Example of option settings |
|---|---|---|---|
|
Share memory |
-- |
PrfTraceBufferSize#1 × 1,024 + 18,496 + shared-memory-of-CTM-domain-manager#2 + shared-memory-of-CTM-daemon#2 |
-- |
|
Number of processes |
-- |
7 + Number-of- batch -servers#3 |
-- |
|
Number of threads |
-- |
72 + (number-of-batch-server-threads#4 + 7) × number-of-batch-servers#3 + number- of-threads-required-for-CTM-daemon#5 |
-- |
|
Number of file descriptors |
nofiles |
88 + (number-of-batch-server-file-descriptors#4 + 6) × number-of-batch-servers#3 + number-of file-descriptors-required-for-CTM-daemon#5 |
/etc/security/limits |
- Legend:
-
-- : Not applicable.
- #1
-
Specify the buffer memory size of the performance tracer from 512 kilobytes to 102,400 kilobytes. For details about PrfTraceBufferSize, see 4.12 Parameters applicable to logical performance tracers in the uCosminexus Application Server Definition Reference Guide.
- #2
-
For calculating the values, see 6.1.3(1)(a) Formula for calculating file size for shared memory.
- #3
-
Indicates the value specified in the <j2ee-server-count> tag of Easy Setup definition file.
- #4
-
For calculating the number of threads and file descriptors of the batch server, see 6.2.1 Estimating the resources used by batch server.
- #5
-
For calculating the number of threads and file descriptors required in the CTM daemon, see 6.1.3(1)(b) Formula for calculating number of threads and file descriptors required in the CTM daemon.
(a) Formula for calculating file size for shared memory
You must calculate the shared memory of the CTM domain manager and CTM daemon to calculate file size of shared memory. The respective formula for calculations is as follows:
Use the following value for variable values in the calculations formula. For details about the parameters starting with ctm., see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
- Values used in the formula for calculations:
-
-CTMMaxCTM: 64
-CTMQueueCount: ctm.QueueCount
-CTMClientConnectCount: 256
-CTMServerConnectCount: ctm.ServerConnectCount
-CTMEntryCount: -CTMClientConnectCount + -CTMServerConnectCount
-CTMServerCacheSize: ctm.ServerCacheSize
-CTMQueueRegistCount: ctm.QueueRegistCount
-CTMDispatchParallelCount: ctm.DispatchParallelCount
-
Formula for calculating file size for shared memory of CTM domain manager
The formula for calculating the file size for shared memory of the CTM domain manager is as follows:
- File-size-for-shared-memory(Unit: Bytes) =
-
1,018,320 + (2,362 × -CTMMaxCTM specified-value)
-
Formula for calculating file size for shared memory of CTM daemon
For CTM daemon, you must secure files for shared memory of fixed length and files for shared memory of variable length in each CTM daemon. The formula for the respective calculations is as follows:
- File-size-for-shared-memory-of-fixed-length (Unit: Bytes) =
-
551,840 + (1,208 × -CTMQueueCount specified-value)
- File-size-for-shared-memory-of-variable-length (Unit: Bytes) =
-
1,027,008
+ (928 × -CTMClientConnectCount specified-value)
+ (256 × -CTMServerConnectCount specified-value)
+ (512 × -CTMEntryCount specified-value)
+ (1,024 × -CTMServerCacheSize specified-value)
+ (512 × -CTMQueueCount specified-value)
+ (544 × -CTMQueueCount specified-value × -CTMQueueRegistCount specified- value)
+ (512 × -CTMDispatchParallelCount specified-value)
(b) Formula for calculating number of threads and file descriptors required in the CTM daemon
For calculating the number of threads and file descriptors, you must calculate the number of threads and file descriptors required in the CTM demon. The formula for the respective calculations is as follows:
-
Formula for calculating number of threads required in the CTM daemon
- Maximum-value =
-
(A × 4 + B × 3 + C × 2 + D × E + F + G + 32) / 0.8
- Legend:
-
A: -CTMMaxCTM value (Value specified in ctmdmd to which ctmd belongs)
B: -CTMClientConnectCount value
C: -CTMServerConnectCount value
D: -CTMQueueCount value
E: -CTMQueueRegistCount value
F: -CTMDispatchParallelCount value
G: Total number of EJB clients that issued Create
-
Formula for calculating number of file descriptors required in the CTM daemon
- Maximum-value =
-
(A × 2 + B × 4 + C × 2 + D × E + F × number-of-EJB-interface + G + 100) / 0.8
- Legend:
-
A: -CTMMaxCTM value (Value specified in ctmdmd to which ctmd belongs)
B: -CTMClientConnectCount value
C: -CTMServerConnectCount value
D: -CTMQueueCount value
E: -CTMQueueRegistCount value
F: -CTMDispatchParallelCount value
G: Total number of EJB clients that issued 'Create'
(2) In Linux
The following table describes the estimation of the resources used for CTM:
|
System resource |
Parameter |
Requirement |
Example of option settings |
|---|---|---|---|
|
Shared memory |
SHMMAX |
PrfTraceBufferSize#1 × 1,024 + 18,496 + shared-memory-of-CTM-domain-manager#2 + shared-memory-of-CTM-daemon#2 |
/proc/sys/kernel/shmmax |
|
Number of processes |
threads-max |
7 + number-of-batch-servers#3 |
/proc/sys/kernel/threads-max |
|
Number of threads |
threads-max |
72 + (number-of-batch-server-threads#4 + 7) × number-of-batch-servers#3 + number-of-threads-required-in-CTM-daemon#5 |
-- |
|
Number of file descriptors |
fs.file-max |
88 + (number-of-batch-server-file-descriptors#4 + 6) × number-of-batch-servers#3 + number-of-file-descriptors-required-in-CTM-daemon#5 |
/proc/sys/fs/file-max |
- Legend:
-
-: Not applicable.
- #1
-
Specify the buffer memory size of the performance tracer from 512 kilobytes to 102,400 kilobytes. For details about PrfTraceBufferSize, see 4.12 Parameters applicable to logical performance tracers in the uCosminexus Application Server Definition Reference Guide.
- #2
-
For calculating the values, see 6.1.3(1)(a) Formula for calculating file size for shared memory.
- #3
-
Indicates the value specified in the <j2ee-server-count> tag of the Easy Setup definition file.
- #4
-
For calculating the number of threads and file descriptors of the batch server, see 6.2.1 Estimating the resources used by batch server.
- #5
-
For calculating the number of threads and file descriptors required in the CTM daemon, see 6.1.3(1)(b) Formula for calculating number of threads and file descriptors required in the CTM daemon.