[rules-users] Patterns in Memory

Greg Barton greg_barton at yahoo.com
Tue Mar 3 14:15:14 EST 2009


In that case, do you run multiple instances of the rules on each server? (i.e. one stateless session in each thread to utilize multiple cores, etc.)  That would explain it, if the servers are running a different number of instances.

The only way compiled instances of rules could be different would be if 1) the compilation is nondeterministic, or 2) there are runtime optimizations of the rete that are data dependent.  I don't believe either is the case with drools.

--- 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, 12:44 PM
> 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
> 
> 
> 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
> 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


      



More information about the rules-users mailing list