[jboss-jira] [JBoss JIRA] (DROOLS-41) Activation Leakage using temporal windows
Lorenzo Melegari (JIRA)
jira-events at lists.jboss.org
Mon Feb 18 07:15:57 EST 2013
[ https://issues.jboss.org/browse/DROOLS-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lorenzo Melegari updated DROOLS-41:
-----------------------------------
Steps to Reproduce:
You can find sample code in https://github.com/lome/lome_intext
Sample codes insert 1K Myfacts/seconds and aggregates them using the following rule:
rule "Dummy"
timer( cron:0/5 * * * * ? )
when
Number( $count : intValue ) from accumulate( MyFact( ) over window:time(5s) from entry-point EventStream, sum(1) )
then
System.out.println($count+" myfact(s) seen in the last 5 seconds");
end
After a while, the process goes out of memory.
[Profiler Screenshot|https://raw.github.com/lome/lome_intext/master/DroolsIssueWindow.png]
[Profiler Memory Inspect|https://raw.github.com/lome/lome_intext/master/DroolsIssueWindow_Mem.png]
As comparison, using the same event injector, this rule was also used:
declare MyFact
@role( event )
@timestamp( timestamp )
@expires( 5s )
end
rule "Dummy"
timer( cron:0/5 * * * * ? )
when
Number( $count : intValue ) from accumulate( MyFact( ) from entry-point EventStream, sum(1) )
then
System.out.println($count+" myfact(s) seen in the last 5 seconds");
end
Reaching the same result of aggregating over a fixed time window, but, this time, the memory consumption and usage turns out to be way better
[Profiler Screenshot|https://raw.github.com/lome/lome_intext/master/DroolsIssue_NoWindow.png]
[Profiler Memory Inspect|https://raw.github.com/lome/lome_intext/master/DroolsIssueNoWindow_Mem.png]
was:
You can find sample code in https://github.com/lome/lome_intext
Sample codes insert 1K Myfacts/seconds and aggregates them using the following rule:
rule "Dummy"
timer( cron:0/5 * * * * ? )
when
Number( $count : intValue ) from accumulate( MyFact( ) over window:time(5s) from entry-point EventStream, sum(1) )
then
System.out.println($count+" myfact(s) seen in the last 5 seconds");
end
After a while, the process goes out of memory.
[Profiler Screenshot|https://raw.github.com/lome/lome_intext/master/DroolsIssueWindow.png]
[Profiler Memory Inspect|https://raw.github.com/lome/lome_intext/master/DroolsIssueWindow.png]
As comparison, using the same event injector, this rule was also used:
declare MyFact
@role( event )
@timestamp( timestamp )
@expires( 5s )
end
rule "Dummy"
timer( cron:0/5 * * * * ? )
when
Number( $count : intValue ) from accumulate( MyFact( ) from entry-point EventStream, sum(1) )
then
System.out.println($count+" myfact(s) seen in the last 5 seconds");
end
Reaching the same result of aggregating over a fixed time window, but, this time, the memory consumption and usage turns out to be way better
[Profiler Screenshot|https://raw.github.com/lome/lome_intext/master/DroolsIssue_NoWindow.png]
[Profiler Memory Inspect|https://raw.github.com/lome/lome_intext/master/DroolsIssueNoWindow_Mem.png]
> Activation Leakage using temporal windows
> -----------------------------------------
>
> Key: DROOLS-41
> URL: https://issues.jboss.org/browse/DROOLS-41
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5
> Environment: Sun JDK 1.6
> Reporter: Lorenzo Melegari
> Assignee: Mark Proctor
> Labels: memory_leak
>
> When aggregating over time windows on frequent events (about 1K events per second), lot of EventFactHandle are generated and retained in memory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list