<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2>I think you are hitting a known 'feature' which affects
some 1.4.2 versions, certainly 1.4.2_12. The very first CMS GC after a server
restart will happen at 50% occupancy, thereafter the Collector is meant to
dynamically adjust the limit when a CMS GC kicks in (Just-in-time with a safety
margin). With the affected levels it always happens at approx 50%
occupancy.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2>So the problem you are probably seeing is that your tenured
space is actually 50% or more full of live objects. So in this situation the
Collector will initiate continuous CMS GC's at 2 second
intervals.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2>The fix is easy, you need to also add the flag
XX:+UseCMSInitiatingOccupancyOnly=true, then it should honour the
OccupancyFraction of 60%. Of course if the the tenured area is more than 60%
full of live objects the problem will re-occur (so just increase this
value).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=567165117-27032008><FONT face=Verdana
color=#0000ff size=2>Doug.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> hotspot-gc-use-bounces@openjdk.java.net
[mailto:hotspot-gc-use-bounces@openjdk.java.net] <B>On Behalf Of
</B>T.K<BR><B>Sent:</B> Friday, 28 March 2008 6:14 a.m.<BR><B>To:</B>
hotspot-gc-use@openjdk.java.net<BR><B>Subject:</B> CMS Garbage collection
eating up processor power<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=pad5x10>Hi All,<BR>We got 5 Sun Web Servers running on Java 1.4.2,
and used to use the default GC for Tenured space. The problem with that is
that it takes 60-80 seconds everytime the GC happens, and the latency on the
site goes crazy. So we decided to change it to use the Concurrent Mark Sweep
Collector on one server to test it out. Here's the
setting:<BR><BR>-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xms3G -Xmx3G
-XX:NewSize=384M -XX:MaxNewSize=384M -XX:PermSize=64M -XX:MaxPermSize=64M
-XX:CMSInitiatingOccupancyFraction=60<BR><BR>With that setting, the server
runs great. But eventually, when the server reach a medium load (around
100-200 users), the tenured space is always around half full, and the CMS
collector starts to run continuously one after another. It doesn't hurt the
application for now, but it's taking 25% of processing time (we got 4 cpu, so
one web server always keep 1 cpu power). I don't see that much cpu utilization
on other web server that don't have CMS, and they have more users than the one
with CMS. If we got CMS on all 5 web servers, I'm wondering if that will crash
the server or not. What should I do to decrease the processor
utilization caused by GC? <BR><BR>Also, I'm thinking to use i-CMS on the
JVM, and maybe that might slow down the CMS and reduce the amount of CPU
utilization by CMS. Any thought?<BR><BR>Thanks,<BR>TK
</DIV></BLOCKQUOTE></BODY></HTML>