tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Showing Tomcat Memory Utilization with 'top'
Date Tue, 22 Jun 2010 20:18:21 GMT
Hash: SHA1


On 6/22/2010 3:22 PM, Caldarale, Charles R wrote:
>> From: Robinson, Eric []
>> 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
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message