users@glassfish.java.net

GC problem with Glassfish 3.1.2.2

From: <forums_at_java.net>
Date: Sun, 19 Aug 2012 05:20:41 -0500 (CDT)

During testing of our memory leak monitoring product, Plumbr [1], we have
encountered a very strange behaviour of Glassfish. When I start Glassfish
server with deployed Spring's PetClinic application and our java agent
attached, the size of new generation of java heap memory stays at initial
size. Which results in very frequent minor GC and thus very slow start time.
Here are some numbers: "jstat -gc" after the server has been started: S0C S1C
S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT 128.0 128.0 80.1 0.0 1408.0
818.0 97800.0 80075.9 71504.0 48440.3 3294 45.221 38 0.946 46.166 As you see,
eden size has remained on it's initial value. While server was starting I was
monitoring "jstat -gc PID 1s" and GC time was increasing by 0.5s-0.8s from
measurement to measurement. Which means 50-80% of CPU time was in minor gc.
The maximum size of New generation, as reported by "jstat -gccapacity", is
174720.0 KB, much larger than current 1664.0 KB. This result can be observed
almost at every attempt to start Glassfish on my MacBook Air, java version
1.6.0_33. If I manually configure Glassfish with -XX:NewSize=30m, server
starts much-much faster. Has anybody any suggestions as what may be the cause
of this strange GC behaviour?

[1] http://plumbr.eu

--
[Message sent by forum member 'nikem']
View Post: http://forums.java.net/node/889337