users@glassfish.java.net

Re: Garbage Collection in GlassFish

From: Jacob Kessler <Jacob.Kessler_at_Sun.COM>
Date: Mon, 26 Jan 2009 10:13:41 -0800

As long as you aren't having Out of Memory errors, or spending an
excessive amount of time collecting garbage (to the point where service
quality is degraded), everything is working as intended. The garbage
collector will allow the heap to fill up before cleaning out unreachable
objects, so reaching the full 1024MB of heap isn't a problem.

The point to be worried is if you are either leaking memory (so that
eventually the entire heap is filled and you get an OOM error), or if
the garbage collector ends up degrading performance. Are either of those
happening?


glassfish_at_javadesktop.org wrote:
> Hello,
> I have deployed a EJB and annotate it for creating a WebService.
> This service delivers huge amounts of data -> at least 1500 complex Objects for each request.
> The service should be able to receive more than 20 requests a minute.
> After the first 3 Minutes my maximum heap size is reached(1024), then it needs often more than ten minutes until glassfish is starting the garbage collection.
>
> Here are my JVM settings:
> -XX:MaxPermSize=192m
> -Dsun.rmi.dgc.server.gcInterval=3600000
> -Dsun.rmi.dgc.client.gcInterval=3600000
> -Xmx1024m
> -XX:NewRatio=2
>
> Are there any possibilities to speed up the garbage collection interval?!
> I am not very familiar with the settings of the glassfish application server.
>
> Regards,
> Conrad
> [Message sent by forum member 'javanet007' (javanet007)]
>
> http://forums.java.net/jive/thread.jspa?messageID=328020
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>