Thread contention

mrochon mattrochon at gmail.com
Wed Jun 16 10:38:00 EDT 2010


It seems like open connections are hanging on to their worker threads for the
lifetime of each session.

I manually construct my threadpoolexecutor with an ArrayBlockingQueue with
capacity 50000.

The core pool size is the max pool size/2, but once my number of connections
reaches core pool size all requests block.

#1. The executor is never increasing the number of threads to max pool size
#2. Threads are not being released back to the pool after a request
completes, so each thread is bound to its connection
#3. Tasks are not being queued asynchronously, the 'put' on the
ArrayBlocking queue is blocking.

Clearly there is something I am not understanding here. I need to bound the
maximum queue size so the server does not get overloaded, but as I
understand it, the worker thread should process the request and be submitted
back to the pool.
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Thread-contention-tp5186733p5186733.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list