2.19.2 Flow of dynamically changing the number of concurrently executing threads

The preparations and procedures for dynamically changing the maximum number of concurrently executing threads of a Web application are described below:

Preparation
Perform the dynamic change in the maximum number of concurrently executing threads of a Web application when the J2EE applications including the J2EE server and the Web application, are started.
For starting a J2EE server, see 4.1.24 Starting the system (when using CUI) in the uCosminexus Application Server System Setup and Operation Guide. For starting a system including the startup of a J2EE application, see 4.1.29 Setting and starting the business application (when using CUI) in the uCosminexus Application Server System Setup and Operation Guide.
Procedure
For dynamically changing the maximum number of concurrently executing threads of a Web application:
  1. Monitor the operational status of a Web application, and confirm that it is necessary to change the maximum number of concurrently executing threads (see (1))
    Perform this task using the management command.
  2. Change the maximum number of concurrently executing threads of the Web application when deemed necessary (see (2))
    Perform this task using the management command.
  3. Check the operational status of the Web application and confirm the improvement (see (3))
    Perform this task using the management command.
Organization of this subsection
(1) Confirming the operational status of a Web application
(2) Changing the settings of the maximum number of concurrently executing threads of a Web application

(1) Confirming the operational status of a Web application

Confirm the operational status of a running Web application. You can confirm the operational status of a Web application using the management command (mngsvrutil) . After confirming the operational status, consider whether to change the maximum number of concurrently executing threads in cases such as described below:

To check the operational status of the Web application, specify and execute subcommand get in the mngsvrutil command.

The execution format and an example are described below. For details on the mngsvrutil command, see mngsvrutil (Management command of Management Server) in the uCosminexus Application Server Command Reference Guide.

Execution format

mngsvrutil -m Management-Server-host-name [:port-number] -u Management-user-ID -p Management-password -t host-name -k host get webApps

Execution example

mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host get webApps

The execution result of the command is output in a standard output or file.

From the statistics of a running Web application, you can check the information to be referred when changing the maximum number of concurrently executing threads of a Web application with the following header information items. Note that N seconds is the sampling time that is set by management.

Table 2-61 Information to be referred when changing the maximum number of concurrently executing threads of a Web application

Header informationContents
contextRootContext root of a Web application
exclusiveThreadCountUpperBoundNumber of dedicated threads of a Web application
activeThreadCountUpperBoundMaximum number of concurrently executing threads of a Web application
waitingRequestCountUpperBoundPending queue size of a Web application
currentThreadCountUpperBoundUpper value of the number of threads of a Web application that can be executed concurrently
activeThreadCountCurrent value of the number of active threads
activeThreadCountPeakN seconds peak of the number of active threads
activeThreadCountAverageN seconds average value of the number of active threads
activeThreadCountHightWaterMarkMaximum value of the number of active threads
activeThreadCountLowWaterMarkMinimum value of the number of active threads
waitingRequestCountCurrent value of the number of pending requests of a Web application
waitingRequestCountPeakN seconds peak of the number of pending requests of a Web application
waitingRequestCountAverageN seconds average value of the number of pending requests of a Web application
waitingRequestCountHighWaterMarkMaximum value of the number of pending requests of a Web application
waitingRequestCountLowWaterMarkMinimum value of the number of pending requests of a Web application
overflowRequestCountNumber of requests overflowing from the pending queue of a Web application

(2) Changing the settings of the maximum number of concurrently executing threads of a Web application

Change the following items of a Web application, the operational status of which is confirmed, as required:

You can change these items with management command (mngsvrutil) . The value set here is applied until the Web application stops.

Note
Do not deploy and undeploy a J2EE application when dynamically changing (when the sub command change is specified in the mngsvrutil command) the maximum number of concurrently executing threads of a Web application.

For dynamically changing the maximum number of concurrently executing threads of a Web application, specify and execute the sub command change in the mngsvrutil command.

The following is the execution format. For details on the mngsvrutil command, see mngsvrutil (Management command of Management Server) in the uCosminexus Application Server Command Reference Guide.

Execution format

mngsvrutil -m Host-name-of-Management-Server [:port-number] -u Management-user-ID -p Management-password -t host-name -k host change webAppThreadCtrl Context-root-of-the-Web-application Maximum-number-of-concurrently-executing-threads, number-of-dedicated-threads, pending-queue-size-of-Web-application

The following is an execution example. In this example, the settings are changed as shown in the following table. Note that the name of the Web application is WebAP1.

Table 2-62 Example of settings for dynamically changing the maximum number of concurrently executing threads of a Web application (WebAP1)

Setting targetSettingsSetting before changeSetting after change
Web containerMaximum number of concurrently executing threads1010 (cannot be changed)
Web application (WebAP1)Maximum number of concurrently executing threads78
Number of dedicated threads45
Size of a pending queue810
Execution example

mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host change webAppThreadCtrl "WebAP1" 8, 5, 10

The set contents are applied immediately after executing the command.