DB2 Perf Conclusions | Database connection pool
Web container thread connection pool
Overview
Unlike the threads used by the Web server, which requires many of them to handle large quantities of relatively simple requests in a short period of time (that is, serve a .jpg file), the application server's requests are fewer in number, more complex, and take longer to process.
WebSphere Application Server allows users to customize both the minimum and maximum size of the Web container thread pool. The belief that having a high number of threads improves both throughput and the ability to handle a high number of concurrent users is simply not true.
With too many Web container threads running...
- Each processor (CPU) on the server could potentially be dealing with a large number of requests at any given time. This may result in the operating system having to spend a significant amount of time managing and switching between threads instead of processing the actual requests.
- Each additional thread consumes resources such as memory and database connections in WAS. These resources from extraneous threads can be used more valuably if freed up.
Of course, if the Web container threads value is set too low, the WAS will not have enough workload, so the CPU will be underutilized.
A good rule of thumb is to set the maximum value to at least 10 threads. If you have multiple processors, start with five threads for each CPU when configuring the application server. For example, in a 4-way system, 20 Web container threads should be used. Increase the maximum number of threads only when you believe that CPU utilization could be higher by having additional concurrent workload.
WebSphere Commerce recommends setting the minimum and maximum values of Web container threads to the same value. This avoids thread close and spawn costs. The value should be tuned to throttle the application server to a point where it would continue to perform efficiently.
Web container thread connection pool's default is 10-50 connections. If the machine has multiple processors, start with 10 threads per processor and increase if the processors seem underutilized.
Set Web container threads
From the WAS administrative console...
- Go to...
Application servers | servername | Thread Pools- Set the minimum size and maximum size values.
- Click Apply and OK.