Re: [rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage
by Greg Barton
I was going to look at this at some point. I guess that point will be tonight. :)
GreG
On Oct 25, 2010, at 15:02, Edson Tirelli <tirelli(a)post.com> wrote:
No worries, it is a good starting point anyway. Hopefully someone
can continue from there or I will eventually fix it. Just a lot of
stuff in my plate already that have priority over this.
Edson
2010/10/25 mardo <mardo(a)abicola.de>:
Unfortunately no, I just had a look how it was implemented (like
http://tutorials.jenkov.com/java-concurrency/thread-signaling.html#missedsig
nals) -> missed signals and noticed that it somehow didn't work as intended.
But no idea how to directly correct it, sorry.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: Montag, 25. Oktober 2010 21:30
To: Rules Users List
Subject: Re: [rules-users] Starting engine using fireUntilHalt and inserting
no facts results in 50% CPU usage
Do you have a solution/patch for it?
Edson
2010/10/25 mardo <mardo(a)abicola.de>:
Luckily just stumbled upon this mail...
You can take a look at
http://drools-java-rules-engine.46999.n3.nabble.com/fireUntilHalt-and-OSGi-C
PU-load-td1022352.html
where I already provided a minimal example (don't know if it covers all
cases) and tracked it down to missedNotifyAll in DefaultAgenda
cheers
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: Montag, 25. Oktober 2010 21:17
To: Rules Users List
Subject: Re: [rules-users] Starting engine using fireUntilHalt and
inserting
no facts results in 50% CPU usage
This is clearly a regression as Drools should be not be using busy
waits in fireUntilHalt(). It should use monitors and locks as it was
doing before.
Can anyone open a JIRA? also, if anyone would be willing to take
investigate and fix this one, it would really help. Otherwise, I will
add it to my queue.
Thanks,
Edson
2010/10/25 Norman C <rent_my_time(a)yahoo.com>:
Note that the 100% CPU issue with fireUntiHalt is only with the 5.1
version of
Drools. In 5.0.x, CPU is close to 0% when there are no rules to fire. I
saw
this when I was testing upgrading to 5.1.
Norman
----- Original Message ----
From: jschmied <nabble(a)juergenschmied.de>
To: rules-users(a)lists.jboss.org
Sent: Sun, October 24, 2010 4:06:02 AM
Subject: Re: [rules-users] Starting engine using fireUntilHalt and
inserting no
facts results in 50% CPU usage
Hi!
fireUntilHalt uses one processor with 100%. You have a dualcore, so it's
50%. It's by design like this.
You can:
- Call fireAllRules after every insert if you have no ruleflow.
- Use fireAllRules in a loop with a small sleep and check for the end of
the
ruleflow in the loop:
while (prc.getState() == ProcessInstance.STATE_ACTIVE) {
Threads.sleep(20);
ksession.fireAllRules();
}
with both methods you get a low cpu load.
bye
juergen
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Starting-engine-using-fi
reUntilHalt-and-inserting-no-facts-results-in-50-CPU-usage-tp1760370p1761821
.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 4 months
Metadata assigned to rules?
by Peter C. Marks
Hello,
In section 4.7.2 of the Drools Expert User Guide, it states: "Metadata may
be assigned to several different constructions in Drools: fact types, fact
attributes and rules. " I could not figure out how to attach metadata to a
rule. Is this feature available?
Thanks,
Peter
15 years, 4 months
Connectivity with Database
by kedar vyawahare
Hi all,
I want to make Connectivity to a external Database through my Drool Guvnor
so that I can directly create rules on attributes of that tables of
Database.
Please suggest me some way to solve this problem.
Thanks in Advance.
Kedar.
15 years, 4 months
How to trigger a certain task within an ad-hoc subprocess
by Wen Yao
Hi,
I am implementing an ad-hoc subprocess similar to the one described in the
Drools&jBPM blog:
http://planet.jboss.org/view/post.seam;jsessionid=24F0449616816E6271113E1...
I am using BPMN 2.0 and drools 5.1
After I created a embedded subprocess, I changed the xml element to
adHocSubProcess and added a rulegroup associated with this subprocess.
My question is, how can I trigger one of the tasks (or process fragments) in
the ad-hoc subprocess? The following function can only be used to trigger a
reusable subprocess:
drools.getWorkingMemory().startProcess("org.drools.examples.cdss.ClinicalPathwayX"),
instead of isolated tasks/fragments in the adhoc subprocess.
Further, can this be done in the java class using API, instead of using
rules?
Any help will be appreciated, better with examples. Thanks a lot!
Best regards,
----
Wen
15 years, 4 months
Guided Rule Editor inconsistency for DSL's
by drdaveg
I've noticed that the LHS of the Eclipse Guided Rule Editor can employ DSL
sentences or an object model, but there doesn't seem to be a manner to
incorporate the DSL on the RHS of rules (other in "free form" code)
Is that by design? Or is there some property that can enable the dialog
box/drop-down list editing of rules in the DSL on the RHS?
It seems odd that the capability works out-of-box for the left hand side,
but not the RHS. Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guided-Rule-Editor-in...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
by Greg Barton
Yes, but I just fired up a small project using it and it used 100% of CPU. If you build the attached project you'll see the tests run just fine. (They use fireAllRules.) If you launch from the commandline, ("java -jar target/DroolsBoxes-1.0.jar") which uses fireUntilHalt, the rules fire (and complete) just fine, but it continues to use 100% of a cpu core indefinitely. This is with 5.1.1. If I change the drools version to 5.2.0-SNAPSHOT it compiles but the tests won't run. They all fail with the following exception:
java.lang.NoSuchMethodError: org.drools.spi.DeclarationScopeResolver.<init>([Ljava/util/Map;Ljava/util/Stack;)V at org.drools.rule.builder.RuleBuildContext.<init>(RuleBuildContext.java:72) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1198) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:75) at com.sample.DroolsTest.go(DroolsTest.java:31) at com.sample.BoxTest.test0(BoxTest.java:21)
--- On Thu, 3/17/11, Edson Tirelli <ed.tirelli(a)gmail.com> wrote:
From: Edson Tirelli <ed.tirelli(a)gmail.com>
Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Date: Thursday, March 17, 2011, 10:47 AM
To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely.
Edson
2011/3/17 Greg Barton <greg_barton(a)yahoo.com>
Has the performance problem with fireUntilHalt been fixed in 5.2?
--- On Thu, 3/17/11, Makewise - Vitor Rui Mendonça <Vitor.Mendonca(a)brisa.pt> wrote:
From: Makewise - Vitor Rui Mendonça <Vitor.Mendonca(a)brisa.pt>
Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
To: "'Rules Users List'" <rules-users(a)lists.jboss.org>
Date: Thursday, March 17, 2011, 7:01 AM
Hi Thomas, thanks for the info!
I googled it quite a bit and I think it’s a path to be explored, albeit I’ve saw several messages on the mailing list regarding performance issues
when using fireUntilHalt.
_______________________________________________
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
-----Inline Attachment Follows-----
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 4 months
Basic doubt regarding Drools Fusion - @expires
by Makewise - Vitor Rui Mendonça
Hi all!
I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here…
Imagine that I have an event:
declare A
@role( event )
@expires( 1h )
end
On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory.
My doubt: When does event A expires?
a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or
b) by calling “fireAllRules()” method (event-based)
T.I.A.
Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt<http://www.makewise.pt>
Uma empresa: Grupo Sousa Pedro<http://www.sousapedro.com>
[cid:image002.jpg@01CBE3EF.C9596900]
________________________________
Declaração:
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu a mesma por engano, fica notificado que é estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do seu computador,sem os reproduzir.
Disclaimer:
The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses.If you are not the intended recipient (or the person responsible for delivering to the intended recipient) and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this message and the files attached, without retaining a copy.
________________________________
15 years, 4 months
Re: [rules-users] drools design question
by Esteban Aliverti
You could also use drools (maybe a decision table) to select the different
drl files.
Best regards,
El mar 16, 2011 8:24 p.m., "marunam" <sutavis(a)gmail.com> escribió:
Hi,
We are developing an insurance application and we have decided to use drool
rules for our business rules
Now, we could have global business rules(applies to all states), specific to
state, specific to factor X, specific to factor Y etc. This way we are
expecting many drl files.
Now, when the application runs, we would know the values for state, factor
X, factor Y etc. and using these values we would determine(using database)
which drl files to load dynamically and just run the rules in those drls.
Is this approach recommended? Do you have any suggestions?
Thanks
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/drools-design-questio...
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 4 months
Custom dates with @date-effective and @date-expires
by Faisal Shafique
Hi,
Can I use any arbitrary date for the drools execution so that correct rules are fired based on not current date but any arbitrary date? This is in the context of @date-effective and @date-expires metadata that can be specified as part of a rule. Drools expert documentation seems to imply that this metadata uses "current date" though I am not clear what current date (system date?) means.
Thanks
Faisal Shafique
15 years, 4 months
Problem with Drools debuggin in Eclipse Reg:
by Murali Venugopal
Hi,
I'm encountering a strange problem with debugging an Drools application
in Eclipse Platform. I couldn't find any help in the internet. Also, i
can't find any previous post in this mailing list. Please try to help me.
My Platform details are below:
OS: Fedora 13
Eclipse: Galileo
Java: JDK 1.6 Update 21
Drools version: 5.1.1
Snapshot of the Error message:
*Console Output:*
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports
initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
*Event Details:*
**
*Message:*
An internal error occurred during: "Launching DroolsTest (4)".
*Exception Stack Trace:*
java.lang.IncompatibleClassChangeError: Expected static method
org.drools.eclipse.launching.DroolsVMDebugger.renderCommandLine([Ljava/lang/String;)Ljava/lang/String;
at
org.drools.eclipse.launching.DroolsVMDebugger.run(DroolsVMDebugger.java:182)
at
org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:101)
at
org.drools.eclipse.launching.DroolsLaunchConfigurationDelegate.launch(DroolsLaunchConfigurationDelegate.java:30)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Thanks in advance.
Regards,
_ _ _ _ |.
| | ||_|| (_||| \/
Get your world in your inbox!
Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!
Log on to http://www.sify.com
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin(a)sifycorp.com
15 years, 4 months