Skip to main content

problematic but infrequent long minor GC pauses

4 replies [Last post]
cxcgoard
Offline
Joined: 2009-07-14

Hello. We are having a problem with minor GC pauses, and we are hoping somebody might be able to provide some insight.

Occasionally, we have a minor GC which itself only takes a couple of milliseconds, but which can stop all application threads for orders of magnitude longer, as reported by PrintGCApplicationStoppedTime, and as observed externally. These events are isolated, the preceding and succeeding minor collections not having this delay.

Below is a log snippet illustrating the problem.

485314.676: [GC 485314.676: [ParNew: 105774K->885K(118016K), 0.0025400 secs] 136315K->31532K(1035520K), 0.0025990 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
Total time for which application threads were stopped: 0.0030830 seconds
...
485377.257: [GC 485378.857: [ParNew: 105845K->621K(118016K), 0.0028070 secs] 136492K->31374K(1035520K), 0.0028720 secs] [Times: user=0.01 sys=0.00, real=1.61 secs]
Total time for which application threads were stopped: 1.6032830 seconds
...
485448.282: [GC 485448.282: [ParNew: 105581K->701K(118016K), 0.0033700 secs] 136334K->31565K(1035520K), 0.0034310 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
Total time for which application threads were stopped: 0.0039300 seconds

GenCollectForAllocation [ 78 0 0] [ 0 0 0] [ 2 43996] 0
GenCollectForAllocation [ 78 0 0] [ 0 0 0] [ 1603 16565] 0
GenCollectForAllocation [ 78 0 1] [ 0 0 0] [ 3 27583] 0

The machines on which we are observing this behaviour are dedicated to the JVM, each has 8 CPU cores, plenty of unused RAM, and is running Red Hat Enterprise Linux ES Release 4 Update 8 with kernel 2.6.9-89.0.1EL-smp. We have observed this with JVM versions 1.6.0_13 and 1.6.0_18.

What are some possible explanations for this behaviour?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sfaxianovic
Offline
Joined: 2010-01-09

for application that long pause time cause problem you can use the CMS collector witch know as low pause collector
if you are using JVM 5 use –XX:+UseConcMarkSweepGC
if you are running on a jvm 6 or jvm 5 update greater than 6 you can add the option –XX:+ExplicitGCInvokesConcurrent witch gave a greate performance

linuxhippy
Offline
Joined: 2004-01-07

> for application that long pause time cause problem
> you can use the CMS collector witch know as low pause
> collector

Nope, CMS is only an old-gen collector, but he's having troubles in the young generation.

> and is running Red Hat Enterprise Linux ES Release 4
> Update 8 with kernel 2.6.9-89.0.1EL-smp.
Hmm, I remember there were some troubles with java on larger boxes running old linux kernels. Its just a guess, but 2.6.9 is _really_ old (2004?), so if you've some spare time left give 2.6.32 a try.

- Clemens

sfaxianovic
Offline
Joined: 2010-01-09

>Nope, CMS is only an old-gen collector

We can use a parallel collector for the young generation by using the option -XX:+UseParNewGC

linuxhippy
Offline
Joined: 2004-01-07

> We can use a parallel collector for the young
> generation by using the option -XX:+UseParNewGC

Right, but this has nothing to do with CMS, except that ParNewGC and CMS are compatible.
However, this guys problem doesn't seem to be the GC time itself....

- Clemens