[rules-users] help with diagnosing CEP performance issue

Mauricio Salatino salaboy at gmail.com
Thu Dec 23 12:58:40 EST 2010


hehe yes.. the same happens to "me" :)

2010/12/23 Wolfgang Laun <wolfgang.laun at gmail.com>

> (OT: your nick "me" is confusing other gmail users. I see your mail as if I
> had sent it to myself. I was almost binning it.)
>
> The delay you see may depend on the way you run the test with 40K events.
> Please describe the sequence of insertions and calls to fire...(), the
> session setup (pseudo-clock, etc.)
>
> -W
>
>
> 2010/12/23 me <radai.rosenblatt at gmail.com>
>
>> Hi.
>>
>> im trying to demo drools-fusion for a system that processes backup events.
>>
>> i have the following 2 CEP rules:
>>
>> rule "Backup Not Succeeded For At Least 3 Days"
>> @ruleId(1)
>> when
>>     Node($id : id)
>>     not ( Backup(clientId == $id, $state: state ==
>> BackupStateEnum.FINISHED) over window:time( 3d ) from entry-point "Backup
>> Stream" )
>> then
>>     //nothing for now
>> end
>>
>> rule "Prune Previous Successful Backups"
>> @ruleId(2)
>> when
>>     $prevBackup  : Backup($id : clientId,  state ==
>> BackupStateEnum.FINISHED) from entry-point "Backup Stream"
>>     $newerBackup : Backup(clientId == $id, state ==
>> BackupStateEnum.FINISHED, this after $prevBackup) from entry-point "Backup
>> Stream"
>> then
>>     drools.retract($prevBackup);
>> end
>>
>> rule #2 is my attempt to cut down on memory usage. the problem is that
>> rule #2 slows down the processing very very considerably (2 orders of
>> magnitude slower when simulating batches of 40K events/day).
>>
>> what would be my next step in trying to find the reason for it? my
>> intuition tells me that with 2 events in the system at any given time
>> instead of 120K (single node, 40K events/day 3 day window) i should have
>> seen either a speedup or reduced memory consumption (if not both) and yet
>> the results im seeing are the exact opposite.
>> is there anything im missing ? i could try adding some sort of
>> LastSuccessfulBackup "marker" object into main memory and updating it using
>> events from the backup stream, but then how would i express rule #1 ?
>>
>> any help/clues/suggestions would be greatly appreciated,
>>
>>    radai.
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101223/2c0401ea/attachment.html 


More information about the rules-users mailing list