RE: Javac memory leak

2002-11-22 Thread Panagiotis Konstantinidis

-Original Message-
From: Holger Brozio [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 21, 2002 4:40 PM
To: Tomcat Developers List
Subject: Re: Javac memory leak


is higher. If you wait a certain time frame and don't call 
any jsp page, the
garbage collector
should run and remove all unused instances of jsp classes.

Just wondering if servlets (including JSP pages, since they are treated
exactly as servlets) are ever garbage collected in the lifetime of the
app server. As far as I know servlets are loaded only once in the jvm
and stay there for ever (except for restart ofcourse). So the servlet
(especially JSPs with lots of static content) will consume the memory of
the heap in the old generation.

If all the above are true I presume that moving big static content from
JSPs into files will decrease the memory needs of a web app. (increasing
I/O though)

Panagiotis Konstantinidis
Software Engineer

Softways Hellas Internet Development S.A
(http://www.softways.gr/)



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




RE: Javac memory leak

2002-11-21 Thread John Trollinger
Ok,

I did some testing running 4.1.14 as a service...

Now my knowledge of memory management is not so good so this might mean
nothing.

When running as a service if I goto every example jsp page (the examples
that come with the install)

Compiled
Memory starts at 37872 and ends at 39048

Not compiled
Memory starts at 39635 and ends at 58760

Does this not look like a memory leak in the jsp compile code??

Thanks,

John


 -Original Message-
 From: Holger Brozio [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 20, 2002 12:14 PM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 I also have no memory leak problems now with Tomcat 4.1.12.
 But i'm using jikes instead of javac as jsp page compiler.
 
 Whats about switching to jikes. If the memory leak problem is 
 gone with jikes, javac still leaks memory, otherwise it is a 
 problem in the jsp pages.
 
 Cheers
 
 Holger
 - Original Message -
 From: John Trollinger [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 3:39 PM
 Subject: Javac memory leak
 
 
  Does anyone know if the javac memory leak still exists 
 (1.4.1 docs say 
  it does not).
 
  I have a test the goes through a bunch of jsp pages and if they are 
  not precompiled I get a out of memory exception.
 
 
  Thanks,
 
  John
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Javac memory leak

2002-11-21 Thread Holger Brozio
I think we should define memory leak.

During the precompilation of the jsp pages, the resulting class files are
also loaded by the
classloader. This means of course, that the memory size increases.
It is up to the garbage collector to remove the loaded classes from memory.
In other words, it depends how long you wait after the precompilation with
your memory
measurement. If you look at the memory size immediate after the
precompilation, the size
is higher. If you wait a certain time frame and don't call any jsp page, the
garbage collector
should run and remove all unused instances of jsp classes.

HTH

Holger
- Original Message -
From: John Trollinger [EMAIL PROTECTED]
To: 'Tomcat Developers List' [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 3:22 PM
Subject: RE: Javac memory leak


 Ok,

 I did some testing running 4.1.14 as a service...

 Now my knowledge of memory management is not so good so this might mean
 nothing.

 When running as a service if I goto every example jsp page (the examples
 that come with the install)

 Compiled
 Memory starts at 37872 and ends at 39048

 Not compiled
 Memory starts at 39635 and ends at 58760

 Does this not look like a memory leak in the jsp compile code??

 Thanks,

 John


  -Original Message-
  From: Holger Brozio [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, November 20, 2002 12:14 PM
  To: Tomcat Developers List
  Subject: Re: Javac memory leak
 
 
  I also have no memory leak problems now with Tomcat 4.1.12.
  But i'm using jikes instead of javac as jsp page compiler.
 
  Whats about switching to jikes. If the memory leak problem is
  gone with jikes, javac still leaks memory, otherwise it is a
  problem in the jsp pages.
 
  Cheers
 
  Holger
  - Original Message -
  From: John Trollinger [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, November 20, 2002 3:39 PM
  Subject: Javac memory leak
 
 
   Does anyone know if the javac memory leak still exists
  (1.4.1 docs say
   it does not).
  
   I have a test the goes through a bunch of jsp pages and if they are
   not precompiled I get a out of memory exception.
  
  
   Thanks,
  
   John
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:
  mailto:tomcat-dev- [EMAIL PROTECTED]
  For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
 


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



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




Re: Javac memory leak

2002-11-21 Thread peter lin

that is unusual. I've done baseline performance tests with the standard
examples and haven't seen that kind of behavior with 4.1.10-12.  Can you
start tomcat with verbose:gc and see what kind of output you're
getting.  Just because the memory allocated to Java is 58megs at the
end, it doesn't mean it's actually using all of it actively.  getting
the GC output will tell you how much memory is being used, when GC runs
and whether or not a fullGC ran.

in past experience with 4.0.4, after loading all the example pages
tomcat's memory allocation is around 45megs.


peter


John Trollinger wrote:
 
 Ok,
 
 I did some testing running 4.1.14 as a service...
 
 Now my knowledge of memory management is not so good so this might mean
 nothing.
 
 When running as a service if I goto every example jsp page (the examples
 that come with the install)
 
 Compiled
 Memory starts at 37872 and ends at 39048
 
 Not compiled
 Memory starts at 39635 and ends at 58760
 
 Does this not look like a memory leak in the jsp compile code??
 
 Thanks,
 
 John
 
  -Original Message-
  From: Holger Brozio [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, November 20, 2002 12:14 PM
  To: Tomcat Developers List
  Subject: Re: Javac memory leak
 
 
  I also have no memory leak problems now with Tomcat 4.1.12.
  But i'm using jikes instead of javac as jsp page compiler.
 
  Whats about switching to jikes. If the memory leak problem is
  gone with jikes, javac still leaks memory, otherwise it is a
  problem in the jsp pages.
 
  Cheers
 
  Holger
  - Original Message -
  From: John Trollinger [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, November 20, 2002 3:39 PM
  Subject: Javac memory leak
 
 
   Does anyone know if the javac memory leak still exists
  (1.4.1 docs say
   it does not).
  
   I have a test the goes through a bunch of jsp pages and if they are
   not precompiled I get a out of memory exception.
  
  
   Thanks,
  
   John
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:
  mailto:tomcat-dev- [EMAIL PROTECTED]
  For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Javac memory leak

2002-11-21 Thread peter lin

Just to double check against tomcat 4.1.12, the memory usage seems
normal to me John.  After tomcat starts up, it is using 23megs.  My
webapp loads when tomcat starts up, so your numbers may be lower.  The
system has 256megs of memory and 750mhz cpu.

after I I hit all the pages in /examples/jsp/ directory, the memory
allocated to java is 40megs.

I even ran it with OptimizeIt and I don't see any memory leaks.

peter


peter lin wrote:
 
 that is unusual. I've done baseline performance tests with the standard
 examples and haven't seen that kind of behavior with 4.1.10-12.  Can you
 start tomcat with verbose:gc and see what kind of output you're
 getting.  Just because the memory allocated to Java is 58megs at the
 end, it doesn't mean it's actually using all of it actively.  getting
 the GC output will tell you how much memory is being used, when GC runs
 and whether or not a fullGC ran.
 
 in past experience with 4.0.4, after loading all the example pages
 tomcat's memory allocation is around 45megs.
 
 peter
 
 John Trollinger wrote:
 
  Ok,
 
  I did some testing running 4.1.14 as a service...
 
  Now my knowledge of memory management is not so good so this might mean
  nothing.
 
  When running as a service if I goto every example jsp page (the examples
  that come with the install)
 
  Compiled
  Memory starts at 37872 and ends at 39048
 
  Not compiled
  Memory starts at 39635 and ends at 58760
 
  Does this not look like a memory leak in the jsp compile code??
 
  Thanks,
 
  John
 
   -Original Message-
   From: Holger Brozio [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, November 20, 2002 12:14 PM
   To: Tomcat Developers List
   Subject: Re: Javac memory leak
  
  
   I also have no memory leak problems now with Tomcat 4.1.12.
   But i'm using jikes instead of javac as jsp page compiler.
  
   Whats about switching to jikes. If the memory leak problem is
   gone with jikes, javac still leaks memory, otherwise it is a
   problem in the jsp pages.
  
   Cheers
  
   Holger
   - Original Message -
   From: John Trollinger [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, November 20, 2002 3:39 PM
   Subject: Javac memory leak
  
  
Does anyone know if the javac memory leak still exists
   (1.4.1 docs say
it does not).
   
I have a test the goes through a bunch of jsp pages and if they are
not precompiled I get a out of memory exception.
   
   
Thanks,
   
John
   
   
--
To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
   
  
  
   --
   To unsubscribe, e-mail:
   mailto:tomcat-dev- [EMAIL PROTECTED]
   For
   additional commands,
   e-mail: mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: Javac memory leak

2002-11-21 Thread John Trollinger
When I run the examples with -verbose:gc this is what I get (just the
snippits at the end)

From uncompiled jsp pages 

[GC 14707K-13665K(28412K), 0.0059002 secs]
[GC 15521K-15518K(28412K), 0.0128997 secs]
[GC 17374K-16086K(28412K), 0.0092266 secs]
[GC 17942K-16258K(28412K), 0.0086307 secs]
[GC 18114K-16213K(28412K), 0.0046327 secs]
[GC 18069K-17934K(28412K), 0.0114056 secs]
[GC 19790K-19672K(28412K), 0.0155838 secs]

Did you see me on the stderr window?


Did you see me on the browser window as well?

[GC 21520K-20092K(28412K), 0.0094920 secs]
[GC 21947K-20095K(28412K), 0.0075890 secs]
[GC 21951K-21758K(28412K), 0.0131385 secs]
[GC 23614K-23528K(28412K), 0.0137372 secs]
[GC 25384K-23769K(28412K), 0.0079125 secs]
[GC 25625K-24336K(28412K), 0.0073652 secs]
[GC 26192K-26170K(28412K), 0.0153369 secs]
[GC 28026K-27460K(29436K), 0.0190963 secs]
[Full GC 27460K-15538K(29436K), 0.2839948 secs]
[GC 17394K-15720K(28412K), 0.0060262 secs]
[GC 17575K-15746K(28412K), 0.0046218 secs]
[GC 17602K-15745K(28412K), 0.0027241 secs]
[GC 17601K-15745K(28412K), 0.0025604 secs]
[GC 17601K-15746K(28412K), 0.0026679 secs]
Stopping service Tomcat-Standalone

From compiled jsp pages

[GC 11356K-10577K(14028K), 0.0061505 secs]
[GC 11532K-11034K(14028K), 0.0046978 secs]
[GC 11994K-11305K(14028K), 0.0060575 secs]
[GC 12265K-11341K(14028K), 0.0059876 secs]
[GC 12297K-11396K(14028K), 0.0065578 secs]
[GC 12356K-11538K(14028K), 0.0063572 secs]
[GC 12498K-11598K(14028K), 0.0040036 secs]
[GC 12558K-11965K(14028K), 0.0052529 secs]

Did you see me on the stderr window?


Did you see me on the browser window as well?

[GC 12925K-12020K(14028K), 0.0046872 secs]
Stopping service Tomcat-Standalone


As you can see there is about a 4 meg diff between the two

This is using j2sdk 1.4.1 on windows XP with 512 ram using tomcat
4.1.14LE

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 21, 2002 10:56 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 Just to double check against tomcat 4.1.12, the memory usage 
 seems normal to me John.  After tomcat starts up, it is using 
 23megs.  My webapp loads when tomcat starts up, so your 
 numbers may be lower.  The system has 256megs of memory and 
 750mhz cpu.
 
 after I I hit all the pages in /examples/jsp/ directory, the 
 memory allocated to java is 40megs.
 
 I even ran it with OptimizeIt and I don't see any memory leaks.
 
 peter
 
 
 peter lin wrote:
  
  that is unusual. I've done baseline performance tests with the 
  standard examples and haven't seen that kind of behavior with 
  4.1.10-12.  Can you start tomcat with verbose:gc and see 
 what kind of 
  output you're getting.  Just because the memory allocated 
 to Java is 
  58megs at the end, it doesn't mean it's actually using all of it 
  actively.  getting the GC output will tell you how much memory is 
  being used, when GC runs and whether or not a fullGC ran.
  
  in past experience with 4.0.4, after loading all the example pages 
  tomcat's memory allocation is around 45megs.
  
  peter
  
  John Trollinger wrote:
  
   Ok,
  
   I did some testing running 4.1.14 as a service...
  
   Now my knowledge of memory management is not so good so 
 this might 
   mean nothing.
  
   When running as a service if I goto every example jsp page (the 
   examples that come with the install)
  
   Compiled
   Memory starts at 37872 and ends at 39048
  
   Not compiled
   Memory starts at 39635 and ends at 58760
  
   Does this not look like a memory leak in the jsp compile code??
  
   Thanks,
  
   John
  
-Original Message-
From: Holger Brozio [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 12:14 PM
To: Tomcat Developers List
Subject: Re: Javac memory leak
   
   
I also have no memory leak problems now with Tomcat 4.1.12. But 
i'm using jikes instead of javac as jsp page compiler.
   
Whats about switching to jikes. If the memory leak 
 problem is gone 
with jikes, javac still leaks memory, otherwise it is a 
 problem in 
the jsp pages.
   
Cheers
   
Holger
- Original Message -
From: John Trollinger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:39 PM
Subject: Javac memory leak
   
   
 Does anyone know if the javac memory leak still exists
(1.4.1 docs say
 it does not).

 I have a test the goes through a bunch of jsp pages 
 and if they 
 are not precompiled I get a out of memory exception.


 Thanks,

 John


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

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

Re: Javac memory leak

2002-11-21 Thread peter lin

This is from the examples jsp right? or are they from your webapp?

the latest optimizeit has a leak finder feature. you may want to
download the trail version and give it a shot. from the data it looks
like a lot of objects are promoted to old memory from heap. It doesn't
necessarily constitute a memory leak though. if you use a lot of static
variables, that could easily account for objects getting promoted to old
memory

peter



John Trollinger wrote:
 
 When I run the examples with -verbose:gc this is what I get (just the
 snippits at the end)
 
 From uncompiled jsp pages
 
 [GC 14707K-13665K(28412K), 0.0059002 secs]
 [GC 15521K-15518K(28412K), 0.0128997 secs]
 [GC 17374K-16086K(28412K), 0.0092266 secs]
 [GC 17942K-16258K(28412K), 0.0086307 secs]
 [GC 18114K-16213K(28412K), 0.0046327 secs]
 [GC 18069K-17934K(28412K), 0.0114056 secs]
 [GC 19790K-19672K(28412K), 0.0155838 secs]
 
 Did you see me on the stderr window?
 
 Did you see me on the browser window as well?
 
 [GC 21520K-20092K(28412K), 0.0094920 secs]
 [GC 21947K-20095K(28412K), 0.0075890 secs]
 [GC 21951K-21758K(28412K), 0.0131385 secs]
 [GC 23614K-23528K(28412K), 0.0137372 secs]
 [GC 25384K-23769K(28412K), 0.0079125 secs]
 [GC 25625K-24336K(28412K), 0.0073652 secs]
 [GC 26192K-26170K(28412K), 0.0153369 secs]
 [GC 28026K-27460K(29436K), 0.0190963 secs]
 [Full GC 27460K-15538K(29436K), 0.2839948 secs]
 [GC 17394K-15720K(28412K), 0.0060262 secs]
 [GC 17575K-15746K(28412K), 0.0046218 secs]
 [GC 17602K-15745K(28412K), 0.0027241 secs]
 [GC 17601K-15745K(28412K), 0.0025604 secs]
 [GC 17601K-15746K(28412K), 0.0026679 secs]
 Stopping service Tomcat-Standalone
 
 From compiled jsp pages
 
 [GC 11356K-10577K(14028K), 0.0061505 secs]
 [GC 11532K-11034K(14028K), 0.0046978 secs]
 [GC 11994K-11305K(14028K), 0.0060575 secs]
 [GC 12265K-11341K(14028K), 0.0059876 secs]
 [GC 12297K-11396K(14028K), 0.0065578 secs]
 [GC 12356K-11538K(14028K), 0.0063572 secs]
 [GC 12498K-11598K(14028K), 0.0040036 secs]
 [GC 12558K-11965K(14028K), 0.0052529 secs]
 
 Did you see me on the stderr window?
 
 Did you see me on the browser window as well?
 
 [GC 12925K-12020K(14028K), 0.0046872 secs]
 Stopping service Tomcat-Standalone
 
 As you can see there is about a 4 meg diff between the two
 
 This is using j2sdk 1.4.1 on windows XP with 512 ram using tomcat
 4.1.14LE


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




RE: Javac memory leak

2002-11-21 Thread John Trollinger
This is the examples with the install..

What I don't understand is why there is a difference when compiled vs
uncompiled and the diff is always there.

When we run our tests if our jsp pages are uncompiled the diff is about
170 meg.. That is what causes me to be a little nervous.

I will try optimizeit and see what it shows.. Thanks for all your time..

John

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 21, 2002 11:36 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 This is from the examples jsp right? or are they from your webapp?
 
 the latest optimizeit has a leak finder feature. you may want 
 to download the trail version and give it a shot. from the 
 data it looks like a lot of objects are promoted to old 
 memory from heap. It doesn't necessarily constitute a memory 
 leak though. if you use a lot of static variables, that could 
 easily account for objects getting promoted to old memory
 
 peter
 
 
 
 John Trollinger wrote:
  
  When I run the examples with -verbose:gc this is what I get 
 (just the 
  snippits at the end)
  
  From uncompiled jsp pages
  
  [GC 14707K-13665K(28412K), 0.0059002 secs]
  [GC 15521K-15518K(28412K), 0.0128997 secs]
  [GC 17374K-16086K(28412K), 0.0092266 secs]
  [GC 17942K-16258K(28412K), 0.0086307 secs]
  [GC 18114K-16213K(28412K), 0.0046327 secs]
  [GC 18069K-17934K(28412K), 0.0114056 secs]
  [GC 19790K-19672K(28412K), 0.0155838 secs]
  
  Did you see me on the stderr window?
  
  Did you see me on the browser window as well?
  
  [GC 21520K-20092K(28412K), 0.0094920 secs]
  [GC 21947K-20095K(28412K), 0.0075890 secs]
  [GC 21951K-21758K(28412K), 0.0131385 secs]
  [GC 23614K-23528K(28412K), 0.0137372 secs]
  [GC 25384K-23769K(28412K), 0.0079125 secs]
  [GC 25625K-24336K(28412K), 0.0073652 secs]
  [GC 26192K-26170K(28412K), 0.0153369 secs]
  [GC 28026K-27460K(29436K), 0.0190963 secs]
  [Full GC 27460K-15538K(29436K), 0.2839948 secs]
  [GC 17394K-15720K(28412K), 0.0060262 secs]
  [GC 17575K-15746K(28412K), 0.0046218 secs]
  [GC 17602K-15745K(28412K), 0.0027241 secs]
  [GC 17601K-15745K(28412K), 0.0025604 secs]
  [GC 17601K-15746K(28412K), 0.0026679 secs]
  Stopping service Tomcat-Standalone
  
  From compiled jsp pages
  
  [GC 11356K-10577K(14028K), 0.0061505 secs]
  [GC 11532K-11034K(14028K), 0.0046978 secs]
  [GC 11994K-11305K(14028K), 0.0060575 secs]
  [GC 12265K-11341K(14028K), 0.0059876 secs]
  [GC 12297K-11396K(14028K), 0.0065578 secs]
  [GC 12356K-11538K(14028K), 0.0063572 secs]
  [GC 12498K-11598K(14028K), 0.0040036 secs]
  [GC 12558K-11965K(14028K), 0.0052529 secs]
  
  Did you see me on the stderr window?
  
  Did you see me on the browser window as well?
  
  [GC 12925K-12020K(14028K), 0.0046872 secs]
  Stopping service Tomcat-Standalone
  
  As you can see there is about a 4 meg diff between the two
  
  This is using j2sdk 1.4.1 on windows XP with 512 ram using tomcat 
  4.1.14LE
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




RE: Javac memory leak

2002-11-21 Thread John Trollinger
Well d/l optimizeit and realized it would take a few weeks for me to
understand what it is trying to tell me..



 Just to double check against tomcat 4.1.12, the memory usage 
 seems normal to me John.  After tomcat starts up, it is using 
 23megs.  My webapp loads when tomcat starts up, so your 
 numbers may be lower.  The system has 256megs of memory and 
 750mhz cpu.
 
 after I I hit all the pages in /examples/jsp/ directory, the 
 memory allocated to java is 40megs.

Peter, did you try it with the examples compiled and then uncompiled and
get the same results.. Or did you just run them once??

 
 I even ran it with OptimizeIt and I don't see any memory leaks.
 
 peter


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




Re: Javac memory leak

2002-11-20 Thread peter lin

I haven't seen the memory leak on solaris or windows, but isn't the leak
only on linux?

I thought jasper2 fixes the problem with com.sun.tools.javac.Main since
it uses the system native javac?


peter


John Trollinger wrote:
 
 Does anyone know if the javac memory leak still exists (1.4.1 docs say
 it does not).
 
 I have a test the goes through a bunch of jsp pages and if they are not
 precompiled I get a out of memory exception.
 
 Thanks,
 
 John
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: Javac memory leak

2002-11-20 Thread John Trollinger
We are using Tomcat 4.1.12 on windows and when running an automated test
that navigates through a set of about 75 jsp pages (they have includes
in them that kick of more compiles) it gets a OutOfMemoryException
halfway through the compile.  Our system is quite complex so I don't
know if I can get an example of this..  

John

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 20, 2002 9:43 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 I haven't seen the memory leak on solaris or windows, but 
 isn't the leak only on linux?
 
 I thought jasper2 fixes the problem with 
 com.sun.tools.javac.Main since it uses the system native javac?
 
 
 peter
 
 
 John Trollinger wrote:
  
  Does anyone know if the javac memory leak still exists 
 (1.4.1 docs say 
  it does not).
  
  I have a test the goes through a bunch of jsp pages and if they are 
  not precompiled I get a out of memory exception.
  
  Thanks,
  
  John
  
  --
  To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
  For 
 additional commands, 
 e-mail: 
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Javac memory leak

2002-11-20 Thread peter lin

Hmm, that sounds bizzare.  I'm been using/testing 4.1.10-4.1.12 on both
solaris and windows with jdk1.4.1.  I've ran several stress test using
JMeter simulating light to medium (64 concurrent connections) load for
1-10K requests without any problems. My pages are heavy on JSTL, so they
are fairly heavy weight.

Even when I run stress tests with 5K unique requests for 10K+ requests,
I haven't seen memory leaks. the number of JSP range in 100-200 range.

peter


John Trollinger wrote:
 
 We are using Tomcat 4.1.12 on windows and when running an automated test
 that navigates through a set of about 75 jsp pages (they have includes
 in them that kick of more compiles) it gets a OutOfMemoryException
 halfway through the compile.  Our system is quite complex so I don't
 know if I can get an example of this..
 
 John


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




RE: Javac memory leak

2002-11-20 Thread John Trollinger
If the pages are precompiled I do not have any problems at all, it is
only when the jsp cache has been deleted that this shows up.  

John

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 20, 2002 9:57 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 Hmm, that sounds bizzare.  I'm been using/testing 
 4.1.10-4.1.12 on both solaris and windows with jdk1.4.1.  
 I've ran several stress test using JMeter simulating light to 
 medium (64 concurrent connections) load for 1-10K requests 
 without any problems. My pages are heavy on JSTL, so they are 
 fairly heavy weight.
 
 Even when I run stress tests with 5K unique requests for 10K+ 
 requests, I haven't seen memory leaks. the number of JSP 
 range in 100-200 range.
 
 peter
 
 
 John Trollinger wrote:
  
  We are using Tomcat 4.1.12 on windows and when running an automated 
  test that navigates through a set of about 75 jsp pages (they have 
  includes in them that kick of more compiles) it gets a 
  OutOfMemoryException halfway through the compile.  Our 
 system is quite 
  complex so I don't know if I can get an example of this..
  
  John
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Javac memory leak

2002-11-20 Thread peter lin

by any chance do you have multiple webapps or just one?  in my case, I
only have one webapp which has some services it loads when tomcat
starts. All of my pages are dynamic with all the text in
resourceBundles. The dynamic data is retrieved from a middle layer in
XML format. JSTL is used to get text from resourceBundles and parse the
XML.

I'm on win2K also.

peter


John Trollinger wrote:
 
 If the pages are precompiled I do not have any problems at all, it is
 only when the jsp cache has been deleted that this shows up.
 
 John
 
  -Original Message-
  From: peter lin [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, November 20, 2002 9:57 AM
  To: Tomcat Developers List
  Subject: Re: Javac memory leak
 
 
 
  Hmm, that sounds bizzare.  I'm been using/testing
  4.1.10-4.1.12 on both solaris and windows with jdk1.4.1.
  I've ran several stress test using JMeter simulating light to
  medium (64 concurrent connections) load for 1-10K requests
  without any problems. My pages are heavy on JSTL, so they are
  fairly heavy weight.
 
  Even when I run stress tests with 5K unique requests for 10K+
  requests, I haven't seen memory leaks. the number of JSP
  range in 100-200 range.
 
  peter
 
 
  John Trollinger wrote:
  
   We are using Tomcat 4.1.12 on windows and when running an automated
   test that navigates through a set of about 75 jsp pages (they have
   includes in them that kick of more compiles) it gets a
   OutOfMemoryException halfway through the compile.  Our
  system is quite
   complex so I don't know if I can get an example of this..
  
   John
  
 
  --
  To unsubscribe, e-mail:
  mailto:tomcat-dev- [EMAIL PROTECTED]
  For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: Javac memory leak

2002-11-20 Thread John Trollinger
We have 2, one is webdav and the other is our actual application.  We
use a lot of custom tags and a lot of both types of includes (when I say
a lot we have jsp pages that include over 500 other jsp pages, and no,
this is not my design :) )

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 20, 2002 10:12 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 by any chance do you have multiple webapps or just one?  in 
 my case, I only have one webapp which has some services it 
 loads when tomcat starts. All of my pages are dynamic with 
 all the text in resourceBundles. The dynamic data is 
 retrieved from a middle layer in XML format. JSTL is used to 
 get text from resourceBundles and parse the XML.
 
 I'm on win2K also.
 
 peter
 
 
 John Trollinger wrote:
  
  If the pages are precompiled I do not have any problems at 
 all, it is 
  only when the jsp cache has been deleted that this shows up.
  
  John
  
   -Original Message-
   From: peter lin [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, November 20, 2002 9:57 AM
   To: Tomcat Developers List
   Subject: Re: Javac memory leak
  
  
  
   Hmm, that sounds bizzare.  I'm been using/testing 
 4.1.10-4.1.12 on 
   both solaris and windows with jdk1.4.1. I've ran several 
 stress test 
   using JMeter simulating light to medium (64 concurrent 
 connections) 
   load for 1-10K requests without any problems. My pages 
 are heavy on 
   JSTL, so they are fairly heavy weight.
  
   Even when I run stress tests with 5K unique requests for 10K+ 
   requests, I haven't seen memory leaks. the number of JSP range in 
   100-200 range.
  
   peter
  
  
   John Trollinger wrote:
   
We are using Tomcat 4.1.12 on windows and when running an 
automated test that navigates through a set of about 75 
 jsp pages 
(they have includes in them that kick of more compiles) 
 it gets a 
OutOfMemoryException halfway through the compile.  Our
   system is quite
complex so I don't know if I can get an example of this..
   
John
   
  
   --
   To unsubscribe, e-mail:
   mailto:tomcat-dev- [EMAIL PROTECTED]
   For
   additional commands,
   e-mail: mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
  For 
 additional commands, 
 e-mail: 
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Javac memory leak

2002-11-20 Thread peter lin


John Trollinger wrote:
 
 We have 2, one is webdav and the other is our actual application.  We
 use a lot of custom tags and a lot of both types of includes (when I say
 a lot we have jsp pages that include over 500 other jsp pages, and no,
 this is not my design :) )
 
 

I'm guessing there's some memory leak in one of the custom tags some
where.  early in the development of the project I did have memory leaks,
but it was a bug in our code. Once I looked at the number of threads
running and the GC output, it was obvious our custom tag was the cause.

In my particular case, the connection to the middle layer wasn't getting
garbaged immediately. Once I fixed that, my memory leak went away. could
be something as simple as a tag.release() not releasing correctly :)

peter

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




RE: Javac memory leak

2002-11-20 Thread John Trollinger
But that would not account for the leak only occuring when pages need a
compile.  If the pages are compiled I never see the leak.

 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 20, 2002 10:43 AM
 To: Tomcat Developers List
 Subject: Re: Javac memory leak
 
 
 
 
 John Trollinger wrote:
  
  We have 2, one is webdav and the other is our actual 
 application.  We 
  use a lot of custom tags and a lot of both types of 
 includes (when I 
  say a lot we have jsp pages that include over 500 other jsp 
 pages, and 
  no, this is not my design :) )
  
  
 
 I'm guessing there's some memory leak in one of the custom 
 tags some where.  early in the development of the project I 
 did have memory leaks, but it was a bug in our code. Once I 
 looked at the number of threads running and the GC output, it 
 was obvious our custom tag was the cause.
 
 In my particular case, the connection to the middle layer 
 wasn't getting garbaged immediately. Once I fixed that, my 
 memory leak went away. could be something as simple as a 
 tag.release() not releasing correctly :)
 
 peter
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Javac memory leak

2002-11-20 Thread peter lin

you never know.  if it's a slow leak, precompiled pages may not exhibit
the leak. I only discovered the leak in our custom tag when I put the
app under moderate/medium load. Under light load the bug wasn't
apparent.

I'm guessing if you hit each page individuall slowly, the bug doesn't
appear. If that's the case, a slow leak may be cause. in my case a slow
leak + load was required to expose the bug.


peter

John Trollinger wrote:
 
 But that would not account for the leak only occuring when pages need a
 compile.  If the pages are compiled I never see the leak.
 


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




Re: Javac memory leak

2002-11-20 Thread Holger Brozio
I also have no memory leak problems now with Tomcat 4.1.12.
But i'm using jikes instead of javac as jsp page compiler.

Whats about switching to jikes. If the memory leak problem is gone
with jikes, javac still leaks memory, otherwise it is a problem in the jsp
pages.

Cheers

Holger
- Original Message -
From: John Trollinger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:39 PM
Subject: Javac memory leak


 Does anyone know if the javac memory leak still exists (1.4.1 docs say
 it does not).

 I have a test the goes through a bunch of jsp pages and if they are not
 precompiled I get a out of memory exception.


 Thanks,

 John


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



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




Re: Javac memory leak

2002-11-20 Thread Jon Scott Stevens
on 2002/11/20 7:34 AM, John Trollinger [EMAIL PROTECTED] wrote:

 We have 2, one is webdav and the other is our actual application.  We
 use a lot of custom tags and a lot of both types of includes (when I say
 a lot we have jsp pages that include over 500 other jsp pages, and no,
 this is not my design :) )

Yea, most people blame bad JSP design on others. I blame it on Sun. =)

-jon

-- 
StudioZ.tv /\ Bar/Nightclub/Entertainment
314 11th Street @ Folsom /\ San Francisco
http://studioz.tv/


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