JESS: [EXTERNAL] Jess in a multithreaded environment

"Nguyen, Son" <[email protected]> Thu, 13 Dec 2012 11:04:13 -0500
Newsgroups gmane.comp.java.jess
Message-ID <[email protected]>
------_=_NextPart_001_01CDD94B.7F1FBC76
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable


Hi Jess experts,

We use Jess in a multi-threaded environment and have experienced some
performance degradation when going from a single thread to multiple
threads.
Our implementation uses the Slot Specific feature.=20

Using a Java profiler, HashCodeComputer.isValueObject() stood out as one
of the main contributing factors, if not the most likely,  to the
degradation.
This method is synchronized using the static List m_nonValueClasses
member. The averege time of this method execution is
0,2022 microsec for one thread and 1,2192 microsec for two threads.
Basically, 0.2 microsec for one threads and 1 microsec for 2 and 4
threads.
There are hundreds of thousands of these calls for a single Rete.run.

Is it possible that HashCodeComputer.isValueObject() has such an effect
on scalability and performance?
If so, what can be done about it?

I am looking forward to hearing any feedback.

Son Nguyen

------_=_NextPart_001_01CDD94B.7F1FBC76
Content-Type: text/html;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7654.12">
<TITLE>Jess in a multithreaded environment</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi Jess experts,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">We use Jess in a multi-threaded =
environment and have experienced some performance degradation when going =
from a single thread to multiple threads.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Our implementation uses the Slot =
Specific feature. </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Using a Java profiler, =
HashCodeComputer.isValueObject() stood out as one of the main =
contributing factors, if not the most likely,&nbsp; to the =
degradation.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">This method is synchronized using the =
static List m_nonValueClasses member. The averege time of this method =
execution is</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">0,2022 microsec for one thread and =
1,2192 microsec for two threads. Basically, 0.2 microsec for one threads =
and 1 microsec for 2 and 4 threads.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">There are hundreds of thousands of =
these calls for a single Rete.run.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Is it possible that =
HashCodeComputer.isValueObject() has such an effect on scalability and =
performance?</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">If so, what can be done about =
it?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am looking forward to hearing any =
feedback.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Son Nguyen</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01CDD94B.7F1FBC76--