Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF2479F7F for ; Fri, 13 Apr 2012 02:10:05 +0000 (UTC) Received: (qmail 3768 invoked by uid 500); 13 Apr 2012 02:10:02 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 3716 invoked by uid 500); 13 Apr 2012 02:10:02 -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 3706 invoked by uid 99); 13 Apr 2012 02:10:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 02:10:02 +0000 X-ASF-Spam-Status: No, hits=4.7 required=5.0 tests=FREEMAIL_FORGED_REPLYTO,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.139.91.100] (HELO nm30.bullet.mail.sp2.yahoo.com) (98.139.91.100) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 Apr 2012 02:09:54 +0000 Received: from [98.139.91.62] by nm30.bullet.mail.sp2.yahoo.com with NNFMP; 13 Apr 2012 02:09:33 -0000 Received: from [98.139.91.54] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 13 Apr 2012 02:09:33 -0000 Received: from [127.0.0.1] by omp1054.mail.sp2.yahoo.com with NNFMP; 13 Apr 2012 02:09:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 546535.76712.bm@omp1054.mail.sp2.yahoo.com Received: (qmail 9799 invoked by uid 60001); 13 Apr 2012 02:09:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1334282973; bh=wWNsBjmwWI0jMhy/5ScHVkiCtfFyPegx7RdR9aynyLE=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=W1OEVQ9xjrkiJfQFZXCWqYA7+3/W5HONLcdAZAKjfUPCH4ars1HVrKbeRE55cli55B9Twr8vAb1mZGA7fXgOqmxOkaWo87Ef4vEyhJoD7gaH+bjGBe4MYVrxJIMrpKcTGcPP6IkopEtpYGtcycMm9ADrKpedNpeoXrSCGXFxgTc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=DPJZnGghaxYVzVwu0i19ILnbtodcxMYT1np3dcmFbBuJYdlFVgeK4LgFkR2oq9u0svfkH90Ygd9a204RVS/JesAWPN0n4Sd22pDVt+UY0cNOohiLgu5/HHMrWoihgfkeQjlaxLqxDw4ArUI0eIxDuqvyrhV5cAjZ7w13SHKMUfM=; X-YMail-OSG: rMoCFZwVM1m_SQ2HjgIyAcQ6zVHBVDMDwJsRNCod.GJY9.F 6Go3TVp9p3ntgYfeewzIeh2LMw2kVdS_ORKsfFL2M5KIWLfBHZH_L5nHY_OI IFqV3y_gA5chHEe95nseiLCDWBZ3Dfx.zP2yXtuPcQEn4JV_VwiqA8jwdrbE E9uLHxkfpmIyGXfnlxTI0KBnTsdFnCrqLINTMjAS7ZC1phqJIjzMdnSNWI09 Gilt01nYrUs4dmffT1xRzU_WUTZX1tRyseO8h45lbCKdANy9UiGNGsgJO93z CYLMwq0GlRgedck2S6mpBRKuKT9bbVSizZFqVK8qy36.TIO4JjsfG6aF1RMv nB97ic3oFWfubWm5JDB97I55pxExDwaFxZW9OuQHkMGfoAck1spGo21OYw2e E_AAm15WZaiupPU3BqTkQj2cgWZvyff_mPu5_9wYPmSx4kruRdFux.ejVoji tQt4JHJbLBQZOPTY- Received: from [64.102.249.9] by web110402.mail.gq1.yahoo.com via HTTP; Thu, 12 Apr 2012 19:09:32 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <1334112426.9730.YahooMailMobile@web110413.mail.gq1.yahoo.com> <4F854E8C.4070003@pidster.com> Message-ID: <1334282972.92558.YahooMailNeo@web110402.mail.gq1.yahoo.com> Date: Thu, 12 Apr 2012 19:09:32 -0700 (PDT) From: Peter Reply-To: Peter Subject: Re: 7.0.25 to 7.0.27 requires -Xmx32m to go to -Xmx512m To: Tomcat Users List In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1756932851-1956628944-1334282972=:92558" X-Virus-Checked: Checked by ClamAV on apache.org --1756932851-1956628944-1334282972=:92558 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the response Mark - it is consistent with both observations that= i noted in the original email (heap post startup was near 0, and disabling= scanning resolves). I looked in the changelog in 26/27 and did not see any= thing in there that fits this?=A0 If your hypothesis is correct , I suspect= quite a few people will be in for a shock when they deploy 7.0.27 or later= into a production env where memory footprints are much more managed then s= ay in eclipse on your desktop ;)=0A=0AThe issue might not be with the spec,= but the tomcat implementation where by everything is getting loaded into r= am during scanning. In 7.0.25 - I could start a "typical" Spring applicatio= n in 32mb. 7.0.27 requires 512mb? =0A=0A=0A- Peter=0A=0A=0A=0A_____________= ___________________=0A From: Mark Thomas =0ATo: Tomcat Us= ers List =0ASent: Wednesday, April 11, 2012 6:50 = AM=0ASubject: Re: 7.0.25 to 7.0.27 requires -Xmx32m to go to -Xmx512m=0A = =0A=0A=0APid wrote:=0A=0A>On 11/04/2012 03:47, Peter wrot= e:=0A>> hey Christopher,=0A>> =0A>> the app I used that uncovered the issue= is one I use exclusively to=0A>validate tomcat releases;) it is a "hello w= orld" style app using=0A>spring/servlet3.0. it has simple spring aop point = cutting via jamon ,=0A>simple spring jms (active mq) simple spring jaxrs, s= imple spring jaxws,=0A>simple spring mvc, simple spring security,... (sprin= g 3.0.7)=0A>> =0A>> bunch of very simple examples that end up pulling in "m= any" jars.=0A>=0A>Can you post it to github or somewhere public?=0A>=0A>=0A= >p=0A>=0A>=0A>> I will grab a dump tomorrow,=A0 thanks for response,=0A>> p= eter=0A=0AI know exactly where this memory is going. During the scanning pr= ocess Tomcat has to scan every single class in the application and its libr= aries and every class and interface in that class's hierarchy for annotatio= ns (we don't have a choice in this - the spec requires it). This can lead t= o the same class being scanned many times during startup and that is slow. = Tomcat now caches the result of scanning a class which means each class onl= y has to be scanned once. However, this does mean that all the results are = in memory until the scan is complete. If you have a lot of libraries, that = could require a lot of memory. If you know a JAR doesn't need scanning, add= it to the jarsToSkip property. If it is a popular jar then create an enhan= cement request and we'll add it to the default list. The other option is to= set metadata complete in the web.xml=0A=0AI haven't reviewed the scanning = caching code but there may be some opportunities to reduce the memory footp= rint of the cache.=0A=0AMark=0A=0A=0A--------------------------------------= -------------------------------=0ATo unsubscribe, e-mail: users-unsubscribe= @tomcat.apache.org=0AFor additional commands, e-mail: users-help@tomcat.apa= che.org --1756932851-1956628944-1334282972=:92558--