From owner-freebsd-java@FreeBSD.ORG Wed Sep 19 16:40:07 2007 Return-Path: Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F33FB16A46C for ; Wed, 19 Sep 2007 16:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EAE9A13C4A6 for ; Wed, 19 Sep 2007 16:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8JGe6Zg048377 for ; Wed, 19 Sep 2007 16:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8JGe6Id048376; Wed, 19 Sep 2007 16:40:06 GMT (envelope-from gnats) Date: Wed, 19 Sep 2007 16:40:06 GMT Message-Id: <200709191640.l8JGe6Id048376@freefall.freebsd.org> To: freebsd-java@FreeBSD.org From: Nick Johnson Cc: Subject: Re: java/116461: java.lang.OutOfMemoryError: PermGen space X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 16:40:07 -0000 The following reply was made to PR java/116461; it has been noted by GNATS. From: Nick Johnson To: bug-followup@FreeBSD.org, rafaelbascon@gmail.com Cc: Subject: Re: java/116461: java.lang.OutOfMemoryError: PermGen space Date: Wed, 19 Sep 2007 09:21:48 -0700 (PDT) The most obvious solution is to increase the amount of permanent generation space. java -XX:MaxPermSize=64m http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp http://java.sun.com/docs/hotspot/gc1.4.2/faq.html 7. How should the permanent generation be sized? The permanent generation is used to hold reflective of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations. Generally, sizing of this generation can be ignored because the default size is adequate. However, programs that load many classes may need a larger permanent generation. 8. How can I tell if the permanent generation is filling up? Starting in 1.4.2 -XX:+PrintGCDetails will print information about all parts of the heap collected at each garbage collection. For a full collection [Full GC [Tenured: 30437K->33739K(280576K), 0.7050569 secs] 106231K->33739K(362112K), [Perm : 2919K->2919K(16384K)], 0.7052334 secs] this example shows that little was collected in the permanent generation (it went from 2919K used before the collection to 2919K used after the collection) and the current size of the permanent generation is 16384K. 9. How can I increase the permanent generation size? Use the command line option -XX:MaxPermSize=