[rules-users] Best practice to use heap memory effectively

Wolfgang Laun wolfgang.laun at gmail.com
Thu Nov 1 17:30:06 EDT 2012


Using multiple sessions is not applicable, it will just (heavily) increase
memory requirements.

How precise does this have to be?

For instance, counting all events arriving in the interval yyyy-mm-dd
hh:mm requires 24*60 objects EventsPerMinute per 24 hours. You can
keep track on the running total in one single fact. As soon as the
oldest EventsPerMinute becomes older that 24hrs, you retract it and
reduce the running total.

You can reduce the granularity to seconds, if necessary.

-W


On 01/11/2012, mohan <mohan.narangoda at gmail.com> wrote:
> What I meant is 24 hour period start from when event insert into memory.
> So
> each event/fact has different 24 hour period. If you take whole picture it
> is not fixed.
>
> Simply can we count number of facts/events in a WM in a particular time
> using multiple session? So I can call session.dispose() after each
> insertion.
>
> thanks.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Best-practice-to-use-heap-memory-effectively-tp4020194p4020666.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list