-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Leo,

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.

> 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 it.

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?).

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

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk09rysACgkQ9CaO5/Lv0PDq9gCfaT2xFUrnwtJvOb89SnWyxCOp
nQUAn0vbcWidy7td31QjB+EL9qSXyomP
=wngS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to