Drools Worker Threads in Waiting State

373 views
Skip to first unread message

Vineeth Dasaraju

unread,
Apr 19, 2017, 3:15:26 PM4/19/17
to drools...@googlegroups.com
Hi,

I recently ran a JProfiler on our application and found that the worker threads are idle as can be seen in the image below.


Inline image 1

There are multiple threads in a threadpool executor service that constantly run the following code.

Inline image 6

Would like any drools expert or contributor to give their opinion on these findings and also on the code being used to evaluate the rules.

Regards,
Vineeth 

Mario Fusco

unread,
Apr 20, 2017, 4:07:00 AM4/20/17
to Drools Usage
Hi Vineeth,

there is indeed a pool of threads created and used internally by drools to achieve multiple async tasks (constraints optimization, events expiration, ...).
In your specific situation all the threads in that pool are idle, but this is how threads pool are supposed to work. Do you see any specific problem in this?

Regards,
Mario

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/CAOd6XDN8AOM%3D4fecDTg0viCPdjfmWHyPZEzMj%3Dbzoigi%2BFJAtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vineeth Dasaraju

unread,
Apr 20, 2017, 1:44:23 PM4/20/17
to drools...@googlegroups.com
Hi Mario,

I was actually expecting to see some activity on the threads since I was firing facts on a continuous basis from multiple threads. Is there any specific reason why they appear idle even though facts are being evaluated? Aren't these the threads on which the execution happens?

Regards,
Vineeth

Mario Fusco

unread,
Apr 21, 2017, 2:48:30 AM4/21/17
to Drools Usage
Vineeth,

as I wrote in my former email those threads are used by drools for async tasks and rules evaluation clearly isn't among them.

In drools 7 we experimentally introduced a multithreaded implementation of the rule engine ( see http://docs.jboss.org/drools/release/7.0.0.CR1/drools-docs/html_single/#_multithreaded_rule_engine ) and if use it you will find that in this case that thread pool will be used also for rules evaluation.

Regards,
Mario

Reply all
Reply to author
Forward
0 new messages