<br>   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.<br>
<br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/3/3 Barry K <span dir="ltr">&lt;<a href="mailto:barry.knapp@railinc.com">barry.knapp@railinc.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
The rules are not recompiled.<br>
Sorry I do not have code to provide for the memory footprint, we use I3 to<br>
get a snapshot of all java objects in memory from each server.<br>
<br>
Thanks<br>
Barry<br>
<div><div><span id="q_11fcdc5f5cd96055_1" class="h4">- Mostrar texto das mensagens anteriores -</span></div><div class="h5"><br>
<br>
Greg Barton wrote:<br>
&gt;<br>
&gt; Do you mean org.drools.rule.Pattern?  If so, it is created when the rules<br>
&gt; are compiled, and with identical rulesets I&#39;d expect you should have the<br>
&gt; same number on each server.  Edson or Mark would know if that&#39;s not the<br>
&gt; case.<br>
&gt;<br>
&gt; Are your rules ever recompiled between runs?<br>
&gt;<br>
&gt; Can you provide the code that takes the snapshot?<br>
&gt;<br>
&gt; --- On Tue, 3/3/09, Barry K &lt;<a href="mailto:barry.knapp@railinc.com">barry.knapp@railinc.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; From: Barry K &lt;<a href="mailto:barry.knapp@railinc.com">barry.knapp@railinc.com</a>&gt;<br>
&gt;&gt; Subject: Re: [rules-users] Patterns in Memory<br>
&gt;&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; Date: Tuesday, March 3, 2009, 11:15 AM<br>
&gt;&gt; The implementation uses a stateless rules engine and the<br>
&gt;&gt; memory snapshots are<br>
&gt;&gt; taken when the engines are idle.   The Patterns object, I<br>
&gt;&gt; expect is just the<br>
&gt;&gt; various condition and action nodes of each rule in the<br>
&gt;&gt; rulebase.<br>
&gt;&gt;<br>
&gt;&gt; Thanks for your reply<br>
&gt;&gt; Barry<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Greg Barton wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; They have the same rules, but do they have the same<br>
&gt;&gt; data?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; When you refer to &quot;number of patterns&quot; do<br>
&gt;&gt; you mean the number of matches<br>
&gt;&gt; &gt; between rules and working memory objects?  The<br>
&gt;&gt; increase of that number is<br>
&gt;&gt; &gt; entirely dependent on the structure of your rules.  Do<br>
&gt;&gt; they modify objects<br>
&gt;&gt; &gt; in working memory or add new objects?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --- On Tue, 3/3/09, Barry K<br>
&gt;&gt; &lt;<a href="mailto:barry.knapp@railinc.com">barry.knapp@railinc.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; From: Barry K &lt;<a href="mailto:barry.knapp@railinc.com">barry.knapp@railinc.com</a>&gt;<br>
&gt;&gt; &gt;&gt; Subject: [rules-users] Patterns in Memory<br>
&gt;&gt; &gt;&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; Date: Tuesday, March 3, 2009, 10:47 AM<br>
&gt;&gt; &gt;&gt; Do the number of patterns in memory stabilize<br>
&gt;&gt; after the<br>
&gt;&gt; &gt;&gt; rulebase is created<br>
&gt;&gt; &gt;&gt; or can transactions increase the number of<br>
&gt;&gt; patterns?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Reason I ask is I have 2 servers with the same<br>
&gt;&gt; rules loaded<br>
&gt;&gt; &gt;&gt; and one shows<br>
&gt;&gt; &gt;&gt; 3000 patterns in memory but the other only shows<br>
&gt;&gt; 2300.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks<br>
&gt;&gt; &gt;&gt; Barry<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; View this message in context:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; <a href="http://www.nabble.com/Patterns-in-Memory-tp22312660p22312660.html" target="_blank">http://www.nabble.com/Patterns-in-Memory-tp22312660p22312660.html</a><br>
&gt;&gt; &gt;&gt; Sent from the drools - user mailing list archive<br>
&gt;&gt; at<br>
&gt;&gt; &gt;&gt; Nabble.com.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; rules-users mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; rules-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://www.nabble.com/Patterns-in-Memory-tp22312660p22313261.html" target="_blank">http://www.nabble.com/Patterns-in-Memory-tp22312660p22313261.html</a><br>
&gt;&gt; Sent from the drools - user mailing list archive at<br>
&gt;&gt; Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://www.nabble.com/Patterns-in-Memory-tp22312660p22315031.html" target="_blank">http://www.nabble.com/Patterns-in-Memory-tp22312660p22315031.html</a><br>
<div><div><span id="q_11fcdc5f5cd96055_3" class="h4">- Mostrar texto das mensagens anteriores -</span></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>