Re: Tomcat4 performance issue when manually removing compiledjsps in work folder

2004-03-30 Thread Duncan Krebs
Peter,
I'm getting closer. I installed the latest stable version of Tomcat, copied
my web application folder into the tomcat5 webapps folder and this what I
have noticed.

Any jsp page from the existing web app seems to be getting recompiled and
not cached in tomcat. This is what I can't figure out:

If I create a new jsp page in the web app and copy the exact source from an
existing jsp into the new file (named differently than the existing one),
the new jsp is getting cached just fine. When I refresh that page a bunch of
times, the response time is instant and my cpu activity stays very low.

But when I continue to load any jsp pages from the existing web app, my cpu
hits 60%, the response time is slower and they seem to be getting recompiled
on every request. Makes no sense, both the new and old jsp page have the
same content but the old one seems to keep getting recompiled on every
request. Do you have any ideas why Tomcat would be doing this?

Thanks again for your help,
- Duncan



- Original Message -
From: Peter Johnson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 2:35 AM
Subject: Re: Tomcat4 performance issue when manually removing compiledjspsin
work folder


 Duncan,

 Restarting is like wiping the slate clean in terms of Tomcat's caching
 in the work directory. So, it is expected that it would take a little
 while, even just to load the classes in to memory to serve. If you are
 using JSP I believe that these are always recompiled at start with the
 class files from the your webapp/WEB-INF/classes and lib directories
 being loaded in to memory.

 PJ

 On Fri, 2004-03-26 at 19:11, Duncan Krebs wrote:
  Peter,
  Thanks for the reply. It would make sense that on the request
immediately
  after I delete the .java and .class files in the work folder it would
take
  longer because tomcat has to recompile the jsp's. However even after
they
  are recompiled (not deleted again)and  tomcat is restarted subsequent
  requests continue to take longer and the CPU continues to hit 100%. I
wonder
  if there is a way to analyze the request and see what code is taking so
long
  to execute.
  - Duncan
 
  - Original Message -
  From: Peter Johnson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 2:00 AM
  Subject: Re: Tomcat4 performance issue when manually removing compiled
  jspsin work folder
 
 
   Duncan,
  
   I believe (and could be wrong) that this is intended behaviour. The
work
   directory is like Tomcat's cache of all the webapps it is currently
   serving. When a request comes in for a page it tries to serve from
this
   directory, if the class file does not exist it generates the .java
files
   from /webapp and then compiles them so that it can serve them.
  
   So, the 3s delay and 100% utilisation is expected because Tomcat is
   recompiling the files so that it can serve them.
  
   PJ
  
   On Fri, 2004-03-26 at 18:39, Duncan Krebs wrote:
Hi,
I have had this snag for some time now and its starting to get the
best
  of me. I'm running tomcat 4.1 and when I manually remove the .java and
  .class files in the /work/standalone folder even after the initial
request
  of recompiling the jsp's tomcat hits 100% on my CPU and the overall
response
  time is delayed by about 3 seconds on each request.
   
As I deleted different sub folders in the work folder (all within
the
  same web application) the degraded performance was consistent with the
  different sub folders that I was deleting even after the pages were
  recompiled. Has anyone experienced this before?
   
All of my requests are going through a Servlet controller and I have
a
  lot of classes in my WEB-INF folder that are part of the framework but I
  don't think that would have anything to do with this. I've also tried
  rebuilding my entire project from scratch and I'm still having the same
  issue of a slowed response time of about 3 seconds and tomcat taking all
my
  CPU.
   
Regards,
dkrebs
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat4 performance issue when manually removing compiledjsps in work folder

2004-03-30 Thread Bodycombe, Andrew
Could your jsp source files have been modified In the future? 

-Original Message-
From: Duncan Krebs
To: Tomcat Users List
Sent: 26/03/2004 09:39
Subject: Re: Tomcat4 performance issue when manually removing compiledjsps
in work folder

Peter,
I'm getting closer. I installed the latest stable version of Tomcat,
copied
my web application folder into the tomcat5 webapps folder and this what
I
have noticed.

Any jsp page from the existing web app seems to be getting recompiled
and
not cached in tomcat. This is what I can't figure out:

