Hitachi

uCosminexus Application Server System Design Guide


5.2.4 Estimating the resources used by CTM

This subsection describes the estimation of resources used by CTM for each OS. You cannot use CTM in batch application execution environment.

Organization of this subsection

(1) In Windows

This section describes the estimation of resources used by CTM in Windows.

(a) File size for shared memory

This section describes the formula for calculating file size for shared memory (Unit: Bytes) using CTM. You must secure more than one shared memory for CTM daemon. There are files for shared memory with fixed length and variable length in the CTM daemon unit. The formula for calculating the respective file size is as follows:

  • Formula for calculating file size for shared memory of CTM domain manager

    File-size-for-shared-memory = 1,018,320 + (2,362×-CTMMaxCTM-specified-value)

  • Formula for calculating file size for shared memory of CTM daemon

    The files for shared memory with fixed length and variable length must be secured in the CTM daemon unit for CTM daemon.

    • File-size-for-shared-memory-with-fixed-length =

      551,840+(1,208×-CTMQueueCount-specified-value)

    • File-size-for-shared-memory-with-variable-length =

      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) Statistics information file size

The formula for calculating statistics information file size (Unit: Bytes) is as follows:

  • Formula for calculating statistics information file size required from online start to end

    File-size = A + B

    Legend:

    • A: (number-of-requests-executed-from-online-start-to-end) × (information-output-for-one-request)

    • B: (time-from-online-start-to-end(minutes) / acquired-interval-specified-in-ctmstsstart -CTMInterval) × (volume-of-statistics-information-output-once-for-CTM-node-unit, queue-unit)

The formula for calculating volume of information output by one request and volume of statistics information output once for CTM node unit, queue node unit is as follows:

  • Formula for calculating volume of information output by one request

    Volume-of-information =( (80 + A + B + C + D + 63)/ 64↑ × 64) × 3

    Legend:

    • A: Length of domain of CTM domain name that manages application executing requests

    • B: Length of CTM identifier of CTM daemon that manages application executing requests

    • C: Length of queue name

    • D: Length of operation name

  • Formula for calculating volume of statistics information output once for CTM node unit, queue unit

    Volume-of-statistics-information = (2,144 + 344 ×number-of-queues + 63) / 64 ×64

(c) Disk occupancy of %CTMSPOOL%

The formula for calculating disk occupancy of %CTMSPOOL% is as follows:

  • Formula for calculating disk occupancy of %CTMSPOOL%

    Disk-occupancy = 7.0MB

    + (18.5MB + 1.0MB × -CTMLogFileSize-specified-value × -CTMLogFileCount-specified-value) × n

    +(1KB + 0.5KB × k) × (m + l)

    +1KB × m × j

    +224KB × p

    +1,120KB × (64 + q)

    +file-size-for-shared-memory-of-CTM-domain-manager × 5

    +file-size-for-shared-memory-of-CTM-daemon × 5 × n

    +core-size-of-CTM-domain-manager

    +core-size-of-CTM-daemon × n

    +core-size-of-CTM-regulator × 3 × m

    +core-size-of-OTM-gateway × 3 × l

    + (-CTMStatsFileSize-specified-value× -CTMStatsFileCount-specified-value) × n

    Legend:

    • j: Total of EJBs

    • k: Number of clients that you can connect to CTM regulator and OTM gateway (-CTMClientConnectCount option specified value)

    • l: Total of OTM gateways

    • m: Total of CTM regulators

    • n: Total of CTM daemons

    • p: Number of processes of user applications being invoked and number of processes of user applications that did not terminate normally

      In CTM, the internal trace is output to a file as maintenance information for each user application. This file is created while invoking the process. The file for internal trace output is created while invoking the process and remains as it is when the process does not terminate normally. The file deletion process is executed while invoking the CTM domain manager and after 24 hours each on invoking the CTM domain manager. However, 256 files are not deleted and left as is, resulting in the maximum number of files to 256 + number-of-processes-being-invoked.

    • q: Number of processes of system being invoked

      In CTM, the internal trace is output to a file as maintenance information for each process. This file is created while invoking the process. The file deletion process is executed while invoking the CTM domain manager and after 24 hours each on invoking the CTM domain manager. However, 64 files are not deleted and left as is and therefore the maximum number of files is 64 + number-of-processes-being-invoked.

The above mentioned disk capacity is a rough indicator. As a result, create the %CTMSPOOL% with enough excess space.

(2) In AIX

You must consider the following values and set up the kernel parameters to use CTM when using AIX. If the settings are not done properly, the CTM process cannot be invoked or while running the CTM processes they might as well terminate abnormally due to insufficient resources. For the kernel parameter settings, see the manual of the OS being used.

