From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5691 invoked by alias); 24 Jan 2011 17:45:09 -0000 Received: (qmail 5676 invoked by uid 22791); 24 Jan 2011 17:45:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail3.caviumnetworks.com (HELO mail3.caviumnetworks.com) (12.108.191.235) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Jan 2011 17:45:03 +0000 Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with MailMarshal (v6,7,2,8378) id ; Mon, 24 Jan 2011 09:45:51 -0800 Received: from caexch01.caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 Jan 2011 09:45:02 -0800 Received: from dd1.caveonetworks.com ([12.108.191.236]) by caexch01.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 Jan 2011 09:45:02 -0800 Message-ID: <4D3DBA9D.5020905@caviumnetworks.com> Date: Mon, 24 Jan 2011 17:45:00 -0000 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 MIME-Version: 1.0 To: Florian Weimer CC: Ben Keppler , java@gcc.gnu.org Subject: Re: FW: Garbage collection issues in GCJ References: <3C7F46E08E936B478463BFFA776CDAD30168E7F7@tmsmail.domain2.local> <4D347D2D.4010101@caviumnetworks.com> <3C7F46E08E936B478463BFFA776CDAD30168E8CA@tmsmail.domain2.local> <87pqro7ghi.fsf@mid.deneb.enyo.de> In-Reply-To: <87pqro7ghi.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00017.txt.bz2 On 01/22/2011 01:53 PM, Florian Weimer wrote: > * Ben Keppler: > >> Thanks for your response. We have been unable to find documentation >> detailing how to change the GC configuration including knobs for setting >> the max heap size. > > GCJ allocates as much memory as your application needs. I think what > David meant was that you should change your application to put less > data into the Java heap (either by using the C heap, or by splitting > it into multiple processes). > No, that is not what I meant at all. At some point in any non-trivial program's execution, there will be a memory allocation request that cannot be met from the existing pools of free memory. At this point the runtime memory allocator must make a decision. Should it run a garbage collection cycle to try to free up some existing memory, or should it get more memory from the operating system. My suggestion was to adjust the policy parameters such that it chooses the garbage collection option more often. This results in a smaller total memory footprint, and thus faster garbage collection cycles. The trade off is that you end up doing more garbage collection and less real work. This may be acceptable though, if latency is important. David Daney