Results 1 to 5 of 5

Thread: WorkManager & DMLC thread count

  1. #1
    Join Date
    Dec 2005
    Posts
    14

    Default WorkManager & DMLC thread count

    With respect to DMLC configuration for an application deployed in WebSphere-6.0.2, should I configure a separate WorkManager (for 'taskExecutor') for each MDP configuration. My application listens on 10 different input queues so I have 10 MDPs.

    And WorkManager configuration in WebSphere accepts max and min # of threads. How this thread count is related to 'concurrentConsumers' & 'maxConcurrentConsumers' in DMLC.

    Regards,
    Satya.

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    Usually, you will configure one shared WorkManager for *all* DefaultMessageListenerContainers (or even one shared WorkManager for your entire application). This means a shared WorkManagerTaskExecutor bean that gets injected into all your DefaultMessageListenerContainers beans.

    In such a scenario, the WorkManager configuration defines the overall min/max boundaries for *all* DefaultMessageListenerContainers (limiting the overall number of threads used by your application), while each listener container definition may fine-tune the consumer count for each its particular queue(through "concurrentConsumers" / "maxConcurrentConsumers").

    So you could for example have a shared WorkManager configuration with a minimum of 10 threads and a maximum of 20 threads. Each of your DefaultMessageListenerContainer definitions will then by default use 1 concurrent consumer for its queue, equivalent to 1 thread 'borrowed' from the WorkManager.

    Specifying a higher "concurrentConsumers" value, e.g. 2, will lead to a higher 'fixed' concurrency for the specific queue. For such a queue, there will always be e.g. 2 active consumers (equivalent to 2 threads borrowed). This only really makes sense for highly active queues where both consumers will be active most of the time.

    For typical scenarios, "maxConcurrentConsumers" is often the better option: This will use the fixed number of consumers (default is 1) as a basis, only creating further consumers when there is a peak of activity for the specific queue. This means that only 1 thread will be borrowed from the WorkManager by default, with further threads borrowed on demand. This leads to dynamic scaling up until the maximum number of concurrent consumers for the specific queue (and, globally across all queues, up until the overall limit defined by the WorkManager).

    Summarizing: Use a shared WorkManager that defines the overall min/max limits for all your message processing needs, across all queues. Then fine-tune your DefaultMessageListenerContainers through the "maxConcurrentConsumers" setting for each specific queue.

    Juergen

  3. #3
    Join Date
    Dec 2005
    Posts
    14

    Default Failing at load

    Hi Juergen,
    Thanks for the detailed post.

    As discussed above, I have configured the WorkManager in WAS-6.0.2 with following settings:
    Code:
    	Work timeout 				- 0 milli (default)
    	Work request queue full action 		- Block (default)
    
    	Number of alarm threads 		- 2	(default)
    	Minimum number of threads threads 	- 10
    	Maximum number of threads threads 	- 50	(I have about 10 different input queues!)
    	Thread Priority priority		- 5	(default)
    	Growable				- Yes	(default)
    It works great in all the environments. But the bad news is that it fail to process more than about 1200 messages! Yes, I brought down my application over the weekend and there are about 6000 messages in queue.
    Listener stop processing messages without throwing any error message...in any server log files.

    I could find just following error message in trace.log file:

    Code:
    [ThreadMonitor W   WSVR0605W: Thread "WorkManager.XXXXX : 9" (0000003f) has been active for 685035 milliseconds and may be hung.  There are 1 threads in total in the server that may be hung.
    [ThreadMonitor W   WSVR0605W: Thread "WorkManager.XXXXX : 16" (00000046) has been active for 685098 milliseconds and may be hung.  There are 2 threads in total in the server that may be hung.
    [ThreadMonitor W   WSVR0605W: Thread "WorkManager.XXXXX : 11" (00000041) has been active for 685004 milliseconds and may be hung.  There are 3 threads in total in the server that may be hung.
    [ThreadMonitor W   WSVR0605W: Thread "WorkManager.XXXXX : 8" (0000003e) has been active for 685035 milliseconds and may be hung.  There are 4 threads in total in the server that may be hung.
    [ThreadMonitor W   WSVR0605W: Thread "WorkManager.XXXXX : 17" (00000047) has been active for 685004 milliseconds and may be hung.  There are 5 threads in total in the server that may be hung.
    My understanding of above listed warning messages is that it just an idication of some thing already went wrong, but the actual problem..


    I have following properties set to DMLC:
    concurrentConsumers = 1
    maxConcurrentConsumers = 5
    receiveTimeout = 0

    Am I missing some configuration?

    Thx
    Satya Katakam

  4. #4
    Join Date
    Dec 2005
    Posts
    14

    Default Code issue

    I was able to resolve this and it is a specific issue in my code. Pl ignore.

    Thx.

  5. #5

    Default

    Can you please share your snippet of code , because am also facing the same problem !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •