File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes GC: Major Collections Taking Long Time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "GC: Major Collections Taking Long Time" Watch "GC: Major Collections Taking Long Time" New topic
Author

GC: Major Collections Taking Long Time

Chang Iych
Greenhorn

Joined: Mar 06, 2006
Posts: 5
Hi,
I have been trying to tune GC on WLP 8.1.6 and here arr my settings.

MEM_ARGS="-Xms2048m -Xmx2048m -XX ermSize=128m -XX:MaxPermSize=512m -XX:NewRatio=3 -XX:-UseParallelGC -verbose:gc -Xverify:none"

My major collection times are too long and here is a snippet from the log..

[GC 1420462K->950403K(2081792K), 0.4194167 secs]
[GC 1443971K->968294K(2081792K), 0.3781520 secs]
[GC 1461862K->986951K(2081792K), 0.3401775 secs]
[GC 1480519K->1003273K(2081792K), 0.3461539 secs]
[GC 1496841K->1022060K(2081792K), 0.4221607 secs]
[GC 1515628K->1047164K(2081792K), 0.4825944 secs]
[GC 1540732K->1064888K(2081792K), 0.4082768 secs]
[GC 1558456K->1079497K(2081792K), 0.3533515 secs]
[Full GC[Unloading class sun.reflect.GeneratedMethodAccessor1951]
1573065K->739842K(2081792K), 11.2938250 secs]
[GC 1233410K->784557K(2081792K), 0.6538970 secs]
[GC 1278125K->797515K(2081792K), 0.3887030 secs]
[GC 1291083K->804385K(2081792K), 0.2686290 secs]
[GC 1297953K->811593K(2081792K), 0.2373969 secs]
[GC 1305161K->828135K(2081792K), 0.3038601 secs]
[GC 1321703K->837189K(2081792K), 0.2940410 secs]
[GC 1330757K->857660K(2081792K), 0.3334175 secs]
[GC 1351228K->878371K(2081792K), 0.3781239 secs]
[GC 1371939K->899573K(2081792K), 0.3377001 secs]
[GC 1393141K->925276K(2081792K), 0.5319204 secs]
[GC 1418844K->950563K(2081792K), 0.4501572 secs]
[GC 1444131K->964364K(2081792K), 0.3361071 secs]
[GC 1457932K->975792K(2081792K), 0.2483201 secs]
[GC 1469360K->989934K(2081792K), 0.2808589 secs]
[GC 1483502K->1003977K(2081792K), 0.3009416 secs]
[GC 1497545K->1012658K(2081792K), 0.2405290 secs]
[GC 1506226K->1029767K(2081792K), 0.3398602 secs]
[GC 1523335K->1048771K(2081792K), 0.3506587 secs]
[GC 1542339K->1063714K(2081792K), 0.3412825 secs]
[GC 1557282K->1079638K(2081792K), 0.4134464 secs]
[Full GC[Unloading class jsp_servlet._jsp._lfs._content.__lfsmailtowest]
1573206K->764763K(2081792K), 10.5904149 secs]
[GC 1257095K->808614K(2081792K), 0.6313730 secs]
[GC 1302182K->820312K(2081792K), 0.3818220 secs]
[GC 1313880K->839642K(2081792K), 0.3586249 secs]
[GC 1333210K->858920K(2081792K), 0.4036932 secs]
[GC 1352488K->875219K(2081792K), 0.3438735 secs]
[GC 1368787K->892350K(2081792K), 0.3877395 secs]
[GC 1385918K->907809K(2081792K), 0.3372883 secs]
[GC 1401377K->928541K(2081792K), 0.4187334 secs]
[GC 1422089K->951917K(2081792K), 0.4489247 secs]
[GC 1445485K->965484K(2081792K), 0.3188618 secs]
[GC 1459052K->975390K(2081792K), 0.2776420 secs]
[GC 1468958K->997034K(2081792K), 0.3518497 secs]
[GC 1490602K->1025043K(2081792K), 0.4275449 secs]
[GC 1518611K->1046393K(2081792K), 0.4697244 secs]
[GC 1539961K->1066377K(2081792K), 0.3888271 secs]
[GC 1559945K->1088796K(2081792K), 0.4222889 secs]
[Full GC[Unloading class sun.reflect.GeneratedMethodAccessor1958]
1582364K->777698K(2081792K), 11.0686289 secs]
[GC 1271266K->819907K(2081792K), 0.5621499 secs]
[GC 1313475K->832715K(2081792K), 0.3017444 secs]
[GC 1326283K->850442K(2081792K), 0.3368461 secs]
[GC 1344010K->862379K(2081792K), 0.3236737 secs]
[GC 1355947K->873458K(2081792K), 0.2952772 secs]
[GC 1367026K->885945K(2081792K), 0.2852358 secs]
[GC 1379513K->904909K(2081792K), 0.3441992 secs]
[GC 1398477K->916848K(2081792K), 0.3153624 secs]
[GC 1410416K->927685K(2081792K), 0.2440841 secs]
[GC 1421253K->942981K(2081792K), 0.2949466 secs]


How do I improve the major collection pause times? I have tried the -Xincgc option but with little success. Should I reduce the size of the heap?
Thanks in advance..

Chang
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18914
    
  40

The "UseParallelGC" switch turns on the parallel collector for new generation objects which...

- Really has no effect if you only have one processor core. This collector run faster with multiple cores, but does not increase performance on a single processor.
- Only applies to new generation objects. New generation GC is the shorter faster GC (compared to the old generation). So you are not improving the full GC, which should be for old generation.


The "incgc" switch turns on the incremental collector for old generations objects, which should help if you can't take large hiccups in your program.

This collector is actually slower than the default collector. The purpose of this collector is to spread out collections over many iterations -- so while it will take longer overall, you will hopefully not get the one long full GC cycle.

This collector is not recommended if you generate a lot of garbage.


The "UseConcMarkSweepGC" switch turns on the concurrent old generation collector which may help here. This collector is designed so that some of its phases run concurrently, so while it may take a long time, you program is still running during part of its cycle.

You can also turn on the parallel new generation collector along with this collector by using the "UseParNewGC" switch in addition to the "UseConcMarkSweepGC" switch.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GC: Major Collections Taking Long Time