Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 10951 invoked from network); 26 Jan 2010 15:39:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2010 15:39:02 -0000 Received: (qmail 49954 invoked by uid 500); 26 Jan 2010 15:38:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 49890 invoked by uid 500); 26 Jan 2010 15:38:58 -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 49877 invoked by uid 99); 26 Jan 2010 15:38:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 15:38:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.61.61.109] (HELO usea-naimss4.unisys.com) (192.61.61.109) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 15:38:45 +0000 Received: from usea-nagw2.na.uis.unisys.com ([129.224.72.18]) by usea-naimss4 with InterScan Message Security Suite; Tue, 26 Jan 2010 09:38:23 -0600 Received: from usea-nagw2.na.uis.unisys.com ([129.224.72.53]) by usea-nagw2.na.uis.unisys.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 26 Jan 2010 09:38:22 -0600 Received: from usea-nahubcas1.na.uis.unisys.com ([129.224.76.114]) by usea-nagw2.na.uis.unisys.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 26 Jan 2010 09:38:22 -0600 Received: from USEA-EXCH8.na.uis.unisys.com ([129.224.76.42]) by usea-nahubcas1.na.uis.unisys.com ([129.224.76.114]) with mapi; Tue, 26 Jan 2010 09:38:22 -0600 From: "Caldarale, Charles R" To: Tomcat Users List Date: Tue, 26 Jan 2010 09:38:18 -0600 Subject: RE: Tomcat 100% CPU usage after moving from Java 5 to 6 Thread-Topic: Tomcat 100% CPU usage after moving from Java 5 to 6 Thread-Index: AcqeZH/CZT5zEwNsS7O2ZFwfKRiAIwAMHwdg Message-ID: <99C8B2929B39C24493377AC7A121E21F96841B3D26@USEA-EXCH8.na.uis.unisys.com> References: <2A999A47A42ED94185DCE3BE09C3938E05CBE121@AURORA.nl.indicia.org> <4B5D7CF9.4070908@pidster.com> <327858f41001250331h1eb19359h3afee56d8a25e5c0@mail.gmail.com> <27305988.post@talk.nabble.com> <27306041.post@talk.nabble.com> <327858f41001250501y660b837dr6a387a918d11fa1c@mail.gmail.com> <27306543.post@talk.nabble.com> <27319482.post@talk.nabble.com> In-Reply-To: <27319482.post@talk.nabble.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 26 Jan 2010 15:38:22.0679 (UTC) FILETIME=[97C4C670:01CA9E9D] X-Virus-Checked: Checked by ClamAV on apache.org > From: Jesse Klaasse [mailto:jesse.klaasse@indicia.nl] > Subject: Re: Tomcat 100% CPU usage after moving from Java 5 to 6 >=20 > I found the following article particularly useful: > http://confluence.atlassian.com/display/DOC/Garbage+Collector+Performance= +Issues Unfortunately, that article is so full of mistaken assumptions and outright= errors that it must be taken with a large chunk of salt. There are some g= ood things in it, but also a lot of rubbish. Among other things, the autho= r is obviously unaware of how paging systems work, confusing contiguous vir= tual memory (required for the heap) with contiguous real memory (not requir= ed at all). =20 > -XX:+UseConcMarkSweepGC This will reduce overall throughput, but also reduce the GC pause time. (G= C pause time is pretty small even without that parameter these days.) It d= oes make the GC threads do a lot more work, but you appear to have CPU time= to burn. >-XX:+UseTLAB This has been the default for quite a few years now, so it's unnecessary to= specify it. >-XX:+CMSClassUnloadingEnabled The above slows down CMS collections. You can leave it off if you never up= date JSPs on the fly, or redeploy webapps without a Tomcat restart. >-XX:+CMSPermGenSweepingEnabled The above is the old name for CMSClassUnloadingEnabled and should not be us= ed. >-XX:+DisableExplicitGC Always a good idea to set the above. >-XX:NewSize=3D4096m I would be wary of setting the above parameter, preferring to let the JVM d= etermine the value as needed. JDK/JRE 6 is much better at reacting to dyna= mic changes in workload than 1.4 was. >-Xms10240m -Xmx10240m That's a very large heap; shouldn't hurt as long as you have enough RAM to = support it all without paging. (But see below for use with compressed OOPs= .) > Tomcat's CPU usage seems significantly lower than before=20 > (it's average seems about 10% now - which was 30-40% before) There are some improvements in the JDK/JRE 6 JIT and synchronization handli= ng, but probably not enough to account for that large a difference. > I also added the -XX:+UseCompressedOops JVM option Be careful with that; it can impact CPU usage, since the compressed OOPs ha= ve to be expanded into actual pointers every time they're used, and pointer= s compressed when stored in a field. Works best with heap sizes less than = 4 GB, which avoids the decoding/encoding. For a real explanation of compre= ssed OOPs, look here: http://wikis.sun.com/display/HotSpotInternals/CompressedOops - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MA= TERIAL and is thus for use only by the intended recipient. If you received = this in error, please contact the sender and delete the e-mail and its atta= chments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org