The total number of threads that the Web container creates by default when the process starts is described separately as the threads created while integrating with the Web server and the threads created while using the in-process HTTP server. This numeric value, however, does not include threads other than the Web container, and the threads created by JavaVM.
- Organization of this subsection
- (1) When integrating with the Web server
- (2) When using the in-process HTTP server
This subsection explains the total number of threads created when integrating with the Web server. This subsection also explains the number of threads used in Web server integration.
(a) Total number of threads created
The total number of threads created depends upon whether you set the timeout when sending a response.
- If you set the timeout when sending a response
- Total-number-of-threads = A + B + C + D + E
- If you do not set the timeout when sending a response
- Total-number-of-threads = A + B + C + D
- Legend:
- A: Number of threads for the simple Web server of the Web container
- B: Number of threads used for integrating with the Web server
- C: Number of threads in each Web application
- D: Number of threads for the context used for management
- E: Number of threads for monitoring the timeout when sending a response
Consequently, the total number of threads created during invocation of a process in Web server integration is as follows:
- Total-number-of-threads-in-the-case-you-set-the-timeout-when-sending-a-response
- = 6 + 11 + (1 number-of-Web-applications) + 2 + 1
- = 20 + number-of-Web-applications
- Total-number-of-threads-in-the-case-you-do-not-set-the-timeout-when-sending-a-response
- = 6 + 11 + (1 number-of-Web-applications) + 2
- = 19 + number-of-Web-applications
After invocation of a process, the number of threads increases depending on the number of connections to the Web server, and the number of concurrently executing simple Web servers.
(b) Number of threads used for integrating with a Web server
During invocation of a Web container, threads equal to the number specified in the webserver.connector.ajp13.max_threads key of usrconf.properties are created for the request processing threads when using the Web server integration functionality. Threads equal to the number of connections from the redirector are created subsequently. The maximum number of request processing threads, therefore depends upon the maximum number of connections of the Web server.
Note that when the connection between the redirector and the Web container is disconnected due to timeout, request processing threads are created more than the maximum number of connections to the Web server. The expression for calculating the maximum number of request processing threads is shown below:
- When Cosminexus HTTP Server is used
Maximum-number-of-request-processing-threads = A + B
- Legend:
- A: Settings of the ThreadsPerChild directive of Cosminexus HTTP Server
- B: Number of requests running when the connection between the redirector and the Web container is disconnected due to timeout (maximum value is the value specified for webserver.connector.ajp13.max_threads)
- In the case of using the Microsoft IIS
Maximum-number-of-request-processing-threads = A B + C
- Legend:
- A: Number of threads of Microsoft IIS
- B: Number of processes of Microsoft IIS
- C: Number of requests running when the connection between the redirector and the Web container is disconnected due to timeout (maximum value is the value specified for webserver.connector.ajp13.max_threads)
The total number of threads created depends upon whether you set the timeout when sending a response.
- If you set the timeout when sending a response
- Total-number-of-threads = A + B + C + D + E
- If you do not set the timeout when sending a response
- Total-number-of-threads = A + B + C + D
- Legend:
- A: Number of threads for the simple Web server of the Web container
- B: Number of threads for using the in-process HTTP server
- C: Number of threads in each Web application
- D: Number of threads for the context used for management
- E: Number of threads for monitoring the timeout when sending a response
Therefore, the total number of threads during process invocation when the in-process HTTP server is used is as follows:
- Total-number-of-threads-in-the-case-you-set-the-timeout-when-sending-a-response
- = 6 + 11 + (1 number-of-Web-applications) + 2 + 1
- = 20 + number-of-Web-applications
- Total-number-of-threads-in-the-case-you-do-not-set-the-timeout-when-sending-a-response
- = 6 + 11 + (1 number-of-Web-applications) + 2
- = 19 + number-of-Web-applications
After invocation of a J2EE server, the number of threads increases depending on the number of connections to the Web clients, and the number of concurrently executing simple Web servers.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.