Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 13530 invoked from network); 10 Jan 2010 17:31:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Jan 2010 17:31:52 -0000 Received: (qmail 78071 invoked by uid 500); 10 Jan 2010 17:31:51 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 77972 invoked by uid 500); 10 Jan 2010 17:31:51 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 77962 invoked by uid 99); 10 Jan 2010 17:31:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jan 2010 17:31:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ravikapoor101@gmail.com designates 209.85.221.200 as permitted sender) Received: from [209.85.221.200] (HELO mail-qy0-f200.google.com) (209.85.221.200) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jan 2010 17:31:41 +0000 Received: by qyk38 with SMTP id 38so1392876qyk.25 for ; Sun, 10 Jan 2010 09:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=jhvV/5++QNUKO/G7xgSsGO/zXR2ubARgkipovQrWpF4=; b=PFG6k90zyzwDLNrZYmESiRcVxqQ5fJy2S4pb2wGthRJmG3g1q0qAAWUUy0EaPQYgq8 7+30++DoTNCp/7w/jeGf7lHJh3JmI1KXXlAG1xGHwtZM4TGOaho4mXaOWfsXcxOldFLZ JnYweoIyYyI1vEHc4JijWCHbeTeDbP7aVTUt8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=cbBlFFi6xqTJe/Eh63aN9Vuj42/9w3gCHU4w0r+/Kpt0L58ISJsFsNIrTQ8FwvDGpS 3U6YjrUHAKNg7kbpkByzKjb01Nj6ptOx/tu0yU8LtYbBGVazgRHRbf0E/ydnbBVtOpoL FdIkWFUrygGM2LxEiFsRRY6ccYmYiYXHhv3os= Received: by 10.224.118.129 with SMTP id v1mr16043836qaq.274.1263144680097; Sun, 10 Jan 2010 09:31:20 -0800 (PST) Received: from ?192.168.2.2? (c-71-56-182-238.hsd1.va.comcast.net [71.56.182.238]) by mx.google.com with ESMTPS id 21sm4062293qyk.0.2010.01.10.09.31.18 (version=SSLv3 cipher=RC4-MD5); Sun, 10 Jan 2010 09:31:18 -0800 (PST) Message-ID: <4B4A0EA2.9010904@gmail.com> Date: Sun, 10 Jan 2010 12:30:10 -0500 From: Ravi User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: [Trinidad] Trinidad consuming 80-90% CPU References: <38f8e9891001071425u1cea73daufa30abba02a8c313@mail.gmail.com> <71235db41001072209p68100056uc79745b287a7496f@mail.gmail.com> <38f8e9891001080639n6f7c3024h3ec4290af3c3ca7a@mail.gmail.com> <237ac0b1001081047v2ef61ad0yb9cbb66883121535@mail.gmail.com> <38f8e9891001081153p4a16ba3cj5965fed1b9c43ae2@mail.gmail.com> <237ac0b1001081233o5ace8f20kd0c77c956a1a511e@mail.gmail.com> <4B48216D.1030507@gmail.com> <-7377398441753107140@unknownmsgid> <4B494FF5.4000706@gmail.com> <71235db41001100221n69d82b4kb44014a1baf3fb77@mail.gmail.com> In-Reply-To: <71235db41001100221n69d82b4kb44014a1baf3fb77@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Matthias, I think websphere 6.1 does not support JSF 1.2. I will doublecheck, let me know if this is incorrect. This mans I cannot try trinidad version 1.2.12 I will try out 1.0.11 release, but that is a minor release update and I seriously doubt if it will fix such a performance issue. What other options do we have? Is there a way we can get somebody familiar with trinidad architecture/code to look at this issue? This can even be a paid assignment. Regards Ravi Matthias Wessendorf wrote: > Hello Ravi, > > I wonder what our last release for JSF 1.1 (1.0.11) does? > > Not sure, perhaps you may also try the JSF 1.2 version ? (1.2.12) > The JSF 1.2 version is the one that is best supported, these days. > > Trinidad 2.0 is now in alpha stage, and I can understand that you > don't want to update on that version, now > > -Matthias > > On Sun, Jan 10, 2010 at 4:56 AM, Ravi wrote: >> Scott, we do not have CPUs available. The time trinidad is consuming is >> supposed to be doing some other work. Hence this is costing us real dollars >> and hence our time and effort to resolve this. >> >> This is not initial hit of page. I always ignore the first hit on all pages, >> I am only measuring CPU from 2nd hit onwards. >> >> Ravi >> >> >> Scott O'Bryan wrote: >>> I don't know. I'm of the camp that if the CPU time is available, use >>> it. That said, is this load consistant or are you just testing an >>> initial hit of each page. >>> >>> Sent from my iPhone >>> >>> On Jan 8, 2010, at 11:25 PM, Ravi wrote: >>> >>>> Hi Jan-Kees, >>>> >>>> Now that I am reading your message again, I do want to answer your >>>> questions in detail. First I agree reflection is cheap, that is why >>>> reflection is not my concern. Time being spent in reflection is >>>> almost negligible compared to time being spent in trinidad classes. >>>> >>>> Secondly IO and locking etc contribute to clock time but not to CPU >>>> time. e.g. for IO, the thread may be in a wait state waiting for >>>> data to arrive. In this case, the clock keeps ticking but such a >>>> wait does not need CPU. My numbers are specifically CPU time. Which >>>> means trinidad is not waiting but executing CPU instructions. >>>> >>>> This is why the user load is also irrelevant (high load leads to >>>> adding clock time but not to CPU time). But since you asked, to get >>>> these numbers, I am not doing a load testing. I am simply loading 4 >>>> screens 4 times in order (total 16 screens). >>>> >>>> Regards >>>> Ravi >>>> >>>> >>>> >>>> Jan-Kees van Andel wrote: >>>>> I'm not sure, but I doubt the mailing list supports attachments. >>>>> Maybe you could provide a link to some image hosting site? >>>>> My first thought, reflection is darn cheap, especially since Java 5 >>>>> and even more since Java 6. I'm no IBM JVM specialist, but I don't >>>>> think there are major differences with HotSpot... Compared with SQL >>>>> queries, backend transactions, web service calls, etc. reflective >>>>> method invocations really don't make a difference. >>>>> Having said that, what kind of application are you testing? Does this >>>>> application have any I/O, locking or other expensive things that may >>>>> be the cause of the CPU-time imbalance? >>>>> Also, what kind of load are you simulating on your application? Long >>>>> sessions with not much users? Lots of short sessions? Hyperactive >>>>> users without any pauses? >>>>> /JK >>>>> Ps. How did you configure your profiler? Sampling or >>>>> tracing/instrumentation? Although I don't think it makes a difference >>>>> in this case, sampling is less accurate... >>>>> 2010/1/8 Ravi Kapoor : >>>>>> The actual call to getter method is only using 2% CPU. Rest 38% is >>>>>> being >>>>>> used within trinidad classes. >>>>>> I am attaching two screenshots to give you more details. >>>>>> >>>>>> In first screenshot, you can see at the top left corner, total CPU >>>>>> units >>>>>> taken by getProperty are 32391 >>>>>> getProperty calls javax.faces.el.ValueBinding.getValue which calls >>>>>> org.apache.myfaces.el.PropertyResolverImpl.getValue which calls >>>>>> org.apache.myfaces.el.PropertyResolverImpl.getProperty which calls >>>>>> java.lang.reflect.Method.invoke. >>>>>> >>>>>> In second screenshot you can see that Method.invoke is using only >>>>>> 1781 units >>>>>> of CPU. Rest of the time is being spent within trinidad classes. >>>>>> >>>>>> Does this help? Also the rest of trinidad using 45% CPU usage is >>>>>> also highly >>>>>> concerning. >>>>>> >>>>>> Thanks >>>>>> Ravi >>>>>> >>>>>> >>>>>> On Fri, Jan 8, 2010 at 1:47 PM, Jan-Kees van Andel >>>>>> wrote: >>>>>>> Hey, >>>>>>> >>>>>>> Is it possible that the getProperty indirectly invokes some >>>>>>> expensive >>>>>>> computation? For example, do you have lots of logic inside your >>>>>>> getters? >>>>>>> >>>>>>> Regards, >>>>>>> Jan-Kees >>>>>>> >>>>>>> >>>>>>> 2010/1/8 Ravi Kapoor : >>>>>>>> Hi Matthias, >>>>>>>> >>>>>>>> Here are the details: >>>>>>>> >>>>>>>> Server: Websphere 6.1 >>>>>>>> >>>>>>>> Trinidad version: 1.0.7 (We cant upgrade to 2.0 until we upgrade >>>>>>>> websphere >>>>>>>> which will happen in due course. Even then if this issue has not >>>>>>>> been >>>>>>>> addressed, the problem may exist in 2.0 as well.) >>>>>>>> >>>>>>>> OS: Windows (Even though I am measuring numbers on windows but I >>>>>>>> do not >>>>>>>> think this is OS specific) >>>>>>>> >>>>>>>> >>>>>>>> Let me know if you need to know anything else. >>>>>>>> >>>>>>>> Regards >>>>>>>> Ravi >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Jan 8, 2010 at 1:09 AM, Matthias Wessendorf >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hello Ravi, >>>>>>>>> >>>>>>>>> some more background would be good, e.g. what version of >>>>>>>>> Trinidad etc. >>>>>>>>> >>>>>>>>> -Matthias >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2010 at 11:25 PM, Ravi Kapoor >>>>>>>>> >>>>>>>> wrote: >>>>>>>>>> Has anybody done performance tests on trinidad application. I >>>>>>>>>> have an >>>>>>>>>> application and it appears that it is taking 80-90% of CPU in my >>>>>>>>>> application, thus killing performance. >>>>>>>>>> >>>>>>>>>> We ran load tests and our CPU went to 100% usage. At this >>>>>>>>>> point we >>>>>>>>> measured >>>>>>>>>> how much time was being taken by each class/method. Here are >>>>>>>>>> some >>>>>>>>>> interesting figures: >>>>>>>>>> >>>>>>>>>> CPU usage by all Trinidad + myfaces classes = 80-90% >>>>>>>>>> Myfaces CPU usage (without trinidad) = 8% (which implies >>>>>>>>>> trinidad is >>>>>>>>> taking >>>>>>>>>> 70-80% of CPU) >>>>>>>>>> Total time taken by one method >>>>>>>>>> (org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty) = >>>>>>>>>> 40% >>>>>>>>>> >>>>>>>>>> Can anybody confirm that they have seen this behavior? >>>>>>>>>> Or if somebody can confirm that this does not happen in their >>>>>>>>>> performance >>>>>>>>>> tests, that should help too. >>>>>>>>>> >>>>>>>>>> Thanks >>>>>>>>>> Ravi >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> Matthias Wessendorf >>>>>>>>> >>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/ >>>>>>>>> sessions: http://www.slideshare.net/mwessendorf >>>>>>>>> twitter: http://twitter.com/mwessendorf >>>>>>>>> >> > > >