[rules-users] Patterns in Memory

Edson Tirelli tirelli at post.com
Tue Mar 3 14:31:47 EST 2009


   Yes, as others said, patterns are created at compile time, and every time
a copy of your rulebase is deserialized. So, if you are seeing differences,
either the rulebases contain different rules, or one of them was
recompiled/deserialized/updated a different number of times compared to the
other and something is preventing the GC to garbage collect patterns.

   []s
   Edson

2009/3/3 Barry K <barry.knapp at railinc.com>

>
> The rules are not recompiled.
> Sorry I do not have code to provide for the memory footprint, we use I3 to
> get a snapshot of all java objects in memory from each server.
>
> Thanks
> Barry
> - Mostrar texto das mensagens anteriores -
>
>
> Greg Barton wrote:
> >
> > Do you mean org.drools.rule.Pattern?  If so, it is created when the rules
> > are compiled, and with identical rulesets I'd expect you should have the
> > same number on each server.  Edson or Mark would know if that's not the
> > case.
> >
> > Are your rules ever recompiled between runs?
> >
> > Can you provide the code that takes the snapshot?
> >
> > --- On Tue, 3/3/09, Barry K <barry.knapp at railinc.com> wrote:
> >
> >> From: Barry K <barry.knapp at railinc.com>
> >> Subject: Re: [rules-users] Patterns in Memory
> >> To: rules-users at lists.jboss.org
> >> Date: Tuesday, March 3, 2009, 11:15 AM
> >> The implementation uses a stateless rules engine and the
> >> memory snapshots are
> >> taken when the engines are idle.   The Patterns object, I
> >> expect is just the
> >> various condition and action nodes of each rule in the
> >> rulebase.
> >>
> >> Thanks for your reply
> >> Barry
> >>
> >>
> >>
> >> Greg Barton wrote:
> >> >
> >> > They have the same rules, but do they have the same
> >> data?
> >> >
> >> > When you refer to "number of patterns" do
> >> you mean the number of matches
> >> > between rules and working memory objects?  The
> >> increase of that number is
> >> > entirely dependent on the structure of your rules.  Do
> >> they modify objects
> >> > in working memory or add new objects?
> >> >
> >> > --- On Tue, 3/3/09, Barry K
> >> <barry.knapp at railinc.com> wrote:
> >> >
> >> >> From: Barry K <barry.knapp at railinc.com>
> >> >> Subject: [rules-users] Patterns in Memory
> >> >> To: rules-users at lists.jboss.org
> >> >> Date: Tuesday, March 3, 2009, 10:47 AM
> >> >> Do the number of patterns in memory stabilize
> >> after the
> >> >> rulebase is created
> >> >> or can transactions increase the number of
> >> patterns?
> >> >>
> >> >> Reason I ask is I have 2 servers with the same
> >> rules loaded
> >> >> and one shows
> >> >> 3000 patterns in memory but the other only shows
> >> 2300.
> >> >>
> >> >>
> >> >> Thanks
> >> >> Barry
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Patterns-in-Memory-tp22312660p22312660.html
> >> >> Sent from the drools - user mailing list archive
> >> at
> >> >> Nabble.com.
> >> >>
> >> >> _______________________________________________
> >> >> 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
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Patterns-in-Memory-tp22312660p22313261.html
> >> Sent from the drools - user mailing list archive at
> >> Nabble.com.
> >>
> >> _______________________________________________
> >> 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Patterns-in-Memory-tp22312660p22315031.html
> - Mostrar texto das mensagens anteriores -
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090303/98d9c312/attachment.html 


More information about the rules-users mailing list