Re: [rules-users] Drools consuming a lot of memory for short lived objects thus impacting average response time.

2012-11-22 Thread Wolfgang Laun
What does your notion of "response time" include? E.g., loading of a
rule base from a package, creating a session from a loaded rule base,
inserting N facts,...?

Using decision tables tends to create a large number of simple rules,
and this may not be the best way to go.

Describe the usage scenario, outline the rules resulting from the
decision table(s) (do you have one or several), etc.

-W

On 23/11/2012, manohars  wrote:
> Hello,
>
> We are using Drools 5.3.0 Final distribution using decision tables(.pkg rule
> files) in our solution. However, Drools is taking a lot of memory (@ 350 mb
> on Linux-64bit).
>  On profiling,we realize that huge number of short lived objects are getting
> created.(org.drools.impl.StatefulKnowledgeSessionImpl, IndexVariableResolver
> class and org.mvel2.* classes). It leads increase in Garbage Collection
> cycles there by leaving an impact on average response time.
> Is there any clever way to use Drools to achieve @ 1 millisecond to 2
> millisecond response time given the rules are simple? We tried to use drl
> based rules but no improvement.
> Any idea about how to deal with this such a big memory contributors ?
>
> Regards,
> Manohar
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-consuming-a-lot-of-memory-for-short-lived-objects-thus-impacting-average-response-time-tp4020948.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools consuming a lot of memory for short lived objects thus impacting average response time.

2012-11-22 Thread manohars
Hello, 

We are using Drools 5.3.0 Final distribution using decision tables(.pkg rule
files) in our solution. However, Drools is taking a lot of memory (@ 350 mb
on Linux-64bit). 
 On profiling,we realize that huge number of short lived objects are getting
created.(org.drools.impl.StatefulKnowledgeSessionImpl, IndexVariableResolver
class and org.mvel2.* classes). It leads increase in Garbage Collection
cycles there by leaving an impact on average response time. 
Is there any clever way to use Drools to achieve @ 1 millisecond to 2
millisecond response time given the rules are simple? We tried to use drl
based rules but no improvement. 
Any idea about how to deal with this such a big memory contributors ? 

Regards, 
Manohar 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-consuming-a-lot-of-memory-for-short-lived-objects-thus-impacting-average-response-time-tp4020948.html
Sent from the Drools: User forum mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Sample Required

2012-11-22 Thread adc
I had the same issue.
Have a look  here

 
.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Sample-Required-tp4020941p4020942.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Sample Required

2012-11-22 Thread Padmanabhan L
Could anyone please give me a stepwise example(tutorial) for drools in
eclipse ide??? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Sample-Required-tp4020941.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError, but only sometimes

2012-11-22 Thread kenneth . westelinck
Full stacktrace is below:

[CreateBioMaterialCommand] execution failed:: java.lang.LinkageError: loader 
(instance of  org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): 
attempted  duplicate class definition for name: 
"com/foo/bar/platform/breeding/domain/list/biomaterial/Rule_gg___unique___preferredName_656ee3db19d34e689d95e2d6b2be67b6"
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) 
[rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) 
[rt.jar:1.6.0_30]
at 
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
 [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
 [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) 
[knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:295) 
[rt.jar:1.6.0_30]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 
[rt.jar:1.6.0_30]
at 
com.foo.bar.platform.breeding.domain.list.biomaterial.Rule_gg___unique___preferredName_656ee3db19d34e689d95e2d6b2be67b6Eval0InvokerGenerated.evaluate(Unknown
 Source)
at 
com.foo.bar.platform.breeding.domain.list.biomaterial.Rule_gg___unique___preferredName_656ee3db19d34e689d95e2d6b2be67b6Eval0Invoker.evaluate(Unknown
 Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:145)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:337) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:298) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:888) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
com.foo.bar.platform.breeding.domain.biomaterial.validation.DefaultBioMaterialValidationService$1.execute(DefaultBioMaterialValidationService.java:54)
 [bar-platform-cc-model-service-2.3.0_BETA3-SNAPSHOT.jar:]
