You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Todd Lipcon <tl...@mercea.net> on 2000/08/14 00:48:57 UTC

Slow JSP time?

Hi,
   I recently got jakarta-tomcat working with Apache 1.3.12 on my LinuxPPC
box (PowerMac 8500, 120mhz, 64Mb RAM) and it works great. I poked around a
bit in the examples and it looks like a big improvement over JServ in
terms of functionality... however, I found the Jsp:include example, and
was a bit concerned. I receive the output:

In place evaluation of another JSP which gives you the current time:
966206598804
To get the current time in ms by including the output of another JSP:
966206599026 :-)

To me, this says that to render this JSP page, it takes at least 200ms (in
between the two "time" calls). This is obviously a fairly large ammount of
time! The offset between the two does not improve on subsequent reloads of
the same page- it hovers around 210ms. I realize that my machine isn't
exactly top-notch, and I'm not even using a JIT, but shouldn't the
performance be a little better than this? Isn't Tomcat supposed to keep
the jsp's serlets loaded into memory and give a performance boost on
subsequent reloads? Is there some performance-tuning trick I can use to
reduce this latency a bit other than "get a new machine"? :)

Thanks,
-Todd


RE: Slow JSP time?

Posted by Todd Lipcon <tl...@mercea.net>.
On Mon, 14 Aug 2000, Dan Kirkpatrick wrote:

> Are these statistics for the first access to the page after Tomcat has
> started?  If so, you're including the time it takes to extract the HTML
> within the JSP page, wrap it in Java, save the file, compile the file, load
> the class, instantiate the class, and run the servlet that is generated from
> the JSP page.

If you read the next paragraph down, you will see that I said that it
occurs at about 200ms even after many reloads of the page.

> At any rate, the current state of JVMs under Mac are really pretty poor
> (unless things have changed since I last checked--it has been a few months
> ;-).  MacOS 10 is supposed to ship with a v1.3 version of Java, accompanied
> with a fairly reasonable JIT.  We shall see, though, as I've seen lots of
> missed deadlines regarding release dates for JVMs over the years...

Also, if you were to read again, you would see that I'm running LinuxPPC
:) I'd never think of hosting on MacOS, that's just dumb ;-) Great
PC OS, but bad server, in my opinion. As for the JVM I'm using on
LinuxPPC, it is Blackdown's port of jdk1.2.2. Unfortunately, it is not yet
JIT (Only jdk1.1.8 has been JIT-ified for LinuxPPC so far).

Any other ideas as for performance tuning?

-Todd
> 
> -----Original Message-----
> From: Todd Lipcon [mailto:tlipcon@mercea.net]
> Sent: Sunday, August 13, 2000 3:49 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Slow JSP time?
> 
> 
> Hi,
>    I recently got jakarta-tomcat working with Apache 1.3.12 on my LinuxPPC
> box (PowerMac 8500, 120mhz, 64Mb RAM) and it works great. I poked around a
> bit in the examples and it looks like a big improvement over JServ in
> terms of functionality... however, I found the Jsp:include example, and
> was a bit concerned. I receive the output:
> 
> In place evaluation of another JSP which gives you the current time:
> 966206598804
> To get the current time in ms by including the output of another JSP:
> 966206599026 :-)
> 
> To me, this says that to render this JSP page, it takes at least 200ms (in
> between the two "time" calls). This is obviously a fairly large ammount of
> time! The offset between the two does not improve on subsequent reloads of
> the same page- it hovers around 210ms. I realize that my machine isn't
> exactly top-notch, and I'm not even using a JIT, but shouldn't the
> performance be a little better than this? Isn't Tomcat supposed to keep
> the jsp's serlets loaded into memory and give a performance boost on
> subsequent reloads? Is there some performance-tuning trick I can use to
> reduce this latency a bit other than "get a new machine"? :)
> 
> Thanks,
> -Todd
> 
> 


RE: Slow JSP time?

Posted by Dan Kirkpatrick <da...@xxi.com>.
Are these statistics for the first access to the page after Tomcat has
started?  If so, you're including the time it takes to extract the HTML
within the JSP page, wrap it in Java, save the file, compile the file, load
the class, instantiate the class, and run the servlet that is generated from
the JSP page.

For a more realistic comparison, try comparing the 2nd or later reload of
the page.  Then, all Tomcat has to do is grab an already instantiated
instance of the servlet, populate it with any request-specific data, and
run.  You should find that this operation is a wee bit quicker.

At any rate, the current state of JVMs under Mac are really pretty poor
(unless things have changed since I last checked--it has been a few months
;-).  MacOS 10 is supposed to ship with a v1.3 version of Java, accompanied
with a fairly reasonable JIT.  We shall see, though, as I've seen lots of
missed deadlines regarding release dates for JVMs over the years...

-dan

-----Original Message-----
From: Todd Lipcon [mailto:tlipcon@mercea.net]
Sent: Sunday, August 13, 2000 3:49 PM
To: tomcat-user@jakarta.apache.org
Subject: Slow JSP time?


Hi,
   I recently got jakarta-tomcat working with Apache 1.3.12 on my LinuxPPC
box (PowerMac 8500, 120mhz, 64Mb RAM) and it works great. I poked around a
bit in the examples and it looks like a big improvement over JServ in
terms of functionality... however, I found the Jsp:include example, and
was a bit concerned. I receive the output:

In place evaluation of another JSP which gives you the current time:
966206598804
To get the current time in ms by including the output of another JSP:
966206599026 :-)

To me, this says that to render this JSP page, it takes at least 200ms (in
between the two "time" calls). This is obviously a fairly large ammount of
time! The offset between the two does not improve on subsequent reloads of
the same page- it hovers around 210ms. I realize that my machine isn't
exactly top-notch, and I'm not even using a JIT, but shouldn't the
performance be a little better than this? Isn't Tomcat supposed to keep
the jsp's serlets loaded into memory and give a performance boost on
subsequent reloads? Is there some performance-tuning trick I can use to
reduce this latency a bit other than "get a new machine"? :)

Thanks,
-Todd