Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D0489E69 for ; Fri, 18 May 2012 10:23:31 +0000 (UTC) Received: (qmail 36559 invoked by uid 500); 18 May 2012 10:23:31 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 36411 invoked by uid 500); 18 May 2012 10:23:30 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 36383 invoked by uid 99); 18 May 2012 10:23:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 10:23:29 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.127.203.166] (HELO smtp2.gruposantander.com) (193.127.203.166) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 10:23:24 +0000 X-LocalSize: 0 Received: from scavinet2-be.gruposantander.com (HELO SCAVINET2-BE.GS.CORP) ([193.127.203.135]) by smpt2-out.gruposantander.com with SMTP; 18 May 2012 10:09:30 +0000 Received: from (unknown [172.31.92.125]) by SCAVINET2-BE.GS.CORP with smtp id 5a09_fdc7_722942f2_a0d3_11e1_8fc2_0014221d5b47; Fri, 18 May 2012 12:23:01 +0200 Received: from mbx02.scisb.isban.corp ([169.254.1.182]) by ISWECHAP01.scisb.isban.corp ([::1]) with mapi; Fri, 18 May 2012 12:23:01 +0200 From: PEREZ ALCAIDE JESUS To: MyFaces Development CC: MARTIN POZO RUBEN Date: Fri, 18 May 2012 12:22:59 +0200 Subject: RE: Performance loss with MyFaces 2.1.7 Thread-Topic: Performance loss with MyFaces 2.1.7 Thread-Index: Ac0wRUh3b5cEzeq5RjSkDsf2ZKjqAwEmEVZA Message-ID: <7EFDA21B0072FC449D32FFDCE5367FB688C02ADF14@MBX02.scisb.isban.corp> References: <7EFDA21B0072FC449D32FFDCE5367FB688C0159F09@MBX02.scisb.isban.corp> <1336737870.50560.YahooMailNeo@web171502.mail.ir2.yahoo.com> In-Reply-To: Accept-Language: es-ES Content-Language: es-ES X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: es-ES Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hello, I think this is caused by the solution made for bug MYFACES-3262 [1]. In th= is bug, it was found that there is a concurrency problem because methods ge= tReadMethod() and getWriteMethod() of class java.beans.PropertyDescriptor a= re synchronized. To fix this, _PropertyDescriptorHolder class was created to avoid calls to = the synchronized methods by caching read and write methods. But as it did, = it kept a strong reference to instances of Method, which in turn has a stro= ng reference to the Class and this to its ClassLoader. All of this caused the ClassLoader of an application can not be collected w= hen it stops, as indicated in the bug MYFACES-3510 [2]. To solve this secon= d bug, an additional cache was introduced using as key the ClassLoader. Thi= s cache would be cleaned when the web application is stopped. But this cache, results in the loss of performance that I said. Therefore, I would like to propose an alternative solution to bugs MYFACES-= 3262 and MYFACES-3510, which consists in rollback the changes made in MYFAC= ES-3510 and modify the solution given in MYFACES-3262 by adding a soft refe= rence to the methods held in the class _PropertyDescriptorHolder. I repeated my performance tests with these changes applied and the result i= s that the version 2.1.7 already performs as well as version 2.1.6 (in fact= , it performs a little better). I will create an issue for these changes. [1] https://issues.apache.org/jira/browse/MYFACES-3262 [2] https://issues.apache.org/jira/browse/MYFACES-3510 Un saludo, Jes=FAs P=E9rez Alcaide Lab. Banksphere - Runtime Tlf: 91 470 5223 -----Mensaje original----- De: Leonardo Uribe [mailto:lu4242@gmail.com] Enviado el: s=E1bado, 12 de mayo de 2012 15:43 Para: MyFaces Development CC: MARTIN POZO RUBEN Asunto: Re: Performance loss with MyFaces 2.1.7 Hi Just to keep it clear: MyFaces Core 2.1.7 in a typical situation is a lot faster than 2.1.6, which suppose a server that are working with enough memory to deal with the load. The effect described here is reasonable, and compared with the app classloader mem leak already solved it is ok let the code as is. A hack to prevent it, is overkill. Instead, the application must be tuned to use the right scopes (JSF View Scope or MyFaces CODI window scope or conversation scope), to prevent hold many beans on the session when it is not necessary, and in that way increase the memory available. regards, Leonardo Uribe 2012/5/11 Mark Struberg : > > > Hi! > > Please open a new bug and link it to the original one as follow up. > > > The funny thing is that this effect doesn't show up in all scenarios. I m= easured a pretty good performance improvement from 2.1.6 to 2.1.7 in my app= . > > Are the pages in your app rather small or big? > > > txs and LieGrue, > strub > > >>________________________________ >> From: PEREZ ALCAIDE JESUS >>To: MyFaces Development >>Cc: MARTIN POZO RUBEN >>Sent: Friday, May 11, 2012 1:18 PM >>Subject: Performance loss with MyFaces 2.1.7 >> >> >> >>Hello, >> >>I've done a performance test comparing between versions of MyFaces 2.1.6 = and 2.1.7. The result has been that version 2.1.7 has a worse performance, = about 25% worse in requests per second and about 50% worse in response time= . These data are obtained by doing load tests on a server until it reaches = saturation (the CPU reaches a 90-100% usage). >> >>Comparing with JProfiler two executions of these load tests, one with ver= sion 2.1.6 and one with version 2.1.7, we see clearly that the problem seem= s to be that the number of invocations of the method Thread.getContextClass= Loader () has increased significantly (+300k invocations more) and has ther= efore increased the time in this method (+50 s). >> >>This change comes from the solution to the bug MyFaces-3510 [1] where a c= hange was made on _ComponentAttributesMap class. >> >>Leonardo, what do you think about this? >> >>Should I reopen the bug MyFaces-3510 or create a new bug? >> >>[1] https://issues.apache.org/jira/browse/MYFACES-3510 >> >> >>Un saludo, >> >>Jes=FAs P=E9rez Alcaide >>Lab. Banksphere - Runtime >>Tlf: 91 470 5223 >> >> >>*********************AVISO LEGAL ********************** >>Este mensaje es privado y confidencial y solamente para la persona a la q= ue va dirigido. Si usted ha recibido este mensaje por error, no debe revela= r, copiar, distribuir o usarlo en ning=FAn sentido. Le rogamos lo comunique= al remitente y borre dicho mensaje > y cualquier documento adjunto que pudiera contener. No hay renuncia a la = confidencialidad ni a ning=FAn privilegio por causa de transmisi=F3n err=F3= nea o mal funcionamiento. >>Cualquier opini=F3n expresada en este mensaje pertenece =FAnicamente al a= utor remitente, y no representa necesariamente la opini=F3n de ISBAN, a no = ser que expresamente se diga y el remitente est=E9 autorizado para hacerlo. >>Los correos electr=F3nicos no son seguros, no garantizan la confidenciali= dad ni la correcta recepci=F3n de los mismos, dado que pueden ser intercept= ados, manipulados, destruidos, llegar con demora o incompletos, o con virus= . ISBAN no se hace responsable de los > cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaj= e una vez enviado. >>Este mensaje s=F3lo tiene una finalidad de informaci=F3n, y no debe inter= pretarse como una oferta de venta o de compra de valores ni de instrumentos= financieros relacionados. >> >>**********************DISCLAIMER***************** >>This message is private and confidential and it is intended exclusively f= or the addressee. If you receive this message by mistake, you should not di= sseminate, distribute or copy this e-mail. Please inform the sender and del= ete the message and attachments from > your system. No confidentiality nor any privilege regarding the informati= on is waived or lost by any mistransmission or malfunction. >>Any views or opinions contained in this message are solely those of the a= uthor, and do not necessarily represent those of ISBAN, unless otherwise sp= ecifically stated and the sender is authorized to do so. >>E-mail transmission cannot be guaranteed to be secure, confidential, or e= rror-free, as information could be intercepted, corrupted, lost, destroyed,= arrive late or incomplete, or contain viruses. ISBAN does not accept respo= nsibility for any changes, errors > or omissions in the contents of this message after it has been sent. >>This message is provided for informational purposes and should not be con= strued as a solicitation or offer to buy or sell any securities or related = financial instruments. >> >> >> *********************AVISO LEGAL ********************** Este mensaje es privado y confidencial y solamente para la persona a la que= va dirigido. Si usted ha recibido este mensaje por error, no debe revelar,= copiar, distribuir o usarlo en ning=FAn sentido. Le rogamos lo comunique a= l remitente y borre dicho mensaje y cualquier documento adjunto que pudiera= contener. No hay renuncia a la confidencialidad ni a ning=FAn privilegio p= or causa de transmisi=F3n err=F3nea o mal funcionamiento. Cualquier opini=F3n expresada en este mensaje pertenece =FAnicamente al aut= or remitente, y no representa necesariamente la opini=F3n de ISBAN, a no se= r que expresamente se diga y el remitente est=E9 autorizado para hacerlo. Los correos electr=F3nicos no son seguros, no garantizan la confidencialida= d ni la correcta recepci=F3n de los mismos, dado que pueden ser interceptad= os, manipulados, destruidos, llegar con demora o incompletos, o con virus. = ISBAN no se hace responsable de los cambios, alteraciones, errores u omisio= nes que pudieran hacerse al mensaje una vez enviado. Este mensaje s=F3lo tiene una finalidad de informaci=F3n, y no debe interpr= etarse como una oferta de venta o de compra de valores ni de instrumentos f= inancieros relacionados. **********************DISCLAIMER***************** This message is private and confidential and it is intended exclusively for= the addressee. If you receive this message by mistake, you should not diss= eminate, distribute or copy this e-mail. Please inform the sender and delet= e the message and attachments from your system. No confidentiality nor any = privilege regarding the information is waived or lost by any mistransmissio= n or malfunction. Any views or opinions contained in this message are solely those of the aut= hor, and do not necessarily represent those of ISBAN, unless otherwise spec= ifically stated and the sender is authorized to do so. E-mail transmission cannot be guaranteed to be secure, confidential, or err= or-free, as information could be intercepted, corrupted, lost, destroyed, a= rrive late or incomplete, or contain viruses. ISBAN does not accept respons= ibility for any changes, errors or omissions in the contents of this messag= e after it has been sent. This message is provided for informational purposes and should not be const= rued as a solicitation or offer to buy or sell any securities or related fi= nancial instruments.