<div dir="ltr">forgot to cc seam-dev :-)<br><br><div class="gmail_quote">On Thu, Oct 2, 2008 at 9:51 AM, Jay Balunas <span dir="ltr"><<a href="mailto:tech4j@gmail.com">tech4j@gmail.com</a>></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;">
<div dir="ltr"><br><br><div class="gmail_quote"><div class="Ih2E3d">On Wed, Oct 1, 2008 at 8:12 PM, Dan Allen <span dir="ltr"><<a href="mailto:dan.j.allen@gmail.com" target="_blank">dan.j.allen@gmail.com</a>></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,<br>
<br>
This is great work and very interesting to follow.</blockquote></div><div>thanks <br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
I would like to make a suggestion regarding the tests. Putting the<br>
wiki under test is extremely valuable because it is a complex<br>
application and therefore reflective of our users' applications.<br>
However, it is tricky for others to follow along, because as you<br>
mentioned, it is not trivial to setup. To supplement those tests,<br>
perhaps you can generate a seam-gen application with a test schema<br>
(perhaps stealing from one of the example application) so that we can<br>
compare numbers with yours. What makes a seam-gen application valuable<br>
to test is that it uses the Seam Application Framework, which is a<br>
well known performance bottleneck in Seam because of its excessive use<br>
of getInstance() and joinTransaction().</blockquote></div><div><br>I think you are correct for the reasons you state and others. The wiki example also does not use EJBs which I suspect a large number of seam apps do. I was planning on looking at the dvdstore next and that uses several technologies (EJB, JBPM, etc...). <br>
<br>However I could look at a seam-gen EAR project as well, but I would like to get some other opinions on this. I do not think that I will have enough time to do both.<br><br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
It shouldn't take too long to generate the seam-gen application and<br>
reverse engineer the schema. The tedious part is generating a whole<br>
bunch of fake data, but emacs or vi should make quick work of that.</blockquote></div><div><br>Yeah - the fake data is tricky, but there are some tools that can do this for us.<br> </div><div><div></div><div class="Wj3C7c">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
-Dan<br>
<div><div></div><div><br>
On Wed, Oct 1, 2008 at 6:02 PM, Jay Balunas <<a href="mailto:tech4j@gmail.com" target="_blank">tech4j@gmail.com</a>> wrote:<br>
> The example I was using was the seam wiki example, but that is not a trivial<br>
> thing to set up. I have not tried the same profiling on the other seam<br>
> examples so I am not 100% sure that they will show the same behavior,<br>
> although I would think that they would.<br>
><br>
> As for the profiler report - what are you looking for exactly? Basically<br>
> under load (25 users) I noticed threads blocking on the<br>
> ViewHandlerWrapper.fillChain method. The details are below.<br>
><br>
> Regards,<br>
> Jay<br>
><br>
> On Wed, Oct 1, 2008 at 5:56 PM, Alexandr Smirnov <<a href="mailto:asmirnov@exadel.com" target="_blank">asmirnov@exadel.com</a>><br>
> wrote:<br>
>><br>
>> Jay, can you send me profiler report or a reference application ?<br>
>><br>
>> Jay Balunas wrote:<br>
>> > I was able to update and build with RichFaces 3.3.0-SNAPSHOT and saw<br>
>> > your changes.<br>
>> ><br>
>> > The good news is that I no longer see any blocking threads in the<br>
>> > "org.ajax4jsf.application.<br>
>> > AjaxViewHandler" - none at all which is great.<br>
>> ><br>
>> > The bad news is that the performance has not increased in any<br>
>> > meaningful or repeatable way.<br>
>> ><br>
>> > During my profiling I noticed a definite increase in the blocked<br>
>> > threads performing JNDI lookups. My theory is that the<br>
>> > AjaxViewHandler was acting as a gate and effectively slowing down<br>
>> > concurrent requests into Seam proper. These threads now fly straight<br>
>> > through and into Seam processing. They the end up blocked with the<br>
>> > other threads performing the lookups.<br>
>> ><br>
>> > I will continue to look at the lookup issues, and let you all know<br>
>> > what I find.<br>
>> ><br>
>> > -Jay<br>
>> ><br>
>> ><br>
>> > On Tue, Sep 30, 2008 at 2:05 PM, Jay Balunas <<a href="mailto:jbalunas@redhat.com" target="_blank">jbalunas@redhat.com</a><br>
>> > <mailto:<a href="mailto:jbalunas@redhat.com" target="_blank">jbalunas@redhat.com</a>>> wrote:<br>
>> ><br>
>> > Excellent - I will build from sources and test the changes.<br>
>> ><br>
>> > I'll post the findings up on seam-dev.<br>
>> ><br>
>> > -Jay<br>
>> > ----- "Nick Belaevski" <<a href="mailto:nbelaevski@exadel.com" target="_blank">nbelaevski@exadel.com</a><br>
>> > <mailto:<a href="mailto:nbelaevski@exadel.com" target="_blank">nbelaevski@exadel.com</a>>> wrote:<br>
>> ><br>
>> > > All,<br>
>> > ><br>
>> > > I've created JIRA issue for this optimization:<br>
>> > > <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>
>> > ><br>
>> > > As from now ViewHandlerWrapper#fillChain method is not<br>
>> > synchronized<br>
>> > > anymore.<br>
>> > ><br>
>> > > Best regards,<br>
>> > > Nick Belaevski<br>
>> > ><br>
>> > > > -----Original Message-----<br>
>> > > > From: <a href="mailto:richfaces-exadel-bounces@redhat.com" target="_blank">richfaces-exadel-bounces@redhat.com</a><br>
>> > <mailto:<a href="mailto:richfaces-exadel-bounces@redhat.com" target="_blank">richfaces-exadel-bounces@redhat.com</a>><br>
>> > [mailto:<a href="mailto:richfaces-exadel-" target="_blank">richfaces-exadel-</a> <mailto:<a href="mailto:richfaces-exadel-" target="_blank">richfaces-exadel-</a>><br>
>> > > > <a href="mailto:bounces@redhat.com" target="_blank">bounces@redhat.com</a> <mailto:<a href="mailto:bounces@redhat.com" target="_blank">bounces@redhat.com</a>>] On Behalf Of<br>
>> > Max Rydahl Andersen<br>
>> > > > Sent: Tuesday, September 30, 2008 10:32 AM<br>
>> > > > To: Jay Balunas; <a href="mailto:richfaces-exadel@redhat.com" target="_blank">richfaces-exadel@redhat.com</a><br>
>> > <mailto:<a href="mailto:richfaces-exadel@redhat.com" target="_blank">richfaces-exadel@redhat.com</a>><br>
>> > > > Subject: Re: [Richfaces-exadel] Fwd: [seam-dev] Some profiling<br>
>> > of<br>
>> > > > blockingthreads<br>
>> > > ><br>
>> > > > Sergey/Nik ? Any news on this one ?<br>
>> > > ><br>
>> > > > /max<br>
>> > > ><br>
>> > > > > Hi Guys,<br>
>> > > > ><br>
>> > > > > I have been doing some performance testing on seam<br>
>> > applications<br>
>> > > and have<br>
>> > > > > been able to post some of the results. One of the areas that<br>
>> > I<br>
>> > > have<br>
>> > > > > investigated so far was blocking/waiting threads.<br>
>> > > > ><br>
>> > > > > In my example I am running 25 concurrent users and hitting the<br>
>> > > seam wiki<br>
>> > > > > example. I am seeing blocked threads waiting on<br>
>> > > > > "org.ajax4jsf.application.AjaxViewHandler".<br>
>> > > > > I have investigated it a bit (see below), and have included<br>
>> > some<br>
>> > > of the<br>
>> > > > > discussions on the seam-dev list.<br>
>> > > > ><br>
>> > > > > I would like to get an opinion of the synchronized fillChain<br>
>> > > method, and<br>
>> > > > > see<br>
>> > > > > if there is another way to handle this.<br>
>> > > > ><br>
>> > > > > Thoughts?<br>
>> > > > ><br>
>> > > > > Thanks,<br>
>> > > > > Jay<br>
>> > > > ><br>
>> > > > > ---------- Forwarded message ----------<br>
>> > > > > From: Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a><br>
>> > <mailto:<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a>>><br>
>> > > > > Date: Thu, Sep 25, 2008 at 10:01 AM<br>
>> > > > > Subject: Re: [seam-dev] Some profiling of blocking threads<br>
>> > > > > To: Jay Balunas <<a href="mailto:tech4j@gmail.com" target="_blank">tech4j@gmail.com</a> <mailto:<a href="mailto:tech4j@gmail.com" target="_blank">tech4j@gmail.com</a>>><br>
>> > > > > Cc: Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a> <mailto:<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>>>,<br>
>> > "<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a> <mailto:<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a>>" <<br>
>> > > > > <a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a> <mailto:<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a>>><br>
>> > > > ><br>
>> > > > ><br>
>> > > > ><br>
>> > > > > On Sep 25, 2008, at 09:17, Jay Balunas wrote:<br>
>> > > > ><br>
>> > > > > org.ajax4jsf.application.AjaxViewHandler<br>
>> > > > >> --------------------------------------------<br>
>> > > > >> - This was not a large % of the blocked threads but caught<br>
>> > my<br>
>> > > eye as a<br>
>> > > > >> potential trouble spot because it seemed directly related to<br>
>> > > ajax<br>
>> > > > calls.<br>
>> > > > >> - This was easier to track down and the root cause is in the<br>
>> > > > >> org.ajax4jsf.application.ViewHandlerWrapper class.<br>
>> > > > >> - see<br>
>> > > > >><br>
>> > > ><br>
>> > ><br>
>> ><br>
>> > <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>
>> > > > /org/ajax4jsf/application/ViewHandlerWrapper.java<br>
>> > > > >> - The problem is all the calls to "fillChain" which is a<br>
>> > > synchronized<br>
>> > > > >> method in the class.<br>
>> > > > >> - We need to find out how often the "_initialized" field is<br>
>> > > false - is<br>
>> > > > >> this once a request, once for each component, etc...<br>
>> > > > >> - it appears to be called many times - I will look further<br>
>> > into<br>
>> > > this.<br>
>> > > > >><br>
>> > > > >><br>
>> > > > > I will raise this the richfaces dev guys, and see what can be<br>
>> > > done.<br>
>> > > > ><br>
>> > > > ><br>
>> > > > > Using the double check lock pattern with a volatile should<br>
>> > make<br>
>> > > things<br>
>> > > > > better. It has to be done right though :)<br>
>> > > > ><br>
>> > > > ><br>
>> > > > ><br>
>> > > ><br>
>> > > ><br>
>> > > ><br>
>> > > > --<br>
>> > > > /max<br>
>> > > ><br>
>> > > > _______________________________________________<br>
>> > > > Richfaces-exadel mailing list<br>
>> > > > <a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a> <mailto:<a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a>><br>
>> > > > <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
>> > ><br>
>> > > _______________________________________________<br>
>> > > Richfaces-exadel mailing list<br>
>> > > <a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a> <mailto:<a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a>><br>
>> > > <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > blog: <a href="http://in.relation.to/Bloggers/Jay" target="_blank">http://in.relation.to/Bloggers/Jay</a><br>
>> > ------------------------------------------------------------------------<br>
>> ><br>
>> > _______________________________________________<br>
>> > Richfaces-exadel mailing list<br>
>> > <a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a><br>
>> > <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> blog: <a href="http://in.relation.to/Bloggers/Jay" target="_blank">http://in.relation.to/Bloggers/Jay</a><br>
><br>
> _______________________________________________<br>
> Richfaces-exadel mailing list<br>
> <a href="mailto:Richfaces-exadel@redhat.com" target="_blank">Richfaces-exadel@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel" target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
><br>
<br>
<br>
<br>
--<br>
</div></div>Dan Allen<br>
Software consultant | Author of Seam in Action<br>
<br>
<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<br>
NOTE: While I make a strong effort to keep up with my email on a daily<br>
basis, personal or other work matters can sometimes keep me away<br>
from my email. If you contact me, but don't hear back for more than a week,<br>
it is very likely that I am excessively backlogged or the message was<br>
caught in the spam filters. Please don't hesitate to resend a message if<br>
you feel that it did not reach my attention.<br>
</blockquote></div></div></div><br><br clear="all"><br>-- <br><div class="Ih2E3d">blog: <a href="http://in.relation.to/Bloggers/Jay" target="_blank">http://in.relation.to/Bloggers/Jay</a><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>