If I create a new jsp page in the web app and copy the exact source from
an
existing jsp into the new file (named differently than the existing
one),
the new jsp is getting cached just fine. When I refresh that page a
bunch of
times, the response time is instant and my cpu activity stays very low.

But when I continue to load any jsp pages from the existing web app, my
cpu
hits 60%, the response time is slower and they seem to be getting
recompiled
on every request. Makes no sense, both the new and old jsp page have the
same content but the old one seems to keep getting recompiled on every
request. Do you have any ideas why Tomcat would be doing this?

Thanks again for your help,
- Duncan



- Original Message -
From: Peter Johnson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 2:35 AM
Subject: Re: Tomcat4 performance issue when manually removing
compiledjspsin
work folder


 Duncan,

 Restarting is like wiping the slate clean in terms of Tomcat's caching
 in the work directory. So, it is expected that it would take a little
 while, even just to load the classes in to memory to serve. If you are
 using JSP I believe that these are always recompiled at start with the
 class files from the your webapp/WEB-INF/classes and lib directories
 being loaded in to memory.

 PJ

 On Fri, 2004-03-26 at 19:11, Duncan Krebs wrote:
  Peter,
  Thanks for the reply. It would make sense that on the request
immediately
  after I delete the .java and .class files in the work folder it
would
take
  longer because tomcat has to recompile the jsp's. However even after
they
  are recompiled (not deleted again)and  tomcat is restarted
subsequent
  requests continue to take longer and the CPU continues to hit 100%.
I
wonder
  if there is a way to analyze the request and see what code is taking
so
long
  to execute.
  - Duncan
 
  - Original Message -
  From: Peter Johnson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 2:00 AM
  Subject: Re: Tomcat4 performance issue when manually removing
compiled
  jspsin work folder
 
 
   Duncan,
  
   I believe (and could be wrong) that this is intended behaviour.
The
work
   directory is like Tomcat's cache of all the webapps it is
currently
   serving. When a request comes in for a page it tries to serve from
this
   directory, if the class file does not exist it generates the .java
files
   from /webapp and then compiles them so that it can serve them.
  
   So, the 3s delay and 100% utilisation is expected because Tomcat
is
   recompiling the files so that it can serve them.
  
   PJ
  
   On Fri, 2004-03-26 at 18:39, Duncan Krebs wrote:
Hi,
I have had this snag for some time now and its starting to get
the
best
  of me. I'm running tomcat 4.1 and when I manually remove the .java
and
  .class files in the /work/standalone folder even after the initial
request
  of recompiling the jsp's tomcat hits 100% on my CPU and the overall
response
  time is delayed by about 3 seconds on each request.
   
As I deleted different sub folders in the work folder (all
within
the
  same web application) the degraded performance was consistent with
the
  different sub folders that I was deleting even after the pages were
  recompiled. Has anyone experienced this before?
   
All of my requests are going through a Servlet controller and I
have
a
  lot of classes in my WEB-INF folder that are part of the framework
but I
  don't think that would have anything to do with this. I've also
tried
  rebuilding my entire project from scratch and I'm still having the
same
  issue of a slowed response time of about 3 seconds and tomcat taking
all
my
  CPU.
   
Regards,
dkrebs
   
  
  
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
[EMAIL PROTECTED]
  
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Tomcat4 performance issue when manually removing compiledjsps in work folder

2004-03-30 Thread QM
On Fri, Mar 26, 2004 at 03:39:13AM -0600, Duncan Krebs wrote:
: But when I continue to load any jsp pages from the existing web app, my cpu
: hits 60%, the response time is slower and they seem to be getting recompiled
: on every request. Makes no sense, both the new and old jsp page have the
: same content but the old one seems to keep getting recompiled on every
: request. Do you have any ideas why Tomcat would be doing this?

That the files have the same content is irrelevant -- Tomcat sees each
JSP as a separate entity.

The question is, exactly what happens between page refreshes?  Are you
redeploying your webapp (i.e., overwriting a JSP with the same content,
like when you pull the files out of source code control)?

Is something else on your machine adjusting the files' timestamps,
causing Tomcat to think the file has changed and must thus be rebuilt?


fwiw, it's my experience that restarting Tomcat has no effect on the
compiled files in the /work dir -- Tomcat will still compare the
compiled version to the original.

-QM

-- 
software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]