users@glassfish.java.net

Re: PermGen error on Glassfish v2ur1

From: Jason Lee <jason_at_steeplesoft.com>
Date: Fri, 16 May 2008 15:01:45 -0500

On Fri, May 16, 2008 at 3:01 PM, <glassfish_at_javadesktop.org> wrote:
> NetBeans has -Xms128m and -Xmx756m (irrelevant though, Sun AppServer is being run seperate outside of the NetBeans JVM)
>
> My domain has a max memory setting of -Xmx1024m, and never comes close to using it (small single web app running only)

Those affect only heap size, and not PermGen space, two completely
separate areas of memory. To change the PermGen space size, you can
up the maximum by adding this as a JVM option:

-XX:MaxPermSize=192m

If I understand things correctly, PermGen (or Permanent Generation) is
used to store metadata about classes being loaded. It gets cleaned
up, I think, but not as quickly as the heap, or so it would seem.
Increasing the size for GF instances in which a lot of redeployments
occur gives the system enough breathing room to work while it waits
for the garbage collector to kick in.

That's my semi-educated understanding of that, at any rate. :P
Regardless of how it works, it does seem to work. :)

-- 
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com