at 
be.foo.drools.spring.support.impl.KnowledgeTemplateImpl.execute(KnowledgeTemplateImpl.java:47)
 [drools-spring-support-2.2.3.jar:]
at 
com.foo.bar.platform.drools.support.impl.ConditionalKnowledgeTemplateImpl.execute(ConditionalKnowledgeTemplateImpl.java:28)
 [bar-platform-cc-model-service-2.3.0_

Re: [rules-users] java.lang.LinkageError, but only sometimes

2012-11-22 Thread Wolfgang Laun
On 22/11/2012, kenneth.westeli...@telenet.be
 wrote:
> Hi,
>
> Thank you for your reply. My original post was wrongly obfuscated. This is
> the correct stacktrace:

In full??
-W
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError, but only sometimes

2012-11-22 Thread kenneth . westelinck
Hi,

Thank you for your reply. My original post was wrongly obfuscated. This is the 
correct stacktrace:
java.lang.LinkageError: loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): attempted
duplicate class definition for name:
"a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6"
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) 
[rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) 
[rt.jar:1.6.0_30]
at 
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
 [drools-core-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
 [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
 [knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at 
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) 
[knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:295) 
[rt.jar:1.6.0_30]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 
[rt.jar:1.6.0_30]
at 
a.b.c.Rule_person___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0InvokerGenerated.evaluate(Unknown
 Source)
at 
a.b.c.Rule_person___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0Invoker.evaluate(Unknown
 Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114) 
[drools-core-5.4.0.Final.jar:5.4.0.Final]

> Has there been some mixture of compiled packages in a way as it should not be 
> done?
Hmmm, I don't understand very well, can you please elaborate?

> Is the procedure for generating these artificial names watertight?
I don't think I understand this either. The rules all have unique names. The 
name: "Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6" is generated 
by drools itself.


- Original Message -
From: "Wolfgang Laun" 
To: "Rules Users List" 
Sent: Thursday, November 22, 2012 10:51:57 AM
Subject: Re: [rules-users] java.lang.LinkageError, but only sometimes

Just in case this has been missed (and using some guesswork) I should
point out that the generated name extensions for the classes
containing the right hand side code in a method are identical for two
different rules clashing in the load of the serialized knowledge base.

a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6
a.b.c.Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6

Has there been some mixture of compiled packages in a way as it should
not be done? Is the procedure for generating these artificial names
watertight?

-W


On 22/11/2012, kennywest  wrote:
> I tried the suggestion from: https://issues.jboss.org/browse/JBRULES-3675
> by
> adding a synchronized to the loadClass method. After further testing the
> problem remains :( So adding synchronized does not solve the problem. Any
> bright ideas? I am willing to try everything :)
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020936.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError, but only sometimes

2012-11-22 Thread Wolfgang Laun
Just in case this has been missed (and using some guesswork) I should
point out that the generated name extensions for the classes
containing the right hand side code in a method are identical for two
different rules clashing in the load of the serialized knowledge base.

a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6
a.b.c.Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6

Has there been some mixture of compiled packages in a way as it should
not be done? Is the procedure for generating these artificial names
watertight?

-W


On 22/11/2012, kennywest  wrote:
> I tried the suggestion from: https://issues.jboss.org/browse/JBRULES-3675
> by
> adding a synchronized to the loadClass method. After further testing the
> problem remains :( So adding synchronized does not solve the problem. Any
> bright ideas? I am willing to try everything :)
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020936.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError, but only sometimes

2012-11-22 Thread kennywest
I tried the suggestion from: https://issues.jboss.org/browse/JBRULES-3675 by
adding a synchronized to the loadClass method. After further testing the
problem remains :( So adding synchronized does not solve the problem. Any
bright ideas? I am willing to try everything :)



--
View this message in context: 
http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020936.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users