<div dir="ltr">The example I was using was the seam wiki example, but that is not a trivial thing to set up.&nbsp; I have not tried the same profiling on the other seam examples so I am not 100% sure that they will show the same behavior, although I would think that they would.<br>
<br>As for the profiler report - what are you looking for exactly?&nbsp; Basically under load (25 users) I noticed threads blocking on the ViewHandlerWrapper.fillChain method.&nbsp; The details are below.<br><br>Regards,<br>Jay<br>
<br><div class="gmail_quote">On Wed, Oct 1, 2008 at 5:56 PM, Alexandr Smirnov <span dir="ltr">&lt;<a href="mailto:asmirnov@exadel.com">asmirnov@exadel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jay, can you send me profiler report or a reference application ?<br>
<div class="Ih2E3d"><br>
Jay Balunas wrote:<br>
&gt; I was able to update and build with RichFaces 3.3.0-SNAPSHOT and saw<br>
&gt; your changes.<br>
&gt;<br>
&gt; The good news is that I no longer see any blocking threads in the<br>
&gt; &quot;org.ajax4jsf.application.<br>
&gt; AjaxViewHandler&quot; - none at all which is great.<br>
&gt;<br>
&gt; The bad news is that the performance has not increased in any<br>
&gt; meaningful or repeatable way.<br>
&gt;<br>
&gt; During my profiling I noticed a definite increase in the blocked<br>
&gt; threads performing JNDI lookups. &nbsp;My theory is that the<br>
&gt; AjaxViewHandler was acting as a gate and effectively slowing down<br>
&gt; concurrent requests into Seam proper. &nbsp;These threads now fly straight<br>
&gt; through and into Seam processing. &nbsp;They the end up blocked with the<br>
&gt; other threads performing the lookups.<br>
&gt;<br>
&gt; I will continue to look at the lookup issues, and let you all know<br>
&gt; what I find.<br>
&gt;<br>
&gt; -Jay<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Sep 30, 2008 at 2:05 PM, Jay Balunas &lt;<a href="mailto:jbalunas@redhat.com">jbalunas@redhat.com</a><br>
</div><div class="Ih2E3d">&gt; &lt;mailto:<a href="mailto:jbalunas@redhat.com">jbalunas@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; Excellent &nbsp;- I will build from sources and test the changes.<br>
&gt;<br>
&gt; &nbsp; &nbsp; I&#39;ll post the findings up on seam-dev.<br>
&gt;<br>
&gt; &nbsp; &nbsp; -Jay<br>
&gt; &nbsp; &nbsp; ----- &quot;Nick Belaevski&quot; &lt;<a href="mailto:nbelaevski@exadel.com">nbelaevski@exadel.com</a><br>
</div><div class="Ih2E3d">&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:nbelaevski@exadel.com">nbelaevski@exadel.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &gt; All,<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; I&#39;ve created JIRA issue for this optimization:<br>
&gt; &nbsp; &nbsp; &gt; <a href="https://jira.jboss.org/jira/browse/RF-4554" target="_blank">https://jira.jboss.org/jira/browse/RF-4554</a> and have just fixed it.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; As from now ViewHandlerWrapper#fillChain method is not synchronized<br>
&gt; &nbsp; &nbsp; &gt; anymore.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; Best regards,<br>
&gt; &nbsp; &nbsp; &gt; &nbsp; Nick Belaevski<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; -----Original Message-----<br>
&gt; &nbsp; &nbsp; &gt; &gt; From: <a href="mailto:richfaces-exadel-bounces@redhat.com">richfaces-exadel-bounces@redhat.com</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:richfaces-exadel-bounces@redhat.com">richfaces-exadel-bounces@redhat.com</a>&gt;<br>
</div><div class="Ih2E3d">&gt; &nbsp; &nbsp; [mailto:<a href="mailto:richfaces-exadel-">richfaces-exadel-</a> &lt;mailto:<a href="mailto:richfaces-exadel-">richfaces-exadel-</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; <a href="mailto:bounces@redhat.com">bounces@redhat.com</a> &lt;mailto:<a href="mailto:bounces@redhat.com">bounces@redhat.com</a>&gt;] On Behalf Of<br>
&gt; &nbsp; &nbsp; Max Rydahl Andersen<br>
&gt; &nbsp; &nbsp; &gt; &gt; Sent: Tuesday, September 30, 2008 10:32 AM<br>
&gt; &nbsp; &nbsp; &gt; &gt; To: Jay Balunas; <a href="mailto:richfaces-exadel@redhat.com">richfaces-exadel@redhat.com</a><br>
</div><div><div></div><div class="Wj3C7c">&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:richfaces-exadel@redhat.com">richfaces-exadel@redhat.com</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; Subject: Re: [Richfaces-exadel] Fwd: [seam-dev] Some profiling of<br>
&gt; &nbsp; &nbsp; &gt; &gt; blockingthreads<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; Sergey/Nik ? Any news on this one ?<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; /max<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Hi Guys,<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; I have been doing some performance testing on seam applications<br>
&gt; &nbsp; &nbsp; &gt; and have<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; been able to post some of the results. &nbsp;One of the areas that I<br>
&gt; &nbsp; &nbsp; &gt; have<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; investigated so far was blocking/waiting threads.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; In my example I am running 25 concurrent users and hitting the<br>
&gt; &nbsp; &nbsp; &gt; seam wiki<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; example. &nbsp;I am seeing blocked threads waiting on<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; &quot;org.ajax4jsf.application.AjaxViewHandler&quot;.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; I have investigated it a bit (see below), and have included some<br>
&gt; &nbsp; &nbsp; &gt; of the<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; discussions on the seam-dev list.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; I would like to get an opinion of the synchronized fillChain<br>
&gt; &nbsp; &nbsp; &gt; method, and<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; see<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; if there is another way to handle this.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Thoughts?<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Thanks,<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Jay<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; ---------- Forwarded message ----------<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; From: Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a><br>
</div></div><div class="Ih2E3d">&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Date: Thu, Sep 25, 2008 at 10:01 AM<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Subject: Re: [seam-dev] Some profiling of blocking threads<br>
</div><div><div></div><div class="Wj3C7c">&gt; &nbsp; &nbsp; &gt; &gt; &gt; To: Jay Balunas &lt;<a href="mailto:tech4j@gmail.com">tech4j@gmail.com</a> &lt;mailto:<a href="mailto:tech4j@gmail.com">tech4j@gmail.com</a>&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Cc: Pete Muir &lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a> &lt;mailto:<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;&gt;,<br>
&gt; &nbsp; &nbsp; &quot;<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;&quot; &lt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; On &nbsp;Sep 25, 2008, at 09:17, Jay Balunas wrote:<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; org.ajax4jsf.application.AjaxViewHandler<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; --------------------------------------------<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- This was not a large % of the blocked threads but caught my<br>
&gt; &nbsp; &nbsp; &gt; eye as a<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; potential trouble spot because it seemed directly related to<br>
&gt; &nbsp; &nbsp; &gt; ajax<br>
&gt; &nbsp; &nbsp; &gt; &gt; calls.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- This was easier to track down and the root cause is in the<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; org.ajax4jsf.application.ViewHandlerWrapper class.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- see<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; <a href="http://anonsvn.jboss.org/repos/richfaces/trunk/framework/api/src/main/java" target="_blank">http://anonsvn.jboss.org/repos/richfaces/trunk/framework/api/src/main/java</a><br>
&gt; &nbsp; &nbsp; &gt; &gt; /org/ajax4jsf/application/ViewHandlerWrapper.java<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- The problem is all the calls to &quot;fillChain&quot; which is a<br>
&gt; &nbsp; &nbsp; &gt; synchronized<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; method in the class.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- We need to find out how often the &quot;_initialized&quot; field is<br>
&gt; &nbsp; &nbsp; &gt; false - is<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; this once a request, once for each component, etc...<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt; &nbsp;- it appears to be called many times - I will look further<br>
&gt; &nbsp; &nbsp; into<br>
&gt; &nbsp; &nbsp; &gt; this.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; I will raise this the richfaces dev guys, and see what can be<br>
&gt; &nbsp; &nbsp; &gt; done.<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; Using the double check lock pattern with a volatile should make<br>
&gt; &nbsp; &nbsp; &gt; things<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt; better. It has to be done right though :)<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; --<br>
&gt; &nbsp; &nbsp; &gt; &gt; /max<br>
&gt; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &gt; &gt; _______________________________________________<br>
&gt; &nbsp; &nbsp; &gt; &gt; Richfaces-exadel mailing list<br>
</div></div>&gt; &nbsp; &nbsp; &gt; &gt; <a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a> &lt;mailto:<a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a>&gt;<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp; &gt; &gt; <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; _______________________________________________<br>
&gt; &nbsp; &nbsp; &gt; Richfaces-exadel mailing list<br>
</div>&gt; &nbsp; &nbsp; &gt; <a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a> &lt;mailto:<a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a>&gt;<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp; &gt; <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; blog: <a href="http://in.relation.to/Bloggers/Jay" target="_blank">http://in.relation.to/Bloggers/Jay</a><br>
</div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="Wj3C7c">&gt;<br>
&gt; _______________________________________________<br>
&gt; Richfaces-exadel mailing list<br>
&gt; <a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a><br>
&gt; <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>blog: <a href="http://in.relation.to/Bloggers/Jay">http://in.relation.to/Bloggers/Jay</a><br>
</div>