You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Maxim Borkunov <Ma...@bridge-quest.com> on 2009/11/20 10:21:24 UTC
Flow script performance issue
Hi,
I am using lenya 2.0.2 (cocoon-2.1.12-dev) and I made some performance tests with jmeter utility. 50 users in the same time walking through a lenya site - that's my jmeter setup.
Unfortunatly, I found a bottleneck. The users (jmeter threads) freeze for a long time at pages that uses flow scripts. Almost all web server socket listener threads at this time shows the point listed below:
Thread [SocketListener0-24] (Suspended)
FOM_JavaScriptInterpreter.setupContext(Redirector, Context, FOM_JavaScriptInterpreter$ThreadScope) line: 571
FOM_JavaScriptInterpreter.callFunction(String, List, Redirector) line: 718
CallFunctionNode.invoke(Environment, InvokeContext) line: 139
MatchNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext, String, Map) line: 47
MatchNode.invoke(Environment, InvokeContext) line: 108
PipelineNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext) line: 69
PipelineNode.invoke(Environment, InvokeContext) line: 143
PipelinesNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext) line: 69
PipelinesNode.invoke(Environment, InvokeContext) line: 93
ConcreteTreeProcessor.process(Environment, InvokeContext) line: 235
ConcreteTreeProcessor.process(Environment) line: 177
TreeProcessor.process(Environment) line: 254
MountNode.invoke(Environment, InvokeContext) line: 118
MatchNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext, String, Map) line: 47
MatchNode.invoke(Environment, InvokeContext) line: 108
PipelineNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext) line: 69
PipelineNode.invoke(Environment, InvokeContext) line: 143
PipelinesNode(AbstractParentProcessingNode).invokeNodes(ProcessingNode[], Environment, InvokeContext) line: 69
PipelinesNode.invoke(Environment, InvokeContext) line: 93
ConcreteTreeProcessor.process(Environment, InvokeContext) line: 235
ConcreteTreeProcessor.process(Environment) line: 177
TreeProcessor.process(Environment) line: 254
Cocoon.process(Environment) line: 699
CocoonServlet.service(HttpServletRequest, HttpServletResponse) line: 1154
CocoonServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 689
ServletHolder.handle(ServletRequest, ServletResponse) line: 427
WebApplicationHandler.dispatch(String, HttpServletRequest, HttpServletResponse, ServletHolder, int) line: 475
WebApplicationHandler(ServletHandler).handle(String, String, HttpRequest, HttpResponse) line: 567
PlusWebAppContext(HttpContext).handle(String, String, HttpRequest, HttpResponse) line: 1565
PlusWebAppContext(WebApplicationContext).handle(String, String, HttpRequest, HttpResponse) line: 635
PlusWebAppContext(HttpContext).handle(HttpRequest, HttpResponse) line: 1517
PlusWebAppContext.handle(HttpRequest, HttpResponse) line: 158
Server(HttpServer).service(HttpRequest, HttpResponse) line: 954
HttpConnection.service(HttpRequest, HttpResponse) line: 814
HttpConnection.handleNext() line: 981
HttpConnection.handle() line: 831
SocketListener.handleConnection(Socket) line: 244
SocketListener(ThreadedServer).handle(Object) line: 357
ThreadPool$PoolThread.run() line: 534
Is that synchronization in the org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter class important?
Could you please advise how can I solve this performance problem?
P.S. I sent the same message to cocoon dev mailing list but there is no response yet.
RE: Flow script performance issue
Posted by Maxim Borkunov <Ma...@bridge-quest.com>.
Richard,
That patch solves the performance issue, now it works fine without any locking problems. Thank you very much.
-----Original Message-----
From: Richard Frovarp [mailto:rfrovarp@apache.org]
Sent: Monday, November 30, 2009 11:47 PM
To: Maxim Borkunov
Cc: dev@lenya.apache.org
Subject: Re: Flow script performance issue
Maxim Borkunov wrote:
> Here is my performance benchmark result.
>
> User/AVG time(s)
> Test case 1 25 50 75 100 1 Analytical Research (XHTML) 0.112 2.052 4.228 6.25 7.665
> 2 Consortium Communicati..(XHTML) 0.111 1.967 3.944 5.815 8.544
> 3 FSS Inbound Template (PDF) 0.009 0.024 0.031 0.023 0.015
> 4 FSS STMT Inbound Templ (PDF) 0.012 0.023 0.026 0.021 0.022
> 5 LAS OBL Inbound Templ (PDF) 0.009 0.026 0.031 0.013 0.016
> 6 Home (XHTML) 0.228 2.382 5.209 8.401 10.338
> 8 LAS LOANS Inbound Templ (PDF) 0.01 0.019 0.031 0.014 0.019
> 9 Continuation(login page)(flow) 0.124 7.416 61.222 229.407 503.981
> 10 Login (flow) 0.181 11.313 85.959 314.342 670.145
> 11 Logout (flow) 0.066 10.799 58.368 156.67 376.282
> 12 Methodology and process (XHTML) 0.13 2.243 4.431 6.384 7.992
> 13 Project Plan (XHTML) 0.119 1.8 3.821 6.185 7.85
> 14 Publications for RB (XHTML) 0.105 1.84 4.671 8.754 18.135
> 15 Publications for SAAB (XHTML) 0.108 2.045 4.541 8.215 14.352
> 16 Reports for RB (XHTML) 0.116 1.97 4.227 6.269 7.491
> 17 Reports for SAAB (XHTML) 0.117 2.31 4.018 5.965 7.906
> 19 Search for alerts (Search) 0.206 2.926 10.993 19.228 47.919
> 20 Search for something (Search) 0.207 3.201 20.379 61.375 109.367
> 21 Search for money (Search) 0.268 4.765 27.578 89.302 165.854
> 22 Search for process (Search) 0.214 2.578 8.425 15.708 28.589
> 23 Search for research (Search) 0.214 2.616 7.736 11.817 19.786
> 24 Send message - my page (flow) 0.148 12.465 71.613 234.497 510.283
> 25 Deadlines (Custom generator) 0.111 2.003 4.115 6.478 8.812
>
> Login page generation, logout process and every page with flow script usage is taking too much time.
>
Thank you for your results. I did come across a problem with massive
locking issues with many of the pages you list as having problems.
Unfortunately it did not make it into 2.0.2. You could try making the
change yourself and re-running your benchmarks to see if it has the
desired effect.
It involves removing the importPackages line from usecases.js. The
commit can be found here:
http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/usecase/usecases.js?r1=730252&r2=730251&pathrev=730252
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Flow script performance issue
Posted by Richard Frovarp <rf...@apache.org>.
Maxim Borkunov wrote:
> Here is my performance benchmark result.
>
> User/AVG time(s)
> Test case 1 25 50 75 100 1 Analytical Research (XHTML) 0.112 2.052 4.228 6.25 7.665
> 2 Consortium Communicati..(XHTML) 0.111 1.967 3.944 5.815 8.544
> 3 FSS Inbound Template (PDF) 0.009 0.024 0.031 0.023 0.015
> 4 FSS STMT Inbound Templ (PDF) 0.012 0.023 0.026 0.021 0.022
> 5 LAS OBL Inbound Templ (PDF) 0.009 0.026 0.031 0.013 0.016
> 6 Home (XHTML) 0.228 2.382 5.209 8.401 10.338
> 8 LAS LOANS Inbound Templ (PDF) 0.01 0.019 0.031 0.014 0.019
> 9 Continuation(login page)(flow) 0.124 7.416 61.222 229.407 503.981
> 10 Login (flow) 0.181 11.313 85.959 314.342 670.145
> 11 Logout (flow) 0.066 10.799 58.368 156.67 376.282
> 12 Methodology and process (XHTML) 0.13 2.243 4.431 6.384 7.992
> 13 Project Plan (XHTML) 0.119 1.8 3.821 6.185 7.85
> 14 Publications for RB (XHTML) 0.105 1.84 4.671 8.754 18.135
> 15 Publications for SAAB (XHTML) 0.108 2.045 4.541 8.215 14.352
> 16 Reports for RB (XHTML) 0.116 1.97 4.227 6.269 7.491
> 17 Reports for SAAB (XHTML) 0.117 2.31 4.018 5.965 7.906
> 19 Search for alerts (Search) 0.206 2.926 10.993 19.228 47.919
> 20 Search for something (Search) 0.207 3.201 20.379 61.375 109.367
> 21 Search for money (Search) 0.268 4.765 27.578 89.302 165.854
> 22 Search for process (Search) 0.214 2.578 8.425 15.708 28.589
> 23 Search for research (Search) 0.214 2.616 7.736 11.817 19.786
> 24 Send message - my page (flow) 0.148 12.465 71.613 234.497 510.283
> 25 Deadlines (Custom generator) 0.111 2.003 4.115 6.478 8.812
>
> Login page generation, logout process and every page with flow script usage is taking too much time.
>
Thank you for your results. I did come across a problem with massive
locking issues with many of the pages you list as having problems.
Unfortunately it did not make it into 2.0.2. You could try making the
change yourself and re-running your benchmarks to see if it has the
desired effect.
It involves removing the importPackages line from usecases.js. The
commit can be found here:
http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/usecase/usecases.js?r1=730252&r2=730251&pathrev=730252
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
RE: Flow script performance issue
Posted by Maxim Borkunov <Ma...@bridge-quest.com>.
Here is my performance benchmark result.
User/AVG time(s)
Test case 1 25 50 75 100 1 Analytical Research (XHTML) 0.112 2.052 4.228 6.25 7.665
2 Consortium Communicati..(XHTML) 0.111 1.967 3.944 5.815 8.544
3 FSS Inbound Template (PDF) 0.009 0.024 0.031 0.023 0.015
4 FSS STMT Inbound Templ (PDF) 0.012 0.023 0.026 0.021 0.022
5 LAS OBL Inbound Templ (PDF) 0.009 0.026 0.031 0.013 0.016
6 Home (XHTML) 0.228 2.382 5.209 8.401 10.338
8 LAS LOANS Inbound Templ (PDF) 0.01 0.019 0.031 0.014 0.019
9 Continuation(login page)(flow) 0.124 7.416 61.222 229.407 503.981
10 Login (flow) 0.181 11.313 85.959 314.342 670.145
11 Logout (flow) 0.066 10.799 58.368 156.67 376.282
12 Methodology and process (XHTML) 0.13 2.243 4.431 6.384 7.992
13 Project Plan (XHTML) 0.119 1.8 3.821 6.185 7.85
14 Publications for RB (XHTML) 0.105 1.84 4.671 8.754 18.135
15 Publications for SAAB (XHTML) 0.108 2.045 4.541 8.215 14.352
16 Reports for RB (XHTML) 0.116 1.97 4.227 6.269 7.491
17 Reports for SAAB (XHTML) 0.117 2.31 4.018 5.965 7.906
19 Search for alerts (Search) 0.206 2.926 10.993 19.228 47.919
20 Search for something (Search) 0.207 3.201 20.379 61.375 109.367
21 Search for money (Search) 0.268 4.765 27.578 89.302 165.854
22 Search for process (Search) 0.214 2.578 8.425 15.708 28.589
23 Search for research (Search) 0.214 2.616 7.736 11.817 19.786
24 Send message - my page (flow) 0.148 12.465 71.613 234.497 510.283
25 Deadlines (Custom generator) 0.111 2.003 4.115 6.478 8.812
Login page generation, logout process and every page with flow script usage is taking too much time.
-----Original Message-----
From: Richard Frovarp [mailto:rfrovarp@apache.org]
Sent: Wednesday, November 25, 2009 8:27 PM
To: dev@lenya.apache.org; Maxim Borkunov
Subject: Re: Flow script performance issue
Maxim Borkunov wrote:
>
> Hi,
>
>
>
> I am using lenya 2.0.2 (cocoon-2.1.12-dev) and I made some performance
> tests with jmeter utility. 50 users in the same time walking through a
> lenya site - that's my jmeter setup.
>
> Unfortunatly, I found a bottleneck. The users (jmeter threads) freeze
> for a long time at pages that uses flow scripts. Almost all web server
> socket listener threads at this time shows the point listed below:
>
>
>
>
[snip]
>
>
>
>
>
> Is that synchronization in the
> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter
> class important?
>
> Could you please advise how can I solve this performance problem?
>
>
>
> P.S. I sent the same message to cocoon dev mailing list but there is
> no response yet.
>
>
>
I really don't know if the synchronization is important or not. It is a
performance problem. It may be best to find a way to reduce the usage of
flow scripts in high use pages. Which pages/types did you find this to
be an issue with?
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Flow script performance issue
Posted by Richard Frovarp <rf...@apache.org>.
Maxim Borkunov wrote:
>
> Hi,
>
>
>
> I am using lenya 2.0.2 (cocoon-2.1.12-dev) and I made some performance
> tests with jmeter utility. 50 users in the same time walking through a
> lenya site - that's my jmeter setup.
>
> Unfortunatly, I found a bottleneck. The users (jmeter threads) freeze
> for a long time at pages that uses flow scripts. Almost all web server
> socket listener threads at this time shows the point listed below:
>
>
>
>
[snip]
>
>
>
>
>
> Is that synchronization in the
> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter
> class important?
>
> Could you please advise how can I solve this performance problem?
>
>
>
> P.S. I sent the same message to cocoon dev mailing list but there is
> no response yet.
>
>
>
I really don't know if the synchronization is important or not. It is a
performance problem. It may be best to find a way to reduce the usage of
flow scripts in high use pages. Which pages/types did you find this to
be an issue with?
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org