<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1589" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=473340812-28022007>Hi...,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=473340812-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=473340812-28022007>Can any one pls help me.... regarding my previous 
mail...</SPAN></FONT></DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Reddy 
Ramesh-in2259c<BR><B>Sent:</B> Wednesday, February 28, 2007 12:49 
PM<BR><B>To:</B> Rules Users List<BR><B>Subject:</B> RE: [rules-users] How many 
objects we can assert into workingmemorymaximum<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#0000ff size=2>Hi all,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#0000ff size=2>I have a rule something like this....,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#800000 size=2>package 
com.motorola.nmatg.nms.nfm.suppression</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888123206-28022007><FONT face=Arial 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#800000 size=2>import 
com.motorola.nmatg.nms.nfm.suppression.ExtendedEvent;</FONT></SPAN></DIV><SPAN 
class=888123206-28022007><FONT color=#0000ff>
<DIV dir=ltr align=left><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><BR><FONT face=Arial color=#800000 size=2>/*<BR>This rule compress 
duplicates<BR>*/<BR>rule "Compress"<BR>&nbsp;salience 
10<BR>&nbsp;when<BR>&nbsp;&nbsp;event_1 : ExtendedEvent<SPAN 
class=888123206-28022007> </SPAN>(<SPAN class=888123206-28022007> </SPAN><SPAN 
class=888123206-28022007>moid1 : source , severity1 : severity , eventType1 : 
eventType , eventTime1 : time </SPAN>)<BR>&nbsp;&nbsp;event_2 : 
ExtendedEvent<SPAN class=888123206-28022007> </SPAN>(<SPAN 
class=888123206-28022007> moid2 : source , severity2 : severity , eventType2 : 
eventType , eventTime2 : time </SPAN>)</FONT></DIV>
<DIV><FONT face=Arial color=#800000 size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#800000 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;eval (</FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial><FONT color=#800000><FONT 
size=2><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moid1.equals(moid2) 
&amp;&amp;</SPAN></FONT></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT size=+0><FONT size=+0><SPAN 
class=888123206-28022007></SPAN><FONT face=Arial><FONT color=#800000><FONT 
size=2><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;severity1.intValue() 
== severity2.intValue() 
&amp;&amp;</SPAN></FONT></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT size=+0><FONT size=+0><FONT 
size=+0><FONT size=+0><SPAN class=888123206-28022007></SPAN><FONT 
face=Arial><FONT color=#800000><FONT size=2><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eventType1.equals(eventType2) 
&amp;&amp;</SPAN></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT size=+0><FONT size=+0><FONT 
size=+0><FONT size=+0><FONT size=+0><FONT size=+0><SPAN 
class=888123206-28022007></SPAN><FONT face=Arial><FONT color=#800000><FONT 
size=2><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eventTime2.longValue()&nbsp;&gt;= 
eventTime1.longValue()</SPAN></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT size=+0><FONT size=+0><FONT 
size=+0><FONT size=+0><FONT size=+0><FONT size=+0><FONT face=Arial><FONT 
color=#800000><FONT 
size=2>&nbsp;</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT><FONT 
size=+0><FONT face=Arial><FONT color=#800000><FONT size=2><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</SPAN><BR>&nbsp;&nbsp;<BR>&nbsp;then</FONT></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#800000 size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#800000 size=2>&nbsp;&nbsp;<SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp; 
</SPAN>event_1.setStatus("compress");<BR>&nbsp;&nbsp;<SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp; 
</SPAN>event_2.setStatus("compress");</FONT></DIV>
<DIV dir=ltr align=left><FONT color=#800000><BR><FONT face=Arial 
size=2>end</FONT></FONT></FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff size=2>This 
is the rule which i am using in my DRL file. I am asserting events into working 
memory such that all the events are matching with the rule. But i am unable to 
assert&nbsp;more than around 1000 events into workingMemory, I am keep asserting 
events into working memory, by the time it reaches the count to around 1000 
events, it is throwing memory out of bound exception. I increased heap size from 
default 64mb to 512mb. with this i could able to assert more 300 events thats 
it. </FONT></SPAN></DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff size=2>when i 
got this problem, i modified my rule in the following way,</FONT></SPAN></DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888123206-28022007><FONT color=#0000ff size=2><FONT face=Arial 
color=#800000>rule "Compress"<BR>&nbsp;salience 
10<BR>&nbsp;when<BR>&nbsp;&nbsp;event_1 : ExtendedEvent<SPAN 
class=888123206-28022007> </SPAN>(<SPAN class=888123206-28022007> </SPAN><SPAN 
class=888123206-28022007>moid1 : source , severity1 : severity , eventType1 : 
eventType , eventTime1 : time </SPAN>)<BR>&nbsp;&nbsp;event_2 : 
ExtendedEvent<SPAN class=888123206-28022007> </SPAN>(<SPAN 
class=888123206-28022007>&nbsp;source == moid1 , severity == severity1 , 
eventType == eventType1 , time &gt;= eventTime1&nbsp;</SPAN>)</FONT> 
<DIV><FONT face=Arial color=#800000 size=2>&nbsp;&nbsp;</FONT><FONT 
size=+0><FONT color=#800000><FONT face=Arial 
size=2>&nbsp;&nbsp;<BR>&nbsp;then</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#800000></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#800000>&nbsp;&nbsp;<SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp; 
</SPAN>event_1.setStatus("compress");<BR>&nbsp;&nbsp;<SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp; 
</SPAN>event_2.setStatus("compress");</FONT></DIV><FONT color=#800000>
<DIV dir=ltr align=left><BR><FONT face=Arial>end</FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left></FONT><FONT face=Arial>I<SPAN 
class=888123206-28022007>f i write my rule like this, then i could able to 
assert more 500 event objects. i.e i could able to assert in total around 1700 
event objects&nbsp;with this modified rule. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=888123206-28022007>As per 
my understanding,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when we 
assert objects into working memory, pattern matching is done at the time of 
assertion only, while this process, if we create more variables in "<FONT 
color=#800000>when</FONT>" part and using "<FONT color=#800000>eval</FONT>" 
creating more overhead(memory perspective)&nbsp;while pattern matching. When we 
assert thousands of objects(events) into working memory, i think Drools engine 
creates several objects internally(in rete network which i am not aware), i 
think that would be the overhead.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=888123206-28022007>But in 
my project, i need to work with around&nbsp;15,000 event objects in the working 
memory, of them, around 10,000&nbsp;objects will match 
the&nbsp;rule.&nbsp;</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=888123206-28022007>Can any 
one&nbsp;in the group help me how to approach to&nbsp;solve this problem. 
&nbsp;Is there anyway.. Ultimately, i have to work with 10000 events in working 
memory, given all the events matches with the rule in DRL.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007>Thanks,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN 
class=888123206-28022007>Ramesh</SPAN></FONT></DIV></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff 
size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial 
color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><FONT 
face=Arial color=#0000ff size=2></FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Michael 
Neale<BR><B>Sent:</B> Tuesday, February 27, 2007 12:52 PM<BR><B>To:</B> Rules 
Users List<BR><B>Subject:</B> Re: [rules-users] How many objects we can assert 
into working memorymaximum<BR></FONT><BR></DIV>
<DIV></DIV>The answer is:<BR><BR>42. <BR><BR>Or, perhaps, the length of a piece 
of string. <BR><BR>It really varies with how much memory you want to throw at 
it, thats all really. The effectiveness of the RETE network may also add some 
overhead. <BR><BR>I have heard of people pushing in millions of facts into one 
working memory, but that would tend to be extreme - and it will use a lot of 
memory. <BR><BR>IN 3.2 there are some added efficiencies over 3.0, when it comes 
out. <BR><BR>
<DIV><SPAN class=gmail_quote>On 2/27/07, <B class=gmail_sendername>Reddy 
Ramesh-in2259c</B> &lt;<A 
href="mailto:in2259c@motorola.com">in2259c@motorola.com</A>&gt; wrote:</SPAN> 
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
  <DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN>Hi,</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is working memory 
  size&nbsp;increases dynamically?? How many objects we can assert into 
  workingmemory? given, all the objects are matching with rule in a drl 
  file...</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>can anyone 
  please tell me this...?</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN>thanks,</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
  size=2><SPAN>Ramesh</SPAN></FONT></DIV><BR></DIV><BR>_______________________________________________<BR>rules-users 
  mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR><A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="https://lists.jboss.org/mailman/listinfo/rules-users" 
  target=_blank>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>