tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Showing Tomcat Memory Utilization with 'top'
Date Tue, 22 Jun 2010 20:18:21 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 6/22/2010 3:22 PM, Caldarale, Charles R wrote:
>> From: Robinson, Eric [mailto:eric.robinson@psmnv.com]
>> Subject: Showing Tomcat Memory Utilization with 'top'
>>
>> 1. Top shows 0k of swap usage, so the system is not swapping. In that
>> case, why is there a difference between the VIRT and RES numbers?
> 
> Linux always allocates more virtual space than is actually used (thread stack space,
for example).  The JVM will also reserve, but not commit, the -Xmx size of the heap (and other
spaces); it only commits what is really needed.
> 
>> My understanding is that RES=CODE+DATA and VIRT=RES+SWAP.
> 
> Nope.  RES is real memory usage, VIRT is just whatever space has been allocated, but
not necessarily touched.  Until a page is touched, it won't exist in RAM or on the swap file.

Also, I believe VIRT includes memory shared with other processes, so if
you have 50MiB of Java system classes loaded and a modern JVM which
shares them among running JVMs, then you'll see that 50MiB included in
every process's VIRT that is sharing it, which is somewhat misleading.

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

iEYEARECAAYFAkwhGo0ACgkQ9CaO5/Lv0PCUlwCgmkijMJ5TQN6sMlDAboPU9upV
cQEAoI7ZWJaD1hIFsYmx89WnFRjM4dkv
=lN9a
-----END PGP SIGNATURE-----

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


Mime
View raw message