[rules-users] Memory issue with drools (using 10000 rules)

Leonardo Gomes leonardo.f.gomes at gmail.com
Tue Apr 26 15:48:53 EDT 2011


>
> Benchmarking tests showed that running 10,000 rules consumes 382mb.


Are you talking about the memory footprint of your KnowledgeBase when you
load it or is after the insertion of facts / execution of rules?

Do you have any more detailed profiling information to share with us? We
might be able to help with some experimental features if you provide more
details.



On Tue, Apr 26, 2011 at 6:16 PM, Leonardo Gomes
<leonardo.f.gomes at gmail.com>wrote:

> Your eval, you could probably replace by something like this:
>
>
> rule "status-Fixed-Open"
>
>                when
>
>                              event : FieldChangedEvent(fieldName ==
> "status", oldValue == "Fixed");
>
>                              entity : Entity(entityType == "mock-entity",
> field == "status", value == "Open");
>
>                then
>
>                   do Something…
>
> end
>
>
>
>
>
> 2011/4/26 Shebs, Liron <liron.shebs at hp.com>
>
>>  Hello All,
>>
>>
>>
>> I’m working at HP Software R&D and we are considering using drools in our
>> product.
>>
>> Benchmarking tests showed that running 10,000 rules consumes 382mb.
>>
>> This is too high for our system requirements, and we would like to know
>> how we can improve it.
>>
>> Technical details:
>>
>> -      Drools version: 5.1 with default configuration.
>>
>> -      All rules look like this:
>>
>>
>>
>> rule "status-Fixed-Open"
>>
>>                when
>>
>>                              event : FieldChangedEvent(fieldName ==
>> "status", oldValue == "Fixed");
>>
>>                              entity : Entity(entityType == "mock-entity");
>>
>>                              eval(((String)
>> entity.getFieldValue("status")).equals("Open"));
>>
>>                then
>>
>>                   do Something…
>>
>> end
>>
>>
>>
>> -      Loading code:
>>
>>
>>
>> KnowledgeBuilder knowledgeBuilder =
>> KnowledgeBuilderFactory.newKnowledgeBuilder();
>>
>> for(all resources)
>>
>> {
>>
>> knowledgeBuilder.add(resource, ResourceType.DRL);
>>
>> }
>>
>> knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
>>
>>
>> knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());
>>
>>
>>
>> Any insights are most appreciated.
>>
>>
>>
>> Thank You,
>>
>> Liron, HP Software R&D
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110426/5d0f11ef/attachment.html 


More information about the rules-users mailing list