(a) File size for shared memory

Set up the file size for shared memory by the environment variable EXTSHM. Set up in such a way so that the shared memory allocated is greater that the value calculated by formula for calculations. The formula for calculations is the same as that for Windows. Reference the formula for calculations for Windows.

(b) Statistics information file size

The formula for calculating statistics information file size is the same as the one for Windows. Reference the formula for calculations for Windows.

(c) Number of file descriptors

Based on the options during invocation, add the number of file descriptors that you can use in the process as per the following formula for calculations in the CTM daemon. When the value set up in OS is not within the maximum value of file descriptors required in a CTM daemon setup by formula for calculations, the process invocation terminates with an error. Based on the formula for calculations, change the nofiles of /etc/security/limits.conf file.

  • Formula for calculating maximum value of number of file descriptors required in the CTM daemon

    Maximum-value = (A × 2 + B × 4 + C × 2 + D × E + F × number-of- EJBs + G + 100)/0.8

    Legend:

    • A: -CTMMaxCTM value (Value specified in ctmdmd to which the ctmd belongs)

    • B:-CTMClientConnectCount value

    • C:-CTMServerConnectCount value

    • D:-CTMQueueCount value

    • E:-CTMQueueRegistCount value

    • F:-CTMDispatchParallelCount value

    • G: Total number of EJB clients issuing Create

(d) Disk occupancy of $CTMSPOOL

The formula for calculating disk occupancy of $CTMSPOOL is as follows:

  • Formula for calculating disk occupancy of $CTMSPOOL

    Disk-occupancy = 7.0MB

    +(18.5MB + 1.0MB × -CTMLogFileSize-specified-value × -CTMLogFileCount-specified-value) × n

    +(1KB + 0.5KB × k) × (m + l)

    +1KB × m × j

    +224KB × p

    +1,120KB × (64 + q)

    +file-size-for-shared-memory-of-CTM-domain-manager × 5

    +file-size-for-shared-memory-of-CTM-daemon × 5 × n

    +core-size-of-CTM-domain-manager

    +core-size-of-CTM-daemon × n

    +core-size-of-CTM-regulator × 3 × m

    +core-size-of-OTM-gateway × 3 × l

    +(-CTMStatsFileSize-specified-value × -CTMStatsFileCount-specified-value) × n

    Legend:

    • j: Total number of EJBs

    • k: Total number of clients that can be connected to CTM regulator and OTM gateway (-CTMClientConnectCount option specified value)

    • l: Total number of OTM gateways

    • m: Total number of CTM regulators

    • n: Number of CTM daemons

    • p: Number of processes of user applications being invoked and number of processes of user applications that did not terminate normally

      In CTM, the internal trace is output to a file as maintenance information for each user application. The file for internal trace output is created while invoking the process and remains as it is when the process does not terminate normally. The file deletion process is executed while invoking the CTM domain manager and after 24 hours each on invoking the CTM domain manager. However, 256 files are not deleted and left as it is, resulting in the maximum number of files to 256 + number-of-processes-being -invoked.

    • q: Number of processes in system that is being invoked

      In CTM, the internal trace is output to a file as maintenance information for each process. This file is created while invoking the process. The file deletion process is executed while invoking the CTM domain manager and after 24 hours each on invoking the CTM domain manager. However 64 files are not deleted and left as it is, resulting in the maximum number of files to 64 + number-of-processes-being-invoked.

The above mentioned disk capacity is a rough indicator. As a result, create the $CTMSPOOL with enough excess space.

(3) In Linux

You must consider the following values and set up the kernel parameters to use CTM when using Linux. If the settings are not done properly, the CTM processes cannot be invoked or while running the processes they might terminate abnormally due to insufficient resources. For the kernel parameter settings, see the manual of the OS being used.

(a) File size for shared memory

Set up the file size for shared memory by kernel.shmmax of /etc/sysctl.conf file. Set up in such a way so that the shared memory allocated is greater that the value calculated by formula for calculations. The formula for calculations is the same as that for Windows. Reference the formula for calculations for Windows.

(b) Statistics information file size

The formula for calculating statistics information file size is the same as the one for Windows. Reference the formula for calculations for Windows.

(c) Number of file descriptors

Set up the number of file descriptors by nofiles of /etc/security/limits.conf file. Change the nofiles based on the formula for calculations. The formula for calculations is the same as that for AIX. Reference the formula for calculations for AIX.

(d) Disk occupancy of $CTMSPOOL

The formula for calculating disk occupancy of $CTMSPOOL is the same as that for AIX. Reference the formula for calculations for AIX.