Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads waiting in pool?

 
Pat Short
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)


Any help greatly appreciated.

Thanks
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Pat Short
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 cant understand where my bottle neck is.
 
Chandan Ghosh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pat Short
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Pat Short
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changing to NON-ASF mode for my ListenerPort fixed the problem of under utilization of the thread pool. See details here http://www.ibm.com/developerworks/websphere/library/techarticles/0611_titheridge/0611_titheridge.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic