Raja Mahendrakar
unread,Jun 12, 2026, 9:00:03 AMJun 12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Drools Usage
Hello Drools Team,
We are currently using Drools in our application, and we are observing very high memory usage during rule execution.
To troubleshoot this issue, we tried multiple Drools execution approaches and configurations.
To optimize execution, we tried using a precompiled Drools KJAR approach. The rules are built and packaged as a KJAR, and at runtime we load the
KJAR using KieContainer instead of compiling the rules for every execution.
However, even after using the precompiled KJAR and stateless session approach, memory usage is still very high during Drools execution.
We also tried the equivalent programmatic Drools configurations:
KieBaseConfiguration kieBaseConf = kieServices.newKieBaseConfiguration();
Sequential mode:
kieBaseConf.setOption(SequentialOption.YES);
Parallel evaluation:
kieBaseConf.setOption(ParallelExecutionOption.PARALLEL_EVALUATION);
Fully parallel execution:
kieBaseConf.setOption(ParallelExecutionOption.FULLY_PARALLEL);
Stateless session :
StatelessKieSession statelessSession = kieContainer.newStatelessKieSession();
Pooled session :
KieServices ks = KieServices.Factory.get();
KieContainer container = ks.newKieContainer(kieModule.getReleaseId());
KieSessionsPool pool = container.newKieSessionsPool(poolSize);
Precompiled KIE base / KIE container approach:
KieContainer kieContainer = kieServices.newKieContainer(releaseId);
KieBase kieBase = kieContainer.getKieBase();
However, even after trying sequential, stateless, precompiled, parallel, fully parallel, and pooled configurations, the memory consumption remains
high and is affecting our application performance.
Could you please help us understand the possible reasons for this high memory usage and suggest the best Drools configuration or optimization
approach for our use case?
We would appreciate guidance on the following:
* Which Drools configuration is recommended for lower memory
* we have ariund 5000 rules in our drl file and taking around 150MB of memory
Drools Version: 9.44.0.Final
Thank you for your support.