uCosminexus Application Server, Web Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

5.4.1 Overview of controlling the number of request processing threads

After the request processing threads are created when the in-process HTTP server starts, the status of the request processing threads and the number of threads are monitored periodically. When requests are concentrated in the in-process HTTP server, the request processing threads are added and the adequate number of spare threads is pooled in advance. When there are few requests, the extra pooled spare threads will be deleted.

The controlling of the number of request processing threads is executed as follows:

  1. When the J2EE server starts, the specified number of request processing threads is created.
  2. While the J2EE server is running, the number of request processing threads is monitored.
  3. During monitoring, if the number of spare threads is smaller than the specified minimum value, the request processing threads are added and pooled as the spare threads. Also, if the number of spare threads is greater than the specified maximum value, the extra spare threads are deleted.
    Note that you can also maintain the number of threads created when the J2EE server starts. When maintaining the number of threads created at startup, if the total number of request processing threads and spare threads is less than the number of threads created when the Web server starts, even if the number of spare threads exceeds the maximum value, the spare threads are not deleted. For example, if the number of threads created when the Web server starts is 8 and the maximum number of spare threads is 5, the spare threads are not deleted in the case when the number of request processing threads is 2 and the number of spare threads is 6.

The transition of the number of request processing threads is explained with the following examples: