[rules-users] drools expert: memory issues

miguel machado mls.machado at gmail.com
Thu Apr 1 06:31:05 EDT 2010


Hi there,

Actually that's a very good suggestion, i hadn't thought about that. Is
there any heap inspector tool you'd recommend?

In what comes to Wolfgang ideas, it makes sense what he said, but the truth
is making the knowledge builder a static variable actually made memory usage
lower (just a bit). I know it strikes as a surprise because one of the good
practices in java is to reduce the variable/object scope as much as possible
:-/ I'll try to investigate this further.

About the kbase serializing, i'll give it another try.

thanks for all support so far guys.
_ miguel



2010/4/1 Jevon Wright <jevon at jevon.org>

> Hi Miguel,
>
> I assume that you've used a memory analyzer to find out conclusively that
> the memory usage is by Drools, and not a memory leak?
>
> One way to do this is to limit the virtual memory to a small amount, add
> -XX:+HeapDumpOnOutOfMemoryError to your environment, and then using Memory
> Analyzer to analyse the dump.
>
> Cheers
> Jevon
>
> On Wed, Mar 31, 2010 at 2:44 AM, Miguel Machado <mls.machado at gmail.com>wrote:
>
>> hi all,
>>
>> I'm quite new to the drools rule engine and i've been using it for a
>> project where i need to filter events and execute actions accordingly.
>>
>> I'm currently running a DRL file and creating a stateful session from it,
>> and then running 2/3 facts every time. Every X seconds I collect the
>> available facts and call fireAllRules() + dispose(), always within the same
>> session. The DRL file has circa 2160 rules declared (an external program is
>> producing them), and i'm using the "no-loop", "lock-on-active",
>> "activation-group" and "agenda-group" options on almost every one.
>>
>> My main problem is that the software is consuming too much memory when it
>> loads the rules to the knowledge base variable, it reaches +300Mb which is
>> just not affordable in this project. Is there any way i can work around
>> this? I've tried setting some configuration properties but to no avail. What
>> techniques may i try in order to reduce memory load on drools startup? What
>> would be the best approach for dealing with so many rules?
>>
>> Anything would help, thanks in advance,
>>
>> _ miguel
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
"To understand what is recursion you must first understand recursion"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100401/a3fed005/attachment.html 


More information about the rules-users mailing list