-
1. Re: getting OOM error while executing rules drools 6.5 version
nramos95 Jul 21, 2017 11:26 AM (in response to sudhishvnair)Hi,
Ok for RAM upgrading but what about your JVM configuration ? What about heap size of your tomcat ? Did you configured for example MaxMetaSpaceSize, gc type ... ? Is there a heapdump generated ? What about gc.log ?
-
2. Re: getting OOM error while executing rules drools 6.5 version
sudhishvnair Jul 24, 2017 12:56 AM (in response to nramos95)Hi Nicolas,
Thanks for your reply. Please find the details below.
Xms 48000 and Xmx 48000
I have not configured te MaxMetaSpaceSize and gc type. Would you please explain how can I add these flags?
There are no heap dump created as the tomcat service is getting terminated by the "kill" command sometime with flag 3 and sometime with 9
-
3. Re: getting OOM error while executing rules drools 6.5 version
nramos95 Jul 24, 2017 3:31 AM (in response to sudhishvnair)1 of 1 people found this helpfulHi,
So 48GB is your heap size ? So huge one !!! I think you should not increase the heap until you know how your JVM is working : you have differents types of gc (ConcurrentMarkSweep, ParallelGC, G1GC etc ..), differents flags for tuning JVM. All these parameters should increase or decrease your JVM performance : you need to choose the more pertinents.
Do you have gc.log ? it could help you ! Enabling garbage collection logging with Tomcat on a Linux/UNIX platform (2009621) – All Help & Support
Perhaps you have to link JConsole, VisualVM, JProfiler or an APM (Introscope, Appd, Dynatrace) on your JVM to understand why it fails in OOM (Leak Memory).
You say you process about 1 million records from file : what about fetching this data ?
-
4. Re: getting OOM error while executing rules drools 6.5 version
sudhishvnair Jul 24, 2017 8:31 AM (in response to nramos95)Hi Nicolas,
I used G1GC garbage collector and it is working fine now from the memory point of view. Thanks a ton for your suggestions it helped me a lot. I used VisualVM to check the memory usage and it helped me a lot.
Regarding processing file, we are using a batch approach and reading files in chunks of one million. This then parsed and inserted to the working memory. This works fine and have a better performance than compared to 5.x.
I have one more question for you. I have a simple rule which is given below.
rule "Add to learning category from Loan Performance facts"
salience 1590
when
lp : LoanPerformance(lid : loanIdentifier)
la : LoanAcquisitionRecord(loanIdentifier == lid, src : source)
then
String status = getLoanStatus(lp);
String [] data = src.split("\\|",src.length());
String [] sample = new String[]{
data[1],data[2], data[3],
data[4],data[5],data[6],
data[8],data[9], data[10],
data[11],getRangeValue(data[12]),data[13],
data[14],data[15],data[16],
data[17],data[18],data[19],
data[20],data[21],data[22],
data[23],data[24],
lp.getServiceName(),lp.getCurrentInterestRate().toString(),
lp.getCurrentActualUPB().toString(),lp.getLoanAge().toString(),
String.valueOf(lp.getAdjusterRemainingMonthToMaturity()),
lp.getMetropolitanStatArea(),status};
BayesianService.addSample("loan_performance",sample,false);
This rule was taking roughly one minute to execute one million times when we were using 5.x and now with 6.x it is taking 3 minutes and 30 seconds. Will you be able to help me out in this?
Thanks a lot for your help and prompt reply.
-
5. Re: getting OOM error while executing rules drools 6.5 version
nramos95 Jul 24, 2017 9:40 AM (in response to sudhishvnair)Hi,
I can't help you anymore on rules : but have you identify which code is taking too much time ? Is it the creation time of the Array String "sample" or is it the BayesianService addSample method ? Can you use Timestamp flag in this code ? Try to work with dichotomy ...
-
6. Re: getting OOM error while executing rules drools 6.5 version
sudhishvnair Jul 25, 2017 12:55 AM (in response to nramos95)Hi Nicolas,
I think I found out the issue. During my earlier run I noticed that the time taken for GC was very high. I am now fine tuning the JVM performance and now the time for rule firing is coming down.
Thanks for your suggestions and help. It was very useful and helpful.