Hi,

If it is running on a machine with multiple CPUs, you can use the concurrent
collector.  The collector then runs on one of the CPUs while the application
continues to run on the others, the other threads will still be suspended
for a short period (during the marking phase) but it can be an improvement.
Note that there is a trade-off in that the collection will typically take
longer.

First things first though, you should tune the size of the total heap and,
importantly, the size of your young generation.  This has a very large
impact on garbage collection performance.  You will of course have to
profile you app and test extensively to find the best settings for your
application.

I found the following links to be helpful:

http://ph.sun.com/events/presentation/files/java_tech_day/hotspotperformance
.pdf

http://www1.sitraka.com/JUG/meetings/presentations/sep02/JUG%20Sept%202002.P
PT

http://java.sun.com/docs/hotspot/PerformanceFAQ.html

http://www.javaperformancetuning.com/news/qotm026.shtml

http://www.run.montefiore.ulg.ac.be/~skivee/java-perf/j2se141-gc-options.php

http://java.sun.com/developer/technicalArticles/Programming/GCPortal/

http://java.sun.com/docs/hotspot/gc1.4.2/index.html

http://java.sun.com/developer/technicalArticles/Programming/turbo/

http://www.javaworld.com/javaworld/jw-03-2003/jw-0307-j2segc.html

http://performance.netbeans.org/reports/gc/

http://www.tagtraum.com/

http://jakarta.apache.org/tomcat/articles/performance.pdf

Regards,
Ryan.


-----Original Message-----
From: Wojciech Sobczuk [mailto:[EMAIL PROTECTED]
Sent: 13 May 2004 17:51
To: Tomcat Users List
Subject: Re: Tomcat having strange 'hickups'


It is possible.  Any nice website about tuning the garbage collector?  
How to make it so it seamlessly works in the background and does not 
halt the whole server?

Best reagards,
Wojtek

Michiel Toneman wrote:

>
> Are you sure this isn't related to heavy garbage collection in the JVM?
>
> jvmstat has some good tools to monitor memory usage an garbage 
> collection in your app.
>
> Michiel
>
> Wojciech Sobczuk wrote:
>
>> Hello,
>>
>> I'm running Tomcat 5.0.18 on RedHat 9, started with the following 
>> commandline:
>> /usr/java/j2sdk1.4.2_01//bin/java -Xmx256m -server 
>> -Djava.endorsed.dirs=/usr/java/jakarta-tomcat/common/endorsed 
>> -classpath 
>>
/usr/java/j2sdk1.4.2_01//lib/tools.jar:/usr/java/jakarta-tomcat/bin/bootstra
p.jar:/usr/java/jakarta-tomcat/bin/commons-logging-api.jar 
>> -Dcatalina.base=/usr/java/jakarta-tomcat 
>> -Dcatalina.home=/usr/java/jakarta-tomcat 
>> -Djava.io.tmpdir=/usr/java/jakarta-tomcat/temp 
>> org.apache.catalina.startup.Bootstrap start
>>
>> and with development=false and fork=true in the jsp servlet 
>> configuration.
>>
>> This installation is serving around 200000 hits per day, much of it 
>> is DB intensive.  Before i set development=false and fork=true I had 
>> big hangups when I changed the JSPs and Tomcat started recompiling 
>> them - the whole engine practically stopped for a few minutes and the 
>> load went up to 16 on the server.  Now development and fork variables 
>> are set correctly for deployment, but I am still having a strange 
>> problem.  Every now and then (probably every few hours, I can't tell 
>> exactly) Tomcat stops for around 20 seconds.  I noticed it when 
>> browsing one of my sites, everything was working fast, and then at a 
>> certain point, after I clicked on a link, the browser started 
>> connecting to the server and waited for the response for a long 
>> time.  When I checked the load on the box it was 1-2 (normally it's 
>> 0.5), but didn't notice any processes hogging the CPU with 'top'.  I 
>> already fixed all DB connection leaks I had so that can't be the 
>> issue here.  Traffic peaks can't be it either, I have constant traffic.
>>
>> I know that this isn't a precise description of the error I'm 
>> encountering but I don't have any more information at this point.  
>> I'm hoping that someone encountered this already and can help me, or 
>> perhaps you can give me directions how to figure out what's wrong.
>>
>> Best regards,
>> W. Sobczuk
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>

-- 
Wojciech Sobczuk
[EMAIL PROTECTED]
+48 501 456 923


---------------------------------------------------------------------
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]

Reply via email to