Re: [rules-users] Perfromance issues and memory leaks in Drools (Edson Tirelli)
by Nikhil S. Kulkarni
Hi Edson,
Thanks for the information.
But now I want to ask you one thing. I have seen your post. The problem in application is mainly usage of memory
You posted that Match 30,2010. I downloaded Drools 5.0 on August 2009 and I am using that.
SO this "True modify" algorithm is implemented in Drools 5.1 only or it is even available in latest Drools 5.0
If I use Drools 5.1 then Whether I will get any advantage.
In application we are using Rules Template ,Rule Flows and drls. When I am calling Rules from Java then it is taking more time compared to calling Java method from rules.
In addition to this can u suggest me how to write better rules Query.
I am using very simple way of writing Rules Query like :-
When
Abc : ABC(condition==A)
Then
Call method
End;
Thanks & Regards,
Nikhil S. Kulkarni
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Friday, September 17, 2010 9:30 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 46, Issue 58
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Perfromance issues and memory leaks in Drools (Edson Tirelli)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Sep 2010 11:04:55 -0400
From: Edson Tirelli <tirelli(a)post.com>
Subject: Re: [rules-users] Perfromance issues and memory leaks in
Drools
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTinr2-+twT_myOijf1rc_wAw7E6CVtwjPNGKBOb_(a)mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"
Nikhil,
Maybe you are using the term "memory leak" loosely here, but otherwise,
Drools 4.0.7 and Drools 5.0.1 were both tested to exhaustion for memory
leaks and I can tell you that no memory leak was found, and I personally
doubt there is one there on regular use. Also, FYI, Drools 5.x eliminates
the need for shadow facts, what is a considerable memory save over 4.x, but
adds some other overheads for performance improvement that kind of offset
those gains. On the other hand, Drools 5.1.1 takes the algorithm to a new
level, saving a lot of memory on systems that use modify actions on their
rules.
http://blog.athico.com/2010/03/drools-halves-memory-use-with-new-true.html
Regarding your performance, all I can tell you is that a rules engine is
a relational engine that works pretty much like a database, and rules as
databases queries. The same way you can write SQL queries that run fast or
slow on a database, you can write rules that run fast or slow on a rules
engine. It all depends on how the rules/queries are written, how your data
model/domain model looks like, etc.
So, regarding your question, we can't tell you how to improve those
metrics without knowing your domain model, rules and etc.
[]s
Edson
2010/9/17 Nikhil S. Kulkarni <Nikhil.Kulkarni(a)mastek.com>
> Hi,
>
>
>
> I have written 2 different Drools programs. One is with
> Using rule Base of Drools 4.0 and other is using Knowledge Base of Drools
> 5.0.
>
> I was trying to check that is there any improvement in Drools 5.0. But I
> haven?t got any performance improvement in Drools 5.0 code compared to
> Drools 4.0.
>
>
>
> One more important thing is I am calling this drools code
> from My application which itself is heavy application, when I am doing
> Performance tuning
>
> I got one point i.e. session.execute() method is taking around 6-7 seconds
> to initialize rules and even the memory utilized by Rules is huge.
>
>
>
> So is there any way that we can reduce the Memory leakage and improve
> performance.
>
>
>
> Waiting for Reply.
>
>
>
> Thanks & Regards,
>
> Nikhil S. Kulkarni
>
> Emp No: - 9254
>
>
>
>
>
> MASTEK LTD.
> In the US, we're called MAJESCOMASTEK
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100917/2573a18...
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 46, Issue 58
*******************************************
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 9 months
Fwd: Early bird registration ENDS TODAY: Rules Fest 2010
by Edson Tirelli
Hey people,
I am glad to see that people are registering for the bootcamp (and the
conference)! Hope to meet you all there! If you've never been to Rules Fest
before (this is the 3rd year it is happening), it is the only technical,
no-fluff, conference in Rules Engines and related technologies that I know
of. I had a great time last 2 years and I know it will not be different
this year.
And for those that did not registered yet, just a reminder, the early
bird discount ends today as per the e-mail bellow.
Edson
---------- Forwarded message ----------
From: Rules Fest Association <Rules_Fest_Association(a)mail.vresp.com>
Date: 2010/9/17
Subject: Early bird registration ENDS TODAY: Rules Fest 2010
To: tirelli(a)post.com
International Rules Fest 2010 Conference
[image: Header.jpg]
*Studied, Defined, Explained, Illustrated*:
Rules & Decisioning Technologies Made Easy
[image: Register Now Before September 17
deadline!]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/934511...>
*Conference fee*:
*$399*
*Early Bird Registration*
*$349*
*Register today and save $50!*
*Conference package deal*:
- 4 nights and 3 days at the historic Dolce Hayes Mansion
Resort<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/01a454...>
- A boot camp of choice
- Continental breakfast and lunch each day
- Discount off from the Rules Fest 2011 conference
- *$999 ($225 savings)*
*Bootcamps*
Rules Fest 2010 offers a number of hands-on tutorial and coding sessions
known as "bootcamps." These events give all developers — from novice to
advanced — a chance to learn new technologies and/or techniques while being
coached by those who know them well. All bootcamps are a full day, and they
run concurrently on Thursday, October 14th, the day after the main
conference ends.
More info on Bootcamps...<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/ba8eec...>
Hi ,
Dozens of the world’s top thinkers, developers , architects, engineers and
programmers from industry and academia will come together on October 11-14
to present a single-track of 17 hot topics reasoning, inferencing,
artificial intelligence and pattern matching … at the heart of many
solutions to modern, complex computing problems.
The world's only technical conference devoted to the practical application
of all rule-based and knowledge-based reasoning, inferencing, and
decisioning technologies will feature 3 days of presentations.
*Conference Agenda<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/6091ae...>
*
Topic categories include:
- Reasoning *in Action*
- Reasoning Methodologis & Best Practices
- Reasoning and Management
- Reasoning Trends
Factoid: RulesFest 2010 speakers comprise
7 CEOs
6 Ph.D.s
4 CTOs
8 Senior Developers
1 Vice President
View abstracts<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/23762b...>
*Click to register and save $50
<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/8f9172...>
*
For info: www.rulesfest.org<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/4ccfdf...>
;
Email: info(a)rulesfest.org
*Join the Dialog on
Rules Fest 2010!*
[image: Rules Fest 2010 on
Twitter]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/7db47d...>
[image: "Like us" on
Facebook]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/be1ef2...>
[image: Join our LinkedIn
Group]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/f0ea72...>
A message from Rules Fest 2010 Vice Chairman, Charles Young of Solidsoft:
[image: Message from Rules Fest Vice Chairman Charles Young,
SolidSoft]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/80c81e...>
*RulesFest 2010*
*International Conference on Reasoning Technologies *
[image: Rules Fest 2010: International Conference on Reasoning
Technologies]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/9d220c...>
serving Software
Engineers
Developers
Architects
and
Programmers
Contact Information: Rules Fest Association, Inc.
6655 W. Sahara Avenue Suite E-102
Las Vegas, Nevada 89146
------------------------------
Click to view this email in a
browser<http://hosted.verticalresponse.com/756695/b85f095f0f/1343038631/4dadcb8b59/>
If you no longer wish to receive these emails, please reply to this message
with "Unsubscribe" in the subject line or simply click on the following
link: Unsubscribe <http://cts.vresp.com/u?b85f095f0f/4dadcb8b59/mlpftw>
------------------------------
Rules Fest Association, Inc.
6655 W. Sahara Avenue Suite E-102
Las Vegas, NV 89146
Read <http://www.verticalresponse.com/content/pm_policy.html> the
VerticalResponse marketing policy.
[image: Try Email Marketing with VerticalResponse!]
<http://www.verticalresponse.com/landing/ef/?mm//b85f095f0f>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
15 years, 9 months
Perfromance issues and memory leaks in Drools
by Nikhil S. Kulkarni
Hi,
I have written 2 different Drools programs. One is with Using rule Base of Drools 4.0 and other is using Knowledge Base of Drools 5.0.
I was trying to check that is there any improvement in Drools 5.0. But I haven't got any performance improvement in Drools 5.0 code compared to Drools 4.0.
One more important thing is I am calling this drools code from My application which itself is heavy application, when I am doing Performance tuning
I got one point i.e. session.execute() method is taking around 6-7 seconds to initialize rules and even the memory utilized by Rules is huge.
So is there any way that we can reduce the Memory leakage and improve performance.
Waiting for Reply.
Thanks & Regards,
Nikhil S. Kulkarni
Emp No: - 9254
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 9 months
How to activate/deactivate a rule.
by Ritesh
Hi,
I have 3 rules in my drl file and want the last one should get fired only
after all the facts in rule1 and rule2 gets inserted in working memory.
Please see below code for more understanding. Please suggest.
Thanks
declare DistinctAT
d_auditT : String
end
declare ActualSum
auditT : String
sumOfThree : BigDecimal
end
rule "insert combined sum"
dialect 'java'
when
ABC( $a:A, $b:B, $c:C )
then
BigDecimal actSum = $c.multiply(0.13);
ActualSum $as = new ActualSum();
$as.setAuditT($a);
$as.setSumOfThree(actSum);
insert($as);
System.out.println("AT :" + $movAuditT);
end
rule "insert distinct AT"
dialect 'java'
when
$a : ActualSum( $AT : auditT )
not DistinctAT( d_auditT == $AT )
then
DistinctAT $disAT = new DistinctAT();
$disAT.setD_auditT($AT);
insert($disAT);
System.out.println("Done!");
end
rule "Get Sum Group by AT"
dialect 'java'
when
DistinctAT( $dAT: d_auditT )
$total : Double()
from accumulate( ActualSum( auditT == $dAT, $actSum_Main : sumOfThree ),
sum( $actSum_Main ) )
eval(
chkRuleExpre( $total,$lfna_SEI,$r_SEI )
)
then
System.out.println("Done Main Rule, total :" + $total);
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-activate-deact...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
Memory leak error when deploying Guvnor in Tomcat
by bbarani
Hi,
I am getting the below now and then when I try to export the repository from
one system to another system (move the repository folder / repository.xml
file present in bin folder of tomcat to tomcat bin folder of another
system). Can someone let me know what might be the root cause of this issue.
Sometimes it works fine after migrating the above folders / files but most
of the time I am getting the below error.
SEVERE: A web application registered the JBDC driver
[org.apache.derby.jdbc.Auto
loadedDriver] but failed to unregister it when the web application was
stopped.
To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 15, 2010 4:54:42 PM org.apache.catalina.loader.WebappClassLoader
clearRefere
ncesThreads
SEVERE: A web application appears to have started a thread named [Thread-5]
but
has failed to stop it. This is very likely to create a memory leak.
Sep 15, 2010 4:54:42 PM org.apache.catalina.loader.WebappClassLoader
clearRefere
ncesThreads
SEVERE: A web application appears to have started a thread named [Timer-2]
but h
as failed to stop it. This is very likely to create a memory leak.
Sep 15, 2010 4:54:42 PM org.apache.catalina.loader.WebappClassLoader
clearRefere
ncesThreads
SEVERE: A web application appears to have started a thread named
[derby.antiGC]
but has failed to stop it. This is very likely to create a memory leak.
Sep 15, 2010 4:54:42 PM org.apache.catalina.loader.WebappClassLoader
clearThread
LocalMap
SEVERE: A web application created a ThreadLocal with key of type
[org.apache.jac
krabbit.name.NameFormat$1] (value
[org.apache.jackrabbit.name.NameFormat$1@1104d
a7]) and a value of type [java.util.regex.Matcher] (value
[java.util.regex.Match
er[pattern=(([^ /:\[\]*'"|](?:[^/:\[\]*'"|]*[^ /:\[\]*'"|])?):)?([^
/:\[\]*'"|](
?:[^/:\[\]*'"|]*[^ /:\[\]*'"|])?) region=0,7 lastmatch=nt:base]]) but failed
to
remove it when the web application was stopped. To prevent a memory leak,
the Th
readLocal has been forcibly removed.
Thanks,
Barani
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Memory-leak-error-whe...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
Re: [rules-users] EntityManager is closed
by Eugenio Abello
I have the same problem with drools 5.2 Using JPA with tomcat on bitronix.
I temporarily resolved with:
env.set (EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, emf.createEntityManager
());
Every time I use the session.
15 years, 9 months