Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 78319 invoked from network); 2 Feb 2011 13:56:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 13:56:41 -0000 Received: (qmail 38835 invoked by uid 500); 2 Feb 2011 13:56:38 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38382 invoked by uid 500); 2 Feb 2011 13:56:34 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 38371 invoked by uid 99); 2 Feb 2011 13:56:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 13:56:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of brett.dellegrazie@gmail.com designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 13:56:28 +0000 Received: by pzk2 with SMTP id 2so1840546pzk.18 for ; Wed, 02 Feb 2011 05:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=CSxetUEk4/yl7LTcIL+usKmab747ddHug+upZHAvR1I=; b=YKBipjppKzZpqWov6FUt/PTRQIDOX1x9nmXJ9X8A9FX5ejcN4pUpCR1c0sp4oIPHKI l0x1HET6HyPhql301gGFwtLQoK0G57pZimZp4V2L06rAVNfBr3UnpWnQ499X+txN7NdO 9rQStHtPuVHullwfSLnMC9ApSR+ztof+xPVF0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=oDBoV92w8z+sgqU89/xCmj4COzO0u4U5kkrPxxMKHccoHsvB6FRRDtEIqa6ldDEe6K K63DsH74kzhdeo1lq0jzWxQNtTPT440M5HdgvSEXfKkEnbvk43kWHSDjZO1zhqYa4yCe FZL5sCrcKaSfvo2Q6Iem8ajJ+YOSAPRaSqQCs= MIME-Version: 1.0 Received: by 10.142.47.21 with SMTP id u21mr8748552wfu.443.1296654967251; Wed, 02 Feb 2011 05:56:07 -0800 (PST) Received: by 10.142.241.6 with HTTP; Wed, 2 Feb 2011 05:56:07 -0800 (PST) Reply-To: bdellegrazie@iee.org In-Reply-To: References: <99C8B2929B39C24493377AC7A121E21F9A47ACF53F@USEA-EXCH8.na.uis.unisys.com> <99C8B2929B39C24493377AC7A121E21F9A47B25EBD@USEA-EXCH8.na.uis.unisys.com> Date: Wed, 2 Feb 2011 13:56:07 +0000 Message-ID: Subject: Re: Optimize CPU Hogging Tomcat 6 From: Brett Delle Grazie To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Hi, On 2 February 2011 13:21, jan gestre wrote: > Hi Olaf and Brett, > > I already made those changes similar to what is mentioned here --> > http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g, > it appears that the changes improved the performance, the system no > longer chokes. However I still want to optimize other settings like > JVM configuration to further enhance systems performance, > unfortunately I have where to find the JVM config. It depends whether you're using the RedHat supplied (or EPEL) tomcat RPM or a download from Apache. (a) downloaded from Apache (I use this): Read the RUNNING.TXT (for background info). JVM configuration for Tomcat is usually in setenv.sh which is normally in: $CATALINA_BASE/bin/setenv.sh (CATALINA_BASE == CATALINA_HOME by default) (b) RHEL5 supplied RPM Environment variables are configured in the file: /etc/sysconfig/tomcat In either case, the environment variables you need to set are: CATALINA_OPTS: used during START only JAVA_OPTS: used during both START and STOP operations. Normally JVM heap size, GC logging etc are set in CATALINA_OPTS since they are only valid on START operations. The only thing I normally place in JAVA_OPTS is: -Djava.awt.headless=true and library path (if running on X86_64 systems) Sample setenv.sh is included below (X86_64, RHEL5, Tomcat 6.0.30) YMMV: In my configuration I have simple wrapper start/stop scripts that set the following environment variables prior to calling catalina.sh start / stop. This permits multiple Tomcat instances on a single server. Very difficult to do with stock RHEL5 Tomcat RPM CATALINA_HOME=/opt/tomcat6 (points to where binaries are installed) CATALINA_BASE=/home/tomcat/tc1 (points to instance) CATALINA_PID=${CATALINA_BASE}/temp/tomcat.pid -- ${CATALINA_BASE}/bin/setenv.sh -- CATALINA_OPTS="-d64 -Xmx2048m -XX:MaxPermSize=384m \ -Dcom.sun.management.snmp.port= \ ... other jmxremote / snmp parameters as needed \ -verbose:gc -Xloggc:${CATALINA_BASE}/logs/gc.log \ -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps \ -XX:HeapDumpPath=${CATALINA_BASE}/temp \ -XX:+HeapDumpOnOutOfMemoryError \ -Dorg.apache.catalina.startup.EXIT_ON_INIT_FAILURE=true \ -DjvmRoute=jvm1" JAVA_HOME=/usr/lib/jvm/java JAVA_OPTS="-Djava.awt.headless=true -Djava.library.path=/usr/lib64" Good luck! > > Cheers! > > Jan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- Best Regards, Brett Delle Grazie --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org