You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ja...@providian.com on 2001/05/03 22:33:50 UTC

JSP re-compile performance under heavy load

Hi All,

I'm curious if any of you have code that tests the performance of JSP
recompiles while tomcat is under load.  I've read that some changes were
made in this area recently, and it directly effects a design I'm
considering.

If performance testing code exists, could someone send it to me?

                                      Thanks,

                                      Jason Henriksen

P.S.:  (If you're curious how I got into this sitation, here's the
rationale: )

Basically, I'm treating the disk drive as a cache.  I expect to have well
over 5,000 different query result pages, each of which could take over a
minute to generate because they require some fairly thick SQL.  The good
news is that only about 100 of them will be 'active' at any given time.
The non-active pages, can be built, saved on disk and then safely ignored
(Thus being served with no database hit). However, when the object in the
DB changes I should be able to show the update on the JSP page within 15
minutines of the database change occuring.

My plan is to generate a page for each of my 5,000 objects up front and
then wait until a DB object changes.  When it does, I'll regenerate the
page for just that object.  That way everyone see's the new static page,
and the database can continue doing it's regular job of managing user
accounts, and other such non-cacheable business.  (The disk cache is also
preferable to holding the results for all 5000 object queries in memory
because the results will be fairly large.  My disk space is near infinite,
but my memory is not).

So if I have 1000 people looking at the results for Object A when it needs
to be re-compiled how will Tomcat respond?  I know it does fine job
handling updated JSPs in a development environment, I'm curious how it's
expected to perform doing that kind of operation under load.  (I understand
that my mileage my vary, I'm just looking for what you guys would expect to
happen, or do you suggest some other desgin?)  Thus, I'm look for test-code
and/or result numbers.




------------------------------------------------------------------------------
Warning : The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this message and then delete it from your computer. All e-mail sent to this address will be received by the Providian Financial corporate e-mail system and is subject to archiving and review by someone other than the recipient.

==============================================================================


Re: JSP re-compile performance under heavy load

Posted by Paul Speed <Pa...@metrixpoint.com>.
Just a thought,

But might you not also just save your query results in some 
intermediate format (serialization might work) that your JSP pages
could then use?  It may not fit in well with your system, but it would
save from having to recompile pages.

At the other end of the spectrum, you could generate the HTML instead
of JSP and also save the intermediate step.

A large amount of JSP compilation overhead is out of tomcat's hands
since it's reliant on the java compiler.

-Paul

Jason_Henriksen@providian.com wrote:
> 
> Hi All,
> 
> I'm curious if any of you have code that tests the performance of JSP
> recompiles while tomcat is under load.  I've read that some changes were
> made in this area recently, and it directly effects a design I'm
> considering.
> 
> If performance testing code exists, could someone send it to me?
> 
>                                       Thanks,
> 
>                                       Jason Henriksen
> 
> P.S.:  (If you're curious how I got into this sitation, here's the
> rationale: )
> 
> Basically, I'm treating the disk drive as a cache.  I expect to have well
> over 5,000 different query result pages, each of which could take over a
> minute to generate because they require some fairly thick SQL.  The good
> news is that only about 100 of them will be 'active' at any given time.
> The non-active pages, can be built, saved on disk and then safely ignored
> (Thus being served with no database hit). However, when the object in the
> DB changes I should be able to show the update on the JSP page within 15
> minutines of the database change occuring.
> 
> My plan is to generate a page for each of my 5,000 objects up front and
> then wait until a DB object changes.  When it does, I'll regenerate the
> page for just that object.  That way everyone see's the new static page,
> and the database can continue doing it's regular job of managing user
> accounts, and other such non-cacheable business.  (The disk cache is also
> preferable to holding the results for all 5000 object queries in memory
> because the results will be fairly large.  My disk space is near infinite,
> but my memory is not).
> 
> So if I have 1000 people looking at the results for Object A when it needs
> to be re-compiled how will Tomcat respond?  I know it does fine job
> handling updated JSPs in a development environment, I'm curious how it's
> expected to perform doing that kind of operation under load.  (I understand
> that my mileage my vary, I'm just looking for what you guys would expect to
> happen, or do you suggest some other desgin?)  Thus, I'm look for test-code
> and/or result numbers.
> 
> ------------------------------------------------------------------------------
> Warning : The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this message and then delete it from your computer. All e-mail sent to this address will be received by the Providian Financial corporate e-mail system and is subject to archiving and review by someone other than the recipient.
> 
> ==============================================================================

Re: JSP re-compile performance under heavy load

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
You might consider changing the design of how you cache your data.
There are several JSP taglibs out that implement caching of data.
You can also do a runtime include of a static file instead of a JSP.

Regards,

Glenn

Jason_Henriksen@providian.com wrote:
> 
> Hi All,
> 
> I'm curious if any of you have code that tests the performance of JSP
> recompiles while tomcat is under load.  I've read that some changes were
> made in this area recently, and it directly effects a design I'm
> considering.
> 
> If performance testing code exists, could someone send it to me?
> 
>                                       Thanks,
> 
>                                       Jason Henriksen
> 
> P.S.:  (If you're curious how I got into this sitation, here's the
> rationale: )
> 
> Basically, I'm treating the disk drive as a cache.  I expect to have well
> over 5,000 different query result pages, each of which could take over a
> minute to generate because they require some fairly thick SQL.  The good
> news is that only about 100 of them will be 'active' at any given time.
> The non-active pages, can be built, saved on disk and then safely ignored
> (Thus being served with no database hit). However, when the object in the
> DB changes I should be able to show the update on the JSP page within 15
> minutines of the database change occuring.
> 
> My plan is to generate a page for each of my 5,000 objects up front and
> then wait until a DB object changes.  When it does, I'll regenerate the
> page for just that object.  That way everyone see's the new static page,
> and the database can continue doing it's regular job of managing user
> accounts, and other such non-cacheable business.  (The disk cache is also
> preferable to holding the results for all 5000 object queries in memory
> because the results will be fairly large.  My disk space is near infinite,
> but my memory is not).
> 
> So if I have 1000 people looking at the results for Object A when it needs
> to be re-compiled how will Tomcat respond?  I know it does fine job
> handling updated JSPs in a development environment, I'm curious how it's
> expected to perform doing that kind of operation under load.  (I understand
> that my mileage my vary, I'm just looking for what you guys would expect to
> happen, or do you suggest some other desgin?)  Thus, I'm look for test-code
> and/or result numbers.
> 
> ------------------------------------------------------------------------------
> Warning : The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this message and then delete it from your computer. All e-mail sent to this address will be received by the Providian Financial corporate e-mail system and is subject to archiving and review by someone other than the recipient.
> 
> ==============================================================================

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------