[rules-users] Multi-threading inefficiency caused by static class synchronization?

ping jinpingv at hotmail.com
Mon Dec 10 18:29:53 EST 2012


I tried profiling my test program and found that all thread spent most of
their time blocking or waiting for the same lock:
org.drools.runtime.process.ProcessRuntimeFactory.getProcessRuntimeFactoryService()
and 
org.drools.common.AbstractRuleBase.lock()

examples:

Thread-6 [WAITING] CPU time: 1s
java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock()
org.drools.common.UpgradableReentrantReadWriteLock.lowPriorityWriteLock()
org.drools.common.UpgradableReentrantReadWriteLock.writeLock()
org.drools.common.AbstractRuleBase.lock()
org.drools.impl.StatelessKnowledgeSessionImpl.<init>(InternalRuleBase,
KnowledgeAgent, KnowledgeSessionConfiguration)
org.drools.impl.KnowledgeBaseImpl.newStatelessKnowledgeSession()
java.lang.Thread.run()



Thread-7 [BLOCKED] CPU time: 1s
org.drools.runtime.process.ProcessRuntimeFactory.getProcessRuntimeFactoryService()
org.drools.runtime.process.ProcessRuntimeFactory.newProcessRuntime(AbstractWorkingMemory)
org.drools.common.AbstractWorkingMemory.createProcessRuntime()
org.drools.common.AbstractWorkingMemory.setKnowledgeRuntime(InternalKnowledgeRuntime)
org.drools.impl.StatefulKnowledgeSessionImpl.<init>(ReteooWorkingMemory,
KnowledgeBase)
org.drools.impl.StatelessKnowledgeSessionImpl.newWorkingMemory()
org.drools.impl.StatelessKnowledgeSessionImpl.execute(Object)
java.lang.Thread.run()




--
View this message in context: http://drools.46999.n3.nabble.com/Multi-threading-inefficiency-caused-by-static-class-synchronization-tp4021160p4021163.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list