Hitachi

uCosminexus Application Server Expansion Guide


3.4.1 Overview of flow-volume control of requests

This subsection describes flow-volume control of CTM.

To control the number of requests that are executed concurrently, the flow-volume control function places a preset limit on the number of threads that can be concurrently generated on each J2EE server. This function moderates the load on the J2EE servers, thus providing stable and high throughput. This function can also prevent contention of a CPU or exclusive resource.

Flow-volume control of CTM is enabled by using a CTM daemon and the schedule queue managed by the CTM daemon.

The following figure shows an overview of flow-volume control of CTM, and provides an example of schedule queue sharing on a J2EE application basis.

Figure 3‒14: Overview of flow-volume control of CTM

[Figure]

A CTM daemon adds received requests to a schedule queue, and executes as many requests as the maximum number of concurrent threads set for the schedule queue. The CTM daemon repeats this processing. If the number of requests from clients instantaneously increases, the CTM daemon controls the flow volume so that the number of requests executed by each J2EE server does not exceed the maximum number of concurrent threads. If the same J2EE application is installed on multiple J2EE servers and the schedule queue is shared by each instance of that J2EE application, the requested business-processing program can be executed in parallel. The degree of parallelism can be determined by the number of instances of that J2EE application and the maximum number of concurrent threads for each J2EE application. You can set the maximum number of requests that can be registered in a schedule queue. Note that if the maximum number of requests that can be registered is not set for a schedule queue, the setting for the CTM daemon is used by default. If the maximum is exceeded, an error is returned.

Note that the EJB container can also control the degree of parallelism for a 2EE application. The following describes the effect of combining the parallelism control of the EJB container and the flow-volume control of CTM.

The maximum number of threads that can be controlled by CTM is specified by the -CTMDispatchParallelCount argument of the ctmstart command executed when the CTM daemon is started. The maximum number of requests that can be registered in a queue is specified by the -CTMMaxRequestCount argument of that command. If the system was set up by using the management portal, you can set these values in logical CTM beforehand. For details about the ctmstart command, see ctmstart (start CTM daemon) in the uCosminexus Application Server Command Reference Guide.

Important note
  • In flow-volume control of CTM, the maximum number of concurrent threads (Parallel Count) is set for each schedule queue. The maximum number of instances that can be pooled (maximum of Pooled Instances) can be set for each stateless session bean called by CTM. Note that if the maximum number of instances that can be pooled is less than the number of concurrent threads for the schedule queue, instances might be insufficient when a stateless session bean is called.

  • If CTM is used, EJB object references are registered in the local CORBA Naming Service, in addition to the global CORBA Naming Service, on each host. In some application configurations, therefore, enterprise beans can be called by directly executing lookup for the local CORBA Naming Service without using CTM. Note, however, that in this case, the number of concurrent threads specified by CTM is not guaranteed. Therefore, do not operate in such a manner.