I'm using an MDB driven architecture to take messages from a queue and persist them in a database. For this, I've configured a pool of Listener Ports to take messages from the queue. When I run a stress test and take a core dump, I see a number of threads waiting at the same location (see stack trace below). What does this mean? Is my CPU the limiting factor? It seems to be operating at about 80% during this time? Or is the database my limiting factor. I see very few threads waiting on the database.
3XMTHREADINFO "MessageListenerThreadPool : 72" (TID:0x398C2C00, sys_thread_t:0x398AD85C, state:CW, native ID:0x002CD143) prio=5 4XESTACKTRACE at java/lang/Object.wait(Native Method) 4XESTACKTRACE at java/lang/Object.wait(Object.java:231(Compiled Code)) 4XESTACKTRACE at com/ibm/ws/util/BoundedBuffer.waitGet_(BoundedBuffer.java:188(Compiled Code)) 4XESTACKTRACE at com/ibm/ws/util/BoundedBuffer.poll(BoundedBuffer.java:598(Compiled Code)) 4XESTACKTRACE at com/ibm/ws/util/ThreadPool.getTask(ThreadPool.java:816(Compiled Code)) 4XESTACKTRACE at com/ibm/ws/util/ThreadPool$Worker.run(ThreadPool.java:1476)
I'm not sure which component this class belongs to, com/ibm/ws/util/BoundedBuffer. Assuming this belongs to messaging system you are using, looks like they are waiting for messages to be read. Are you publishing enough number of messages to keep all the threads busy processing them?
Joined: Mar 21, 2008
Thanks for the quick reply. I'm using WebSphere Application Server and WebSphere MQ for messaging.
I pre-load my queue with thousands of messages so one would think that the supply of messages is not the problem. However, the threads in the pool seem to be waiting for work which is what I don't understand.
I am not sure but are you ensured about only one message listener thread pool in the application server because only one message listener thread pool can exists per application server and all listener port in the server will use thread from this pool.
Thanks & Regards,<br />Chandan Ghosh<br />SCJP1.4
Joined: Mar 21, 2008
The listener port thread pool seems to only utilize 2/3 threads for MQGets. All the rest are in a wait state despite the fact that the queue is saturated. Also, further investigation of the core dumps also so an MQQueueAgent thread also waiting on MQ. Is this the dispatcher thread which hands off to my other listener port threads? Is this what is preventing greater utilization of my thread pool? Thanks