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

Shebs, Liron liron.shebs at hp.com
Tue Apr 26 07:05:30 EDT 2011


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110426/e3aac8c7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2950 bytes
Desc: image001.jpg
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20110426/e3aac8c7/attachment.jpg 


More information about the rules-users mailing list