Friday 21 June 2013

Impact of Threadpool Architecture on Application Performance

During the performance Test, the web application is tested to respond in a timely and reliable manner to
simultaneous service requests. The response times of the transactions of these multi threaded applications depend up on thread pool architecture.

Creating and destroying a thread is expensive. It requires run-time memory allocation and deallocation.
These overheads may shutdown the system during high loads.

To minimize the overhead of thread creation and destruction, threads in the pool are reused during multiple requests and the creation and destruction of the thread is minimized to only once per thread not once per request.

Efficient thread management for a given system load depends on Thread pool size.

If thread pool is too large: there will be more unused threads --> idle threads increases then busy threads --> contextswitching increases --> processing and memory resources are wasted to maintain the thread pool

If the thread pool is too small:during peak loads, additional threads must be created and destroyed on the fly to handle new requests-->It requires run-time memory allocation and de allocation.

This causes overhead on the application and impacts the performance and may shutdown the system during high loads.