You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tin Pham <tt...@learn.senecac.on.ca> on 2003/05/22 06:09:09 UTC

Struts Performance - Any Benchmarks?

Hi, I have been scouring the internet with no results.

Does anybody have any resources on the performance of Struts applications.
Any
benchmarks versus standard development.

One "bottle-neck" brought up by members of my team is the single action
servlet everything must pass through. Are there currently or going to be
programming solutions to this?

For example, maybe we can have more than one action servlet and use a
different mapping.. ie, instead of *.do, *.jspx ? But then would global
forwards from the two different actions still work?

Personally, I argue that we should simply go to load balancing if it comes
to
that and adding more servlets wouldn't do much anyway. From my rudimentary
undestanding of java servlets, other resources will choke on you way before
the single servlet chokes anyhow.




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts Performance - Any Benchmarks?

Posted by Ted Husted <hu...@apache.org>.
Craig R. McClanahan wrote:
> The other evidence is that Struts gets many thousands of downloads every
> single day ... and support for it is built in (or easily plugged in) to a
> wide variety of popular application development tools ... SOMEBODY must
> think it makes a pretty reasonable platform for building web applications.
> :-)

In other words, "You don't get fired for choosing S-T-R-U-T-S."

:>

-T.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts Performance - Any Benchmarks?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 27 May 2003, Tin Pham wrote:

> Date: Tue, 27 May 2003 23:16:34 -0400
> From: Tin Pham <tt...@learn.senecac.on.ca>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Re: Struts Performance - Any Benchmarks?
>
> Hi David, Craig,
>
> Thanks for your replies. I will forward them to my team.
>
> I made the same points about multi-threading verbally and following up with
> research and references for the team.
>
> They seem to be itching for benchmarks though, so I'll give it to them by
> building a single, then multi-servlet app and using Introscope with some
> load test simulators. I was hoping somebody in a situation such as myself
> already had done it.
>

That's pretty easy to deal with ... make THEM prove that single instances
are worse.  Where is THEIR evidence?  After all, THEY are the ones that
don't get it.

:-) :-)

> Now the next matter of opposition I'm getting is does struts work well in a
> distributed environment for example load balancing. I will post this a
> separate thread with what I have told them already.

That is almost totally an issue of what your servlet container provides in
terms of load balancing support.  Struts (or any other app level
framework) is going to be pretty much irrelevant to that kind of
discussion, because the load balancing support is basically transparent to
the application or to the framework.

Overall, it sounds like your team is likely to succumb to "premature
optimization" anti-patterns, and totally fail to understand what is really
important about web application design.  That's pretty tragic when it
happens, because it's totally needless -- most of the things your team is
stressing over are TOTALLY IRRELEVANT to the end user's perception of
performance of your application.  They are worried about the wrong things,
at the wrong time in the development cycle.

One possible approach would be to build a prototype using Struts, and
exactly the same functionality using whatever design approach your team
thinks will work better.  It's pretty much a waste of effort, but some
people won't be convinced any other way.

As for evidence that the approach Struts encourages makes sense, you've
got your pick of almost every J2EE-related design patterns book in
existence.  Any of them would be incredibly helpful to you, but one whose
binding on my copy is always breaking (because I have it open all the
time) is "Core J2EE Patterns" by Alur, Crupi, Malks et. al. (Prentice
Hall, 2001).  Besides finding out that Struts implements many of the
recommended web tier patterns, you'll also learn a lot of good stuff about
setting up the non-web-UI portions of your overall architecture.

The other evidence is that Struts gets many thousands of downloads every
single day ... and support for it is built in (or easily plugged in) to a
wide variety of popular application development tools ... SOMEBODY must
think it makes a pretty reasonable platform for building web applications.
:-)

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts Performance - Any Benchmarks?

Posted by Tin Pham <tt...@learn.senecac.on.ca>.
Hi David, Craig,

Thanks for your replies. I will forward them to my team.

I made the same points about multi-threading verbally and following up with
research and references for the team.

They seem to be itching for benchmarks though, so I'll give it to them by
building a single, then multi-servlet app and using Introscope with some
load test simulators. I was hoping somebody in a situation such as myself
already had done it.

