Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 36716 invoked from network); 4 Nov 2004 17:33:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Nov 2004 17:33:03 -0000 Received: (qmail 61972 invoked by uid 500); 4 Nov 2004 17:32:34 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 61926 invoked by uid 500); 4 Nov 2004 17:32:34 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 61911 invoked by uid 99); 4 Nov 2004 17:32:33 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [171.71.176.71] (HELO sj-iport-2.cisco.com) (171.71.176.71) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 04 Nov 2004 09:32:32 -0800 Received: from sj-core-5.cisco.com (171.71.177.238) by sj-iport-2.cisco.com with ESMTP; 04 Nov 2004 09:43:11 -0800 Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id iA4HWTcp023206 for ; Thu, 4 Nov 2004 09:32:29 -0800 (PST) Received: from anandnw2k02 ([128.107.169.206]) by mira-sjc5-e.cisco.com (MOS 3.4.5-GR) with ESMTP id ATS62983; Thu, 4 Nov 2004 09:32:27 -0800 (PST) Message-Id: <200411041732.ATS62983@mira-sjc5-e.cisco.com> From: "Anand Narasimhan" To: "'Tomcat Users List'" Subject: RE: Huge tomcat memory footprint Date: Thu, 4 Nov 2004 09:32:27 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <9C5166762F311146951505C6790A9CF80229C579@US-VS1.corp.mpi.com> X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4939.300 Thread-Index: AcTAYbtlk//uOepdTS6XZmmPWLMsogAgJgAQAEbpkNAAG8mQAAAIxPQQ X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Thanks again for your suggestions. I still don't have a good handle on the problem. So please bear with me If I am asking the same questions again. 1. What I have noticed so far is the heap is not growing too much, but the process foot print is growing. I used optimizeit memory profiler to compare snapshots of the heap. I don't see any obvious memory leaks. I need to take a closer look. When I checked this morning, the heap size allocated was 80MB and heap used was 57MB (reported by optimizeit). But the memory sizes reported by solairs pmap command is Size RSS Shared Private 1173.45 MB 608.125 MB 15.125 MB 593 MB I understand that the process footprint includes other data and would grow as JVM itself grows. But is it normal that it grows to 1173 MB in a matter of few hours. Ofcourse, optimizeit itself has overheads and adds to the process size. But I have seen it grow to 2.5 GB in two days without optimizeit when I was doing some stress tests. I read in one of the solaris virtual memory architecture design paper, that virtual address space of a process on solaris is 4GB. What will happen when the JVM process size reaches 4GB? I guess my confusion is due to the lack of my understanding on how java manages memory and how it relates to the OS-level memory management. Are there any documents or white papers that discuss this kind of issues? 2. I see that GC is running, reclaiming memory periodically. But I noticed that after a while GC is running more frequently and each run takes a substantial amount of time (in one instance GC took about 14 secs). This may affect the throughput, but will it have any impact on the memory? 3. I read somewhere that if you use reflection, the reflective data structures (whatever that means) also contribute to the memory footprint. It sounded as though these are not part of the heap. So if we are creating instances of Method, Constructor, etc, are they not allocated in the heap? We are using reflection heavily. Thanks Anand > -----Original Message----- > From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] > Sent: Thursday, November 04, 2004 4:55 AM > To: Tomcat Users List > Subject: RE: Huge tomcat memory footprint > > > Hi, > > >If there is a memory leak in our application, tomcat or > java, what are > the > >symptoms I should look for. > >Will the heap usage (shown by visual GC, optimizeit etc) keep growing > and > >eventually reach the max limit set using -Xmx option to java? > > Yes, the heap will keep growing and eventually reach the max, > at which point you will get OutOfMemoryErrors and > hung/unstable behavior. > However, if your leak is small, it might take a very long > time before this situation is reached. > > Run your app inside a profiler, conduct some operations > typical to your app, and then look at the heap. Most > profilers now have features that show you object reference > trees, i.e. what objects are holding onto what references. > If you see stuff still in memory that you think shouldn't be > there, fix it. > > Yoav > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org