8.3.7 Tuning parameter for optimizing the number of concurrent executions

This section explains the method of setting up the tuning parameters used for optimizing the number of concurrent executions.

Organization of this subsection
(1) Number of request-processing threads (to use an in-process HTTP server)
(2) Number of concurrent executions of a Web application
(3) Number of concurrent executions in an Enterprise Bean
(4) Number of concurrent executions controlled with CTM

(1) Number of request-processing threads (to use an in-process HTTP server)

This subsection explains how to set up the tuning parameters for the number of request-processing threads, when you use an in-process HTTP server.

Set up the items listed in the following table in the Easy Setup definition file. Afterward re-build the system using the Smart Composer functionality.

Table 8-6 Tuning parameters for the number of request-processing threads (to use an in-process HTTP server)

Setup itemSetup targetLocation of setup (parameter name)
Number of request-processing threads generated when the J2EE server is startedLogical J2EE server (j2ee-server)webserver.connector.inprocess_http.init_threads
Upper limit of the number of connections with the Web client (upper limit of the number of request-processing threads)Logical J2EE server (j2ee-server)webserver.connector.inprocess_http.max_connections
Maximum value of the Listen queue (back log) of TCP/IP, when the maximum number of connections with the Web client is exceededLogical J2EE server (j2ee-server)webserver.connector.inprocess_http.backlog
Maximum number of spare threadsLogical J2EE server (j2ee-server)webserver.connector.inprocess_http.max_spare_threads
Minimum number of spare threadsLogical J2EE server (j2ee-server)webserver.connector.inprocess_http.min_spare_threads

For details about the tuning parameters when you use Cosminexus HTTP Server during the Web server integration, see the uCosminexus Application Server HTTP Server User Guide.

(2) Number of concurrent executions of a Web application

Set in each URL group, Web application or Web container.

(a) Number of concurrent executions of a URL group

This subsection explains how to set up the tuning parameters for number of concurrent executions of a URL group. The method and location of the setup is different for each setup item.

You specify the items listed in the following table using the Smart Composer functionality. You define the parameters in the Easy Setup definition file.

Table 8-7 Tuning parameters of the number of concurrent executions of a URL group (items to be specified using the Smart Composer functionality)

Setup itemSetup targetLocation of setup (parameter name)
Maximum number of concurrently executed threads in each Web container (during the Web server integration)Logical J2EE server (j2ee-server)webserver.connector.ajp13.max_threads
Maximum number of concurrently executed threads in each Web container (when using an in-process HTTP server)Logical J2EE server (j2ee-server)webserver.connector.inprocess_http.max_execute_threads
Whether to control the number of concurrent executions for each Web applicationLogical J2EE server (j2ee-server)webserver.container.thread_control.enabled
Default pending queue sizeLogical J2EE server (j2ee-server)webserver.container.thread_control.queue_size

You specify the items listed in the following table using the server management command (cjsetappprop). You define parameters in the WAR property file.

Table 8-8 Tuning parameters of the number of concurrent executions of a URL group (items to be specified using the server management command (cjsetappprop))

Setup itemLocation of setup (parameter name)
Maximum number of concurrently executed threads in each Web application<thread-control-max-threads> under <thread-control> tag
Number of dedicated threads of the Web application<thread-control-exclusive-threads> under <thread-control> tag
Pending queue size of the Web application<thread-control-queue-size> under <thread-control> tag
Definition the name of concurrently executed thread control for a URL group<urlgroup-thread-control-name> under <thread-control> <urlgroup-thread-control> tag
Maximum number of concurrently executed threads in a URL group<urlgroup-thread-control-max-threads> under <thread-control> <urlgroup-thread-control> tag
Number of dedicated threads in a URL group<urlgroup-thread-control-exclusive-threads> under <thread-control> <urlgroup-thread-control> tag
Pending queue size of a URL group<urlgroup-thread-control-queue-size> under <thread-control> <urlgroup-thread-control> tag
URL pattern to be controlled for each URL group<urlgroup-thread-control-mapping> under <thread-control> <urlgroup-thread-control> tag
(b) Number of concurrent executions in a Web application

This subsection explains how to set up the tuning parameters for the number of concurrent executions in each Web application. The method and location of setup is different for each setup item.

You specify the items listed in the following table using the Smart Composer functionality. You define the parameters in the Easy Setup definition file.

Table 8-9 Tuning parameters of the number of concurrent executions in a Web application (items to be specified using the Smart Composer functionality)

Setup itemSetup TargetLocation of setup (parameter name)
Maximum number of concurrently executed threads in each Web container (during the Web server integration)Logical J2EE server (j2ee-server)webserver.connector.ajp13.max_threads
Maximum number of concurrently executed threads in each Web container (when using an in-process HTTP server)Logical J2EE server (j2ee-server)webserver.connector.inprocess_http.max_execute_threads
Whether to control the number of concurrent executions for each Web applicationLogical J2EE server (j2ee-server)webserver.container.thread_control.enabled
Default pending queue sizeLogical J2EE server (j2ee-server)webserver.container.thread_control.queue_size

You specify the items listed in the following table using the server management command (cjsetappprop). You define the parameters in the WAR property file.

Table 8-10 Tuning parameters of the number of concurrent executions in the Web application (items to be specified using the server management command (cjsetappprop))

