[
https://issues.jboss.org/browse/DROOLS-2409?page=com.atlassian.jira.plugi...
]
Mike Baranski edited comment on DROOLS-2409 at 3/22/18 9:21 AM:
----------------------------------------------------------------
Agreed on the fact that this is not *really* a great real-world example. Perhaps better
is a "batch" like example where we add maybe 200 records at a time and sleep in
between:
bq. for (i = 0; i < 10000000; i++) {
bq. averageMeasurementService.addMeasurement(new
Measurement(random.nextInt(100)));
bq. if (i % 100000 == 0) {
bq. System.out.println(i + " inserted into list of " +
averageMeasurementService.getFactCount());
bq. Thread.sleep(500l);
bq. }
bq. if (i % 200 == 0) {
bq. Thread.sleep(100l);
bq. }
bq. }
bq.
bq.
This sleeps 100 ms each 200 events, which drools seems to be able to handle OK for the
first few million at least.
This starts to really degrade the performance:
```
for (i = 0; i < 10000000; i++) {
averageMeasurementService.addMeasurement(new
Measurement(random.nextInt(100)));
if (i % 100000 == 0) {
System.out.println(i + " inserted into list of " +
averageMeasurementService.getFactCount());
Thread.sleep(500l);
}
if (i % 200 == 0) {
Thread.sleep(10l);
}
}
```
In fact, with the above, it looks like maybe the event counter is overflowing:
{quote}
6200000 inserted into list of -1170
zzZZzz: 49.609819277108436
zzZZzz: 49.63111764705882
zzZZzz: 49.31702380952381
zzZZzz: 49.355625
6300000 inserted into list of 20459
zzZZzz: 49.52712348322627
zzZZzz: 49.58170454545454
6400000 inserted into list of 70065
{quote}
was (Author: mbaranski):
Agreed on the fact that this is not *really* a great real-world example. Perhaps better
is a "batch" like example where we add maybe 200 records at a time and sleep in
between:
{{for (i = 0; i < 10000000; i++) {
averageMeasurementService.addMeasurement(new
Measurement(random.nextInt(100)));
if (i % 100000 == 0) {
System.out.println(i + " inserted into list of " +
averageMeasurementService.getFactCount());
Thread.sleep(500l);
}
if (i % 200 == 0) {
Thread.sleep(100l);
}
}
}}
This sleeps 100 ms each 200 events, which drools seems to be able to handle OK for the
first few million at least.
This starts to really degrade the performance:
```
for (i = 0; i < 10000000; i++) {
averageMeasurementService.addMeasurement(new
Measurement(random.nextInt(100)));
if (i % 100000 == 0) {
System.out.println(i + " inserted into list of " +
averageMeasurementService.getFactCount());
Thread.sleep(500l);
}
if (i % 200 == 0) {
Thread.sleep(10l);
}
}
```
In fact, with the above, it looks like maybe the event counter is overflowing:
{quote}
6200000 inserted into list of -1170
zzZZzz: 49.609819277108436
zzZZzz: 49.63111764705882
zzZZzz: 49.31702380952381
zzZZzz: 49.355625
6300000 inserted into list of 20459
zzZZzz: 49.52712348322627
zzZZzz: 49.58170454545454
6400000 inserted into list of 70065
{quote}
Memory Leak in sliding window
-----------------------------
Key: DROOLS-2409
URL:
https://issues.jboss.org/browse/DROOLS-2409
Project: Drools
Issue Type: Feature Request
Components: core engine
Affects Versions: 7.6.0.Final
Environment: Mac with Java 1.8 using Spring Boot (see attached demo project)
Reporter: Mike Baranski
Assignee: Mario Fusco
Priority: Critical
Attachments: complete.tar.gz
See attached project.
`gradle test` causes an out of memory exception on my machine after ~2.6 million events.
Events should be released for GC after 1 second, but that does not appear to be happening.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)