简体   繁体   中英

Recommended settings for JBoss drools

We are using drools for executing rules over large batches of data.

By large batches of data , I mean we load lot (5000-10000) of fat objects into drools.

We observer consistent rise in JVM heap and rules execution starts degrading.

Do we have recommended JVM options or API to release working memory.

I am using statefulKnowldegeSession and calling dispose() after fireRules().

You are (almost certainly) experiencing nothing but the effect of accumulating a large amount of objects on the heap, with your facts being only the tip of the iceberg.

Do you need all 5k to 10k facts simultaneously in working memory, eg, for establishing relations between these facts? If not, a reasonable approach would be to fireAllRules after inserting, say, 1k facts. (Run benchmarks to establish the best limit.)

You may then call dispose() and recreate the session, which should be faster than manually retracting all facts.

It would also be interesting to learn the performance of a loop over all 10k facts:

h = session.insert( f );
session.fireAllRules();
session.retract( h );

keeping the same session all the time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM