Hi Nikhil,
If it's taking 5-6 seconds as you said, it means that you are compiling your
rules at runtime. To improve that, you could find a way to cache your
KnowledgeBase*s* - that would make your rules be compiled only once and
subsequent creation of stateless or stateful sessions would be pretty quick.
To go further, you could create the knowledge bases using precompiled rules.
For that, I use a maven plugin that compiles my drls at build time. I don't
have a link now, but you should be able to find it.
Sharing your knowledge bases and precompiling your rules will certainly make
a difference.
Hope that helps.
Leo.
On Sat, Sep 18, 2010 at 10:00 AM, Nikhil S. Kulkarni <
Nikhil.Kulkarni(a)mastek.com> wrote:
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(a)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_@mail.gmail.com<AANLkTinr2-%2BtwT_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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users