0

We use an application (using JSF2 (Mojara))that has some large pages using ui:repeat tag and which has been deployed on JBoss EAP 6.0 version. Of late, we have been facing very high CPU utilisation during our performance tests and the thread dumps indicate that UIRepeat could probably be the cause of it.Have placed the trace from one of the thread dumps below which was a suspect and was taking 90+% of the CPU:

Any help in this regard would be great.

"ajp-/10.138.51.32:8209-9" daemon prio=10 tid=0x00007fa3cc2a3800 nid=0x52a6 runnable [0x00007fa3fa0d9000]
   java.lang.Thread.State: RUNNABLE
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
    at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:147)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
    at com.sun.faces.facelets.el.ELText$ELTextVariable.toString(ELText.java:217)
    at com.sun.faces.facelets.el.ELText$ELTextComposite.toString(ELText.java:157)
    at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:89)
    at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
    at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
    at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:104)
    at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:523)
    at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:984)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:104)
    at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:523)
    at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:984)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:104)
    at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:523)
    at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:984)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:518)
    at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
    at javax.faces.component.UIForm.visitTree(UIForm.java:381)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376)
    at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:297)
    at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:391)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
    at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:169)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505)
    at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:452)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
    at java.lang.Thread.run(Thread.java:662)
   Locked ownable synchronizers:
    - None
user2228591
  • 115
  • 1
  • 1
  • 10
  • 1
    Which Mojarra version? Tried the latest? There were some major performance fixes in 2.1.24 and it's currently already 2.1.26. – BalusC Sep 18 '13 at 13:15
  • Hi mate, thanks for the quick reply. In my local Windows environment, we use Mojarra faces with version jsf-impl-2.0.3-b5.jar. However, we ran our performance tests on RedHat Linux environment with JBoss EAP 6.0 and found that the JSF version used is jsf-api-1.2_15-b01-redhat-1.jar. Can we upgrade the version of jsf in EAP 6.0 in Linux and if so, is the process just downloading the latest jar and placing it ? – user2228591 Sep 18 '13 at 13:49
  • Hi BalusC, we had updated the JSF version to 2.1.26 as suggested by you on EAP6.0 (on RH Linux). We ran a 100 user test and the performance is comparitively better to the previous runs using the older version of the jsf jars. Thank you for the suggestion. We followed one of your documents for performing the upgrade as well - http://stackoverflow.com/questions/17085717/upgrade-and-use-mojarra-as-the-jsf-implementation-with-jboss-server. Overall, the CPU utilisation is still around the 85% mark during the test and drops down to 5% after the test. Not sure if this is expected – user2228591 Sep 19 '13 at 07:24
  • Did you set facelets refresh period to -1? http://stackoverflow.com/questions/17894035/why-not-jsf-pages-are-precompiled-atleast-partially-but-instead-parsed-evalua/17894164#17894164 – BalusC Sep 19 '13 at 12:33
  • No..haven't set this property yet. Will definitely try this. – user2228591 Sep 19 '13 at 13:39

0 Answers0