Re: Tomcat having strange 'hickups'
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/bootstrap.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 20 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] -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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/bootstrap.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 20 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]
Re: Tomcat having strange 'hickups'
On Thu, May 13, 2004 at 06:51:15PM +0200, Wojciech Sobczuk wrote: : Any nice website about tuning the garbage collector? Um, Google? Sun's website should have, in the very least, docs on the types of GC algorithms available and how to invoke them. : How to make it so it seamlessly works in the background and does not : halt the whole server? That depends on which GC algo you choose, which, in turn, depends on heap analysis from profiling. -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]
RE: Tomcat having strange 'hickups'
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 20 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]
RE: Tomcat having strange 'hickups'
Hi, It might be a big full garbage collection. Add -verbose:gc to your startup JVM options. Use the system normally, and check the console log as soon as you have one of those 20-second pauses. If it says something like [Full GC: XXX - YYY (20 sec)] then that's the culprit. You will need to tune your GC parameters for this high a load anyways. Yoav Shapira Millennium Research Informatics -Original Message- From: Wojciech Sobczuk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 6:03 AM To: [EMAIL PROTECTED] Subject: Tomcat having strange 'hickups' 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/bootstrap.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 20 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]