The formula for calculating the number of threads is as follows. The total of (a) and (b) is the number of threads used by the batch server.
(a) Basic number of threads
Maximum-number-of-threads = 68 + A + B + C + D + E + F + G + H + I
- Legend:
- A: Number of threads of CORBA Naming Service (= Number-of-connections-between-the-client-and-CORBA-Naming-Service
2 + Number-of-requests-received-concurrently + Number-of-threads-generated-during-initialization (If the vbroker.agent.enableLocator value is true, 6, if the value is false, 4) + 1)
However, the threads are calculated only when CORBA Naming Service is invoked as inprocess (inprocess is specified in the ejbserver.naming.startupMode key of usrconf.properties).
For details about the estimation of number of threads of CORBA Naming Service, see 5.2.1(3) Estimating number of threads of CORBA Naming Service (When invoking as in-process).
- B: Maximum number of database connections used concurrently
If the connection pooling functionality is used, the maximum number of connection pools (value of MaxPoolSize specified in the Hitachi Connector Property file. Total of connection pools if there are multiple resource adapters) is used as the value.
If the connection pooling functionality is not used, the value is obtained from the maximum number of concurrent requests or the number of connections used for each request (if one connection is used for one request, the maximum number of concurrent requests is used as the value).
- C: Maximum number of concurrently executed transactions, if the JTA transaction is used (one thread is used for each transaction in which a transaction timeout occurs. In the case of one request in one transaction, the maximum number of concurrent requests is used as the value)
- D: Maximum-number-of-connection-pools (total of connection pools if there are multiple resource adapters#)
2
#: Value of MaxPoolSize specified in the Hitachi Connector Property file
- E: Number of resource adapters using the connection pooling functionality
- F: Number of threads used for the conclusion and recovery processing of a global transaction (add 16, if a global transaction is used)
- G: Number of concurrently connected clients to simple Web servers (however, when the number of concurrently connected clients to simple Web servers is below 5, 5 is specified and when it is above 100, 100 is specified)
- H: If settings are specified to start the thread that manages the reply receiving thread (vbroker.ce.iiop.ccm.htc.threadStarter=true), add 5.
- I: Add the following value if settings are specified to control the closing of connections when a timeout occurs (vbroker.ce.iiop.ccm.htc.readerPerConnection=true):
(Number-of-J2EE-servers-with-remote-invocation-destination-EJBs + 1)
2
If CTM is used, add the following values in addition to the above:
- For scheduling of J2EE applications
Number-of-running-J2EE-applications + 1
- For scheduling of Stateless Session Beans
Number-of-Stateless-Session-Beans-to-be-scheduled + 1
(b) Number of threads used according to JavaVM option specifications
According to JavaVM option specifications, use the following formula for calculation. Add A only when -XX:+UseParNewGC option is specified, and add B only when -XX:+HitachiUseExplicitMemory option is specified.
Maximum-number-of-threads = A + B
- Legend:
- A: Number of threads used by parallel copy garbage collection. (Value specified in -XX:ParallelGCThreads option. When this option is not specified, the default value of -XX:ParallelGCThreads option based on the number of logical CPUs. Note that the value is determined by the number of logical CPUs that exist when starting the J2EE server. Hence, the number of threads does not change even if the number of logical CPUs changes after the server is started.)
- B: Number of threads used by the explicit management heap functionality (The number of logical CPUs. However, this number is 8 when the number of logical processors is 8 or more. This number is determined by the number of logical CPUs that exist when starting the J2EE server. Hence, the number of threads does not change even if the number of logical CPUs changes after the server is started.)
For JavaVM options, see the following sections in the uCosminexus Application Server Definition Reference Guide:
- 16.5 Java HotSpot VM options that can be specified in Cosminexus
- -XX:[+|-]HitachiUseExplicitMemory (Explicit management heap functionality option)
The formula for calculating the numbers of file descriptors is as follows:
Maximum-number-of-file-descriptors = (139 + A + B
2 + C
2 + D) / 0.8
- Legend:
- A: Number of database connections.
- B: Number of concurrently connected clients to simple Web servers
- C: Number of resource adapters
- D: Number of JAR files specified in add.class.path key of usrconf.cfg