Now the next matter of opposition I'm getting is does struts work well in a
distributed environment for example load balancing. I will post this a
separate thread with what I have told them already.

"Craig R. McClanahan" <cr...@apache.org> wrote in message
news:20030527131837.G65484@icarus.apache.org...
>
>
> On Thu, 22 May 2003, Tin Pham wrote:
>
> > Date: Thu, 22 May 2003 00:09:09 -0400
> > From: Tin Pham <tt...@learn.senecac.on.ca>
> > Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> > To: struts-user@jakarta.apache.org
> > Subject: Struts Performance - Any Benchmarks?
> >
> > Hi, I have been scouring the internet with no results.
> >
> > Does anybody have any resources on the performance of Struts
applications.
> > Any
> > benchmarks versus standard development.
> >
> > One "bottle-neck" brought up by members of my team is the single action
> > servlet everything must pass through. Are there currently or going to be
> > programming solutions to this?
> >
>
> If your team believes that this issue is a bottleneck, then some training
> and a more complete understanding of how multithreading works in Java
> might be appropriate -- the fact that a single instance of the action
> servlet (and of the actions themselves) has zero impact on performance,
> and it reduces memory consumption of your app by avoiding useless extra
> copies.
>
> > For example, maybe we can have more than one action servlet and use a
> > different mapping.. ie, instead of *.do, *.jspx ? But then would global
> > forwards from the two different actions still work?
> >
>
> This won't work, but not for performance reasons -- Struts supports only a
> single mapping to the controller servlet, and only one controller servlet
> per webapp.
>
> > Personally, I argue that we should simply go to load balancing if it
comes
> > to
> > that and adding more servlets wouldn't do much anyway. From my
rudimentary
> > undestanding of java servlets, other resources will choke on you way
before
> > the single servlet chokes anyhow.
> >
>
> See above -- the most important factors in webapp performance have nothing
> to do with this issue at all.  In fact, the most important factors are
> typically:
>
> * Overall application architecture (things like caching where it is
>   appropriate, but not doing premature optimization -- there are lots
>   of good books on optimizing server-side Java apps around to draw
>   ideas from).
>
> * Database performance (be sure to use connection pooling effectively)
>
> * Network performance
>
> * The quality of the code generated by your JSP page compiler
>   for pages using lots of custom tags.
>
> Craig McClanahan




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts Performance - Any Benchmarks?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 22 May 2003, Tin Pham wrote:

> Date: Thu, 22 May 2003 00:09:09 -0400
> From: Tin Pham <tt...@learn.senecac.on.ca>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Struts Performance - Any Benchmarks?
>
> Hi, I have been scouring the internet with no results.
>
> Does anybody have any resources on the performance of Struts applications.
> Any
> benchmarks versus standard development.
>
> One "bottle-neck" brought up by members of my team is the single action
> servlet everything must pass through. Are there currently or going to be
> programming solutions to this?
>

If your team believes that this issue is a bottleneck, then some training
and a more complete understanding of how multithreading works in Java
might be appropriate -- the fact that a single instance of the action
servlet (and of the actions themselves) has zero impact on performance,
and it reduces memory consumption of your app by avoiding useless extra
copies.

> For example, maybe we can have more than one action servlet and use a
> different mapping.. ie, instead of *.do, *.jspx ? But then would global
> forwards from the two different actions still work?
>

This won't work, but not for performance reasons -- Struts supports only a
single mapping to the controller servlet, and only one controller servlet
per webapp.

> Personally, I argue that we should simply go to load balancing if it comes
> to
> that and adding more servlets wouldn't do much anyway. From my rudimentary
> undestanding of java servlets, other resources will choke on you way before
> the single servlet chokes anyhow.
>

See above -- the most important factors in webapp performance have nothing
to do with this issue at all.  In fact, the most important factors are
typically:

* Overall application architecture (things like caching where it is
  appropriate, but not doing premature optimization -- there are lots
  of good books on optimizing server-side Java apps around to draw
  ideas from).

* Database performance (be sure to use connection pooling effectively)

* Network performance

* The quality of the code generated by your JSP page compiler
  for pages using lots of custom tags.

Craig McClanahan

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org