Setup itemLocation of setup (parameter name)
Maximum number of concurrently executed threads in each Web application<thread-control-max-threads>
Number of dedicated threads of a Web application<thread-control-exclusive-threads>
Pending queue size for each Web application<thread-control-queue-size>
(c) Number of concurrent executions in a Web container

This subsection explains how to set up the tuning parameters for the number of concurrent executions in each Web container.

You specify the items listed in the following table using the Smart Composer functionality. You define the parameters in the Easy Setup definition file.

Table 8-11 Tuning parameter of the number of concurrent executions in a Web container

Setup itemSetup targetLocation of setup (parameter name)
Maximum number of concurrently executed threads in each Web container (during the Web server integration)Logical J2EE server (j2ee-server)webserver.connector.ajp13.max_threads
Maximum number of concurrently executed threads in each Web container (when using an in-process HTTP server)Logical J2EE server (j2ee-server)webserver.connector.inprocess_http.max_execute_threads
Reference note
In addition to the above, you can also specify the maximum size of the pending queue of the TCP connection requests from the redirector in the Web container (webserver.connector.ajp13.backlog of the logical J2EE server (j2ee-server)). Since this key specifies the size of the Listen queue of the socket, there is no direct relationship with the pending queue of the request.

(3) Number of concurrent executions in an Enterprise Bean

The number of concurrent executions of an Enterprise Bean is set for each Enterprise Bean. The settings are explained below for each type of Enterprise Bean:

(a) Number of concurrent executions of a Stateless Session Bean

This subsection explains how to set up the tuning parameters for the number of concurrent executions of a Stateless Session Bean.

You specify the items listed in the following table using the server management command (cjsetappprop). You define the parameters in the Session Bean property file.

Table 8-12 Tuning parameters of the number of concurrent executions of the Stateless Session Bean

Setup itemLocation of setup (parameter name)
Maximum number of instances managed in the pool<maximum> under <stateless> <pooled-instance> tag#
Minimum number of instances managed in the pool<minimum> under <stateless> <pooled-instance> tag
#
When dynamically changing the number of concurrent executions of CTM during operation, you must set up no limit (set up 0) to the maximum value.

(b) Number of concurrent executions of a Stateful Session Bean

This subsection explains how to set up the tuning parameters for the number of concurrent executions of a Stateful Session Bean.

You specify the items listed in the following table using the server management command (cjsetappprop). You define the parameters in the Session Bean property file.

Table 8-13 Tuning parameters of the number of concurrent executions of a Stateful Session Bean

Setup itemLocation of setup (parameter name)
Maximum number of sessions that can be generated from the client<maximum-active-sessions> under <stateful> tag
Time (minutes) until the unused instances are deleted<removal-timeout> under <stateful> tag
(c) Number of concurrent executions of an Entity Bean

This subsection describes how to set up the tuning parameters for the number of concurrent executions of an Entity Bean.

You specify the items listed in the following table using the server management command (cjsetappprop). You define the parameters in the Entity Bean property file.

Table 8-14 Tuning parameters of the number of concurrent executions of an Entity Bean

Setup itemLocation of setup (parameter name)
Maximum value of the Entity Bean that can be generated from the client<maximum-instances>
Time (minutes) until the EJBObject of the unused Entity Bean is deleted<entity-timeout>
(d) Number of concurrent executions of a Message-driven Bean

This subsection describes how to set up the tuning parameters for the number of concurrent executions of a Message-driven Bean.

You specify the items listed in the following table using the server management command (cjsetappprop), and define the parameters in the Message-driven Bean property file.

Table 8-15 Tuning parameters of the number of concurrent executions of a Message-driven Bean

Setup itemLocation of setup (parameter name)
Maximum number of instances managed in the pool<pooled-instance> <maximum>
Minimum number of instances managed in the pool<pooled-instance> <minimum>

(4) Number of concurrent executions controlled with CTM

This subsection describes how to set up the tuning parameters for the number of concurrent executions controlled with CTM. The items are set up in CTM daemon, application, and Stateless Session Bean.

Items to be set up in CTM daemon

Set up the items listed in the following table in the Easy Setup definition file. Afterward re-build the system using the Smart Composer functionality.

Table 8-16 Tuning parameter for the number of concurrent executions controlled with CTM (item to be specified using the Smart Composer functionality)

Setup itemSetup targetLocation of setup (parameter name)
Maximum value of threads controlled with CTM, and number of requests registered in each queueLogical CTM (component-transaction-monitor)ctm.DispatchParallelCount
Items to be set up in the application or Stateless Session Bean

Set up the items listed in the following table using the server management commands. Define the parameters in the application property file or Session Bean property file.

Table 8-17 Tuning parameters for the number of concurrent executions controlled with CTM (items to be specified using the server management commands)

Setup itemDefinition fileSetup targetLocation of setup (parameter name)
Whether to control the number of concurrent executions with CTM in the applicationApplication property fileApplication<managed-by-ctm>
Number of concurrently executed threads of the applicationApplication property fileApplicationparallel-count below the <scheduling> tag
Whether to control the number of concurrent executions with CTM in the Stateless Session BeanSession Bean property fileStateless Session Bean<enable-scheduling>
Settings for the queues of each Bean#Session Bean property fileStateless Session Beanparallel-count below the <scheduling> tag
#
This item is required when you deploy a schedule queue in each Bean. Set up the deployment of the schedule queue in the <scheduling-unit> tag of the application property file.