Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AFBD7200B5E for ; Wed, 10 Aug 2016 17:28:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ACDB6160AA4; Wed, 10 Aug 2016 15:28:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0E01160A8F for ; Wed, 10 Aug 2016 17:28:42 +0200 (CEST) Received: (qmail 55587 invoked by uid 500); 10 Aug 2016 15:28:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 55576 invoked by uid 99); 10 Aug 2016 15:28:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 15:28:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 25E23C0455 for ; Wed, 10 Aug 2016 15:28:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.714 X-Spam-Level: X-Spam-Status: No, score=0.714 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, NO_RDNS_DOTCOM_HELO=0.433, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 3W12PpXzmJUC for ; Wed, 10 Aug 2016 15:28:39 +0000 (UTC) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 71BC75FE62 for ; Wed, 10 Aug 2016 15:28:38 +0000 (UTC) Received: from vz-proxy-m004.mx.aol.com ([64.236.83.8]) by vms173007.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0OBP00IER9N96R20@vms173007.mailsrvcs.net> for users@tomcat.apache.org; Wed, 10 Aug 2016 10:28:21 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=MtGvkDue c=1 sm=1 tr=0 a=Bcm0RCOkHTZ4We9DUxtllQ==:117 a=IkcTkHD0fZMA:10 a=7z1cN_iqozsA:10 a=-57I09spAAAA:8 a=mV9VRH-2AAAA:8 a=j4nzMFrpAAAA:8 a=QfKxxUxMAAAA:8 a=xXTcnGhJJOR0jVb1it8A:9 a=BDJS-fDi4dhIEelI:21 a=ssvt2PzFptkDdHkg:21 a=QEXdDO2ut3YA:10 Received: by 71.127.40.115 with SMTP id 655b43d7; Wed, 10 Aug 2016 15:28:21 GMT Subject: Re: Increased memory consumption due to url encoding To: Tomcat Users List References: From: Christopher Schultz Message-id: Date: Wed, 10 Aug 2016 11:28:21 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit archived-at: Wed, 10 Aug 2016 15:28:43 -0000 -----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