tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Donahue - PLANDEVX <>
Subject RE: memory question - heap size and windows process
Date Mon, 24 Jan 2011 22:15:17 GMT

Sorry about the long delay, Exchange took a break this morning.

>-----Original Message-----
>From: Christopher Schultz []
>Subject: Re: memory question - heap size and windows process
>On 1/24/2011 10:30 AM, Leo Donahue - PLANDEVX wrote:
>> Is there a correlation between the heap size Tomcat is using and the
>memory allocated to the Tomcat process running as a windows service -
>depicted in task manager, or are these not related to one another?
>Well, one would expect that as heap size increases, so does the total
>amount of memory allocated to the process, but I'm guessing you were
>hoping for something more helpful :)
>> Tomcat 6.0.29 - windows service - 512MB initial and max memory
>So you are trying to get a fixed heap size: okay.
>> Tomcat as listed in windows task manager: 312,664k
>That seems strange: I would expect the JVM to pre-allocate the entire
>heap (512MiB) plus allocate everything else it might need (PermGen,
>stack space, native heap, etc.) so you should exceed 512MiB as soon as
>the process launches.
>Which number are you observing in the Windows Task Manager? It can show
>you a lot of different memory numbers.

Memory Usage, not Memory Usage Delta.

>> Tomcat as listed in jvisualvm:
>> Heap
>> Size: 518,979,584 B     Used: 175,853,040 B
>> Max: 518,979,584 B
>That looks right.
>> PermGen
>> Size: 33,816,576 B      Used: 33,771,424 B
>> Max: 67,108,864 B
>Okay, so you have 512MiB of Java heap and 30MiB of PermGen so your
>process should take at minimum 542MiB of space. I'd be shocked if you
>had less than a 300MiB virtual size, though the memory might not
>actually be used at this point, so Microsoft Windows might not report
>I don't know much about Microsoft Windows, but I know that Linux doesn't
>even allocate memory to you until you actually write to it, so the
>actual amount of memory allocated to a JVM can be quite modest compared
>to the amount you expected to use upon JVM launch. Perhaps Microsoft
>Windows does something similar... though that would have to be a
>relatively new improvement (Vista/7?).

Using Windows Server 2003 Standard R2

>Were you hoping to get an answer to a specific question?

Yes, but asking the right question is the hardest part.
View raw message