<div>Performance Review of current Seam trunk fo 2.1.1</div><div>--------------------------------------------------------</div><div><br></div><div>Working with the latest trunk from today (r9557) and testing the performance&nbsp;changes that were made. &nbsp;Previous tests were done with (r9017). &nbsp;Just as a refresher my baseline test uses the wiki example with all of the&nbsp;<a href="http://sfwk.org" target="_blank">sfwk.org</a> data up to July 31st 2008. &nbsp;</div>

<div><br></div><div>For these tests I&nbsp;use JBoss AS 4.2.3 with JDK5 on my linux machine. &nbsp;Jmeter is used to load test&nbsp;and calculate the results and graphs. &nbsp;I then use JProfiler to to identify&nbsp;either blocking threads, call graphs, and CPU usage. &nbsp;</div>

<div><br></div><div>Unfortunately&nbsp;the results were not good. &nbsp;I was using a mixture of 25 and 50&nbsp;users - hitting the server 25 times each. &nbsp;As before they were accessing the&nbsp;first page of the user forum.</div><div><br></div>

<div>With r9017 the 25 user x 25 requests averaged 3 seconds a request. &nbsp;With&nbsp;trunk they were 100+ seconds. &nbsp;Thinking something was&nbsp;wrong with the system I replaced the 9557 wiki.war with the 9017 and reran with&nbsp;all other variables the same. &nbsp;Again the 9017 saw about 3 seconds for the&nbsp;average over the 625 requests.</div>

<div><br></div><div>I then profiled the server under load as I did before. &nbsp;The methods below appear to&nbsp;be the primary offenders although as with most blocking threads there are some&nbsp;others waiting on the same monitor. &nbsp;I&#39;ll follow up this email with the stack traces, and more information from my investigation.</div>

<div><br></div><div>-----------------------------------<br></div><div>1) com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate.findLock(..)</div><div>&nbsp;&nbsp;- This appears to be the biggest issue. &nbsp;Every requests are generating many of these calls.</div>
<div><div>&nbsp;&nbsp;-&nbsp;<a href="http://viewvc.jboss.org/cgi-bin/viewvc.cgi/labs/labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerDelegate.java?view=markup" target="_blank">http://viewvc.jboss.org/cgi-bin/viewvc.cgi/labs/labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerDelegate.java?view=markup</a></div>
<div>&nbsp;&nbsp;</div></div><div>&nbsp;&nbsp;- It looks like every interaction with any transaction causing synchronization issues with this call.</div><div>&nbsp;&nbsp;- We&#39;ll need to find a way to limit these calls.</div>
<div>&nbsp;&nbsp;- I&#39;m guessing some of the changes made for JBSEAM-3519 may be the cause although I have not had time to look deeper.</div><div>&nbsp;&nbsp;- See : <a href="http://fisheye.jboss.org/browse/Seam/trunk/src/main/org/jboss/seam/transaction/TransactionInterceptor.java?r1=8626&amp;r2=9552&amp;u=-1&amp;ignore=&amp;k=" target="_blank">http://fisheye.jboss.org/browse/Seam/trunk/src/main/org/jboss/seam/transaction/TransactionInterceptor.java?r1=8626&amp;r2=9552&amp;u=-1&amp;ignore=&amp;k=</a></div>

<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://fisheye.jboss.org/browse/Seam/trunk/src/main/org/jboss/seam/util/Work.java?r1=9221&amp;r2=9550&amp;u=-1&amp;ignore=&amp;k=" target="_blank">http://fisheye.jboss.org/browse/Seam/trunk/src/main/org/jboss/seam/util/Work.java?r1=9221&amp;r2=9550&amp;u=-1&amp;ignore=&amp;k=</a></div>

<div>-----------------------------------<br></div><div>2) org.jboss.naming.ENCFactory.getObjectInstance()</div><div>&nbsp;&nbsp; &nbsp;javax.naming.Context.lookup(java.lang.String)</div><div><br></div><div>&nbsp;This appears to be the second biggest offender and it looks like we are no longer blocking on retrieving the InitialContext, but now blocking on performing the lookups using the context.</div>

<div>-----------------------------------</div><div>3) org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection()</div><div>&nbsp;&nbsp; org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection()</div>

<div><br></div><div><div>This is the third biggest issue, but much less than the others. &nbsp;1 or 2 dozen blocks on 60 requests. &nbsp;These are all related to hibernate calls and database access from what I&#39;ve seen so far.</div>
<div>-----------------------------------</div>
</div><div>I&#39;ll follow up this email tomorrow with the typical stack traces seen for each of these.</div><div><br></div><div>Shane could you review, and I&#39;ll get more information on these tomorrow.&nbsp;</div><div><br>
</div><div>Thanks,</div><div>
-Jay</div><div><br></div>-- <br>blog: <a href="http://in.relation.to/Bloggers/Jay" target="_blank">http://in.relation.to/Bloggers/Jay</a><br>