tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Increased memory consumption due to url encoding
Date Wed, 10 Aug 2016 15:28:21 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Lazar,

On 8/10/16 8:29 AM, Lazar Kirchev wrote:
> I tried with 32 MB and even 24 MB heap and the CPU usage and
> response time remained the almost the same (the difference is
> negligible) as with 1 GB heap. The cumulative allocated memory for
> the HeapByteBuffer remains about 400 MB, but of course the
> frequency of GCs is increased.

Sounds like Tomcat generates a bunch of temporary garbage with that
byte buffer change, but because the objects are so short-lived, they
have no impact on the GC performance, and thus no impact on the
response time.

Remember that GC performance depends upon the number of /live/ objects
moving between generations, not the number of total objects or memory
"used" by garbage. Actual garbage is basically ignored during a GC run.

- -chris

> On Tue, Aug 9, 2016 at 7:27 PM, Christopher Schultz < 
> chris@christopherschultz.net> wrote:
> 
> Lazar,
> 
> On 8/9/16 8:40 AM, Lazar Kirchev wrote:
>>>> Hello! When handling requests which make use of request
>>>> dispatcher, Tomcat 7.0.70 allocates more memory in comparison
>>>> to 7.0.69. This seems to come from the encoding of the path
>>>> introduced with this change
>>>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/ 
>>>> apache/catalina/core/ApplicationContext.java?r1=1741024&r2=1741023&
pat
>
>>>> 
hrev=
>>>> 
>>>> 
> 1741024
>>>> 50000 requests to a very simple servlet which only gets a
>>>> request dispatcher for some path lead to allocation of about
>>>> 400 MB. However, after a GC they are freed and this actually
>>>> does not influence CPU or response time. Has anybody noticed
>>>> this effect and what do you think about it?
> 
> What happens if you set the heap size very low (e.g. 32MiB) and
> run the same test? Does the memory usage grow to 400MiB, or does
> the request performance start to degrade?
> 
> I'm curious if you are just seeing the effect of the GC doing its
> job correctly.
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXq0gVAAoJEBzwKT+lPKRYanIP/1fZ436QaLhfN/8ea3foT5gX
0fv9wK+sacg4ZTNyxVLwJa03GfS0SDNXBz9WKLa3FBxqi7WopRNqEtnH28nmCNnp
34toy+k5+IWOATn4xyboUmp6CXHTQieTO3OGmQBEg8CMOipSluOPtkq0qfPqaqKz
s//gKq0o2y3LG+7SrbHeHzf8GJiZQnIASkXBJxZ5dncJx5tHAXKbA0ji6NFlhqat
Y3E/16griZSoqhm/mVRHVZfEdvsebMDmC7cDxxakJpcxr6MjZL8aw9Tdop01aA7c
0U5ndG6jT7vJ8V1iYKblZkM0xgPuBZQln8MHuwuRVXcPgkVHhf2AOiXKrcLWtXCh
vnc0zRRn+Qat3FXrqUIv39r51+OtCO+c860Rny/t3gUXV0VSGsBLW8nAvCe8dLPf
spc4yJPEICOVsUcOk04P4ktwXQYXR6DzcV09tpHdbIeQ23YHoYAvW4O93wp4AhJ3
/rI3t4dCCFWpxutsVxBmrVpgbLJg78kpZTauu35Q0oJBHPYGxjn+mOdqZMSXnn3X
3afrr9nmneyW/YUEj0sUclr5HtbqHojStphf7SYczMlnDpOg5DVGGnSJLK2gvJVQ
Plu1qsA0uJ1NUEFRLkQ0FwyxSZl8EtfSQHqZnh/pgulto38dRa7kSRgUylHWnpI3
9uV9gLnKuBWlqg+y16UV
=tW0i
-----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