-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 3/23/15 11:26 AM, André Warnier wrote:
> Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> 
>> Chuck,
>> 
>> On 3/23/15 10:33 AM, Caldarale, Charles R wrote:
>>>> From: Christopher Schultz
>>>> [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat 7
>>>> (7.0.54) memory consuption is very high(3 times) than Tomcat
>>>> 6 (6.0.28) Really? The Tomcat ROOT web application is taking
>>>> up 3 times as much heap space in Tomcat 6 as Tomcat 7?
>>> Just remember that the numbers out of top are at best 
>>> approximations, and, as Rainer pointed out, not taking
>>> measurements immediately after a GC is a guarantee of an apples
>>> versus oranges comparison.
>>> 
>>> The appropriate tools (e.g., VisualVM) must be used for any 
>>> rational analysis.
>> 
>> +1
>> 
>> The output of "top" and "ps" are completely irrelevant. The very 
>> minimum would be the output of "jmap -heap", and only after a
>> full GC were to have been run.
>> 
> 
> The appropriate java-specific tools must certainly be used to find
> out /what/ is using this memory inside the JVM.
> 
> But qualifying the output of "top" or "ps" as "irrelevant" is
> probably a bit over the top. After all, they do indicate how much
> the JVM is (approximately) using from an OS perspective, and that
> is probably not totally irrelevant here.

With no heap size hints, you will get the JVM's default for that
environment. Tomcat's memory usage profile may have changed between
versions, and the JVM is under no contract to do things exactly the
same way every time when it comes to GC activity. Just because the
process is taking 512MiB of virtual memory doesn't mean that Tomcat is
using all of that heap. If you look, you may find that the heap is 90%
empty. In that case, the output of top/ps is irrelevant.

If you want to make sure that the JVM doesn't take more than a certain
amount of memory, you have to tell it that.

> I wanted to see the respective startup commands to check if there
> wasn't some change in the default startup script switches (like
> -Xms/-Xmx) which would explain the difference. But apparently not.
> 
> Even if a GC would make the two look less different, the question
> would remain as to why one Tomcat would need a GC for that, and the
> other not.

It depends upon how many minor GCs happen and when: some relatively
short-lived objects may be promoted to the old generation more quickly
in Tomcat 7.

One particular thing I can think of that changed was the way
annotation and SCI scanning is done: that produces a TON of garbage on
startup.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVEWNYAAoJEBzwKT+lPKRYJMIQALmPvwr+c2azd7fGbeg+gcER
BnKCpRCbCCDlxVgQozjeJ/LAfKQJ9/SmN01M0FUtmnV6HG/Lq4H2w2Pjjhh7m6pt
20bugp5DpS8ZyoyG/eFyryvItuNjjYJjBGP9n29IlgoC1N1XiW6wwM5payGKLYt9
8uROwgocZz2FxR2c3R5XdNpkUSWTeXwRRr1dg88FXxLF6RAUwZgOXkHR5Olpoz1c
aqBuMBEc91Q3UJ1oLuSl5IsrUf1JVHQonB/Aojl2eXrquWSQfARPNRKp6+9kBAiT
1EXS58SWxGt+y5myhAFOFXErxxwq7bJfZzYlrXEdBpXNEZ9ccw6yDvFIN/HbZlLj
Pj+1K3MgQzNn7rZEUy3sFXdcBJGBJvzNui7+sPJMPIRGF7+4asdlnmrG2w7odaSM
AuPJThRKjZgUJUPOqlr9PQKh9nzZkKLUjQTM9L9MYqKff51DPY0E9IrYIIbBeWBg
GaIP4ZiTQy03K8MDlM1GlDBNwcQmqhxklgXAqkCSZKECmkuen2AJ3ycI0fDUWEvn
ubyzxqB8GOennxH8yt4Ofanp/JzDfnGtqOpOUUrcPMqNb6py4Z2rKYS0TVTy9eIy
pZiQPKshJBt3KPmWURnNPoZkiw525AxL79gdMbvFuPYl4WpAW7zVZfxGNzNHNtDr
Q4Cg/lfnN1VkbmNDFDiG
=00uv
-----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