[rules-users] Garbage collection and sliding windows (Drools 5.5.0 Final)

tai-atari p00temkin at gmail.com
Sat Feb 9 08:25:33 EST 2013


Hi everyone,

I'm currently doing some performance tests with Drools Fusion (5.5.0) and
have run into some issues with EventFactHandles which are not being garbage
collected. VisualVM tells me that for every 200k inserted events, about 15k
EventFactHandle objects are still left as live objects. 

Current setup:
1) Drools 5.5.0 Final
2) Oracle JVM 1.7.0_06 on Windows 7
3) STREAM mode
4) 1 ksession at startup
5) 1 drl file with
- a single sliding window "over window:time(10s)"
- 1 entry-point
- declared event class as '@role( event )'
- only action being taken as events shows up is a println()

Events are being expired (and removed) properly from the 10 second sliding
window, which is verified by checking the 

getFactCount() from the WorkingMemoryEntryPoint. Iterating through all
EventFactHandles also show that isExpired is false on all of them (and the
count is correct). But even though the events are removed from the sliding
window, they do not seem to be available to the GC. 

If dispose() is called on the ksession, garbage collection is performed
properly. I get this same behavior with over "window:length" as well. And
even without using sliding windows at all unless I specifically add a
"@expires ( 1s )" to the event class declaration.

Has anyone else seen this behavior? After a couple of million events the
memory consumption becomes a pain and the only recovery action which seems
to be available is to dispose the ksession and start over. This means state
is lost and it requires the application to save and reinsert all facts to
the ksession, then start adding events again.  

Any help on how to troubleshoot this further would be really appreciated. 



--
View this message in context: http://drools.46999.n3.nabble.com/Garbage-collection-and-sliding-windows-Drools-5-5-0-Final-tp4022183.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list