Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Garbage Collection issue

843811Jul 20 2005 — edited Jul 22 2005
We have a high volume application that processes around 1mil messages (avg size of messsage is 4K). The processing done by mostly short-lived objects. We cleanup those objects as soon as we are done with them by setting to null.

Incremental GC's run initially and seems to be reclaiming the total space. After a while, FULL GC kicks in , taking lot of time to run , pausing main application threads. At some point, application runs out of memory.

Application is running on sun sparc 12 cpu machine with 4G of memory.

Here are the JVM options used:
java -server -Xnoclassgc -XX:+UseParallelGC -verbose:gc -ms512m -mx2048m

Here is the snapshot GC console output:

[GC 1037106K->934696K(1323992K), 0.8224376 secs]
[GC 1073960K->972315K(1323992K), 0.8492167 secs]
[GC 1111579K->1009308K(1323992K), 0.9097631 secs]
[GC 1148572K->1046394K(1323992K), 0.8439699 secs]
[GC 1185658K->1084905K(1323992K), 0.8705303 secs]
[GC 1224168K->1122494K(1323992K), 0.8552342 secs]
[GC 1261758K->1159081K(1323992K), 0.8970201 secs]
[GC 1298343K->1195721K(1335000K), 1.1827162 secs]
[Full GC 1195721K->989634K(1335000K), 24.3578172 secs]
[GC 1184065K->1044938K(1849840K), 0.9831921 secs]
[GC 1239366K->1096178K(1849840K), 0.9747165 secs]
[GC 1290609K->1147124K(1849840K), 0.9470200 secs]
[GC 1341556K->1199331K(1849840K), 1.0176226 secs]
[GC 1393763K->1251271K(1849840K), 1.1659994 secs]
[GC 1445703K->1303021K(1849840K), 1.1822156 secs]
[GC 1497453K->1355071K(1849840K), 1.1616752 secs]
[GC 1549502K->1406485K(1849840K), 1.3026876 secs]
[GC 1600914K->1458371K(1849840K), 1.1999966 secs]
[GC 1652803K->1508827K(1849840K), 1.1635613 secs]
[GC 1703259K->1559797K(1849840K), 1.1399380 secs]
[GC 1754229K->1608405K(1849840K), 1.1470171 secs]
[Full GC 1195721K->989634K(1335000K), 24.3578172 secs]
[GC 1184065K->1044938K(1849840K), 0.9831921 secs]
[GC 1239366K->1096178K(1849840K), 0.9747165 secs]
[GC 1290609K->1147124K(1849840K), 0.9470200 secs]
[GC 1341556K->1199331K(1849840K), 1.0176226 secs]
[GC 1393763K->1251271K(1849840K), 1.1659994 secs]
[GC 1445703K->1303021K(1849840K), 1.1822156 secs]
[GC 1497453K->1355071K(1849840K), 1.1616752 secs]
[GC 1549502K->1406485K(1849840K), 1.3026876 secs]
[GC 1600914K->1458371K(1849840K), 1.1999966 secs]
[GC 1652803K->1508827K(1849840K), 1.1635613 secs]
[GC 1703259K->1559797K(1849840K), 1.1399380 secs]
[GC 1754229K->1608405K(1849840K), 1.1470171 secs]
^[[2~[GC 1802837K->1658413K(1852912K), 1.2599031 secs]
[Full GC 1658413K->1322684K(1852912K), 31.4556695 secs]
[GC 1541948K->1382396K(2090304K), 1.0559670 secs]
[GC 1601659K->1441184K(2090304K), 1.1171899 secs]
[GC 1660448K->1499921K(2090304K), 1.1041055 secs]
[GC 1719184K->1560243K(2090304K), 1.1842856 secs]
[GC 1779504K->1617751K(2090304K), 1.0513258 secs]
[GC 1837015K->1674981K(2090304K), 1.1666812 secs]
[Full GC 1894245K->1551657K(2090304K), 37.6117940 secs]
[GC 1770921K->1613369K(2090304K), 1.0356318 secs]
[GC 1832632K->1669436K(2090304K), 1.1144191 secs]
[Full GC 1888700K->1648994K(2090304K), 39.3942882 secs]
[Full GC 1868258K->1694146K(2090304K), 40.3389419 secs]
[Full GC 1913410K->1738377K(2090304K), 42.7415051 secs]
[Full GC 1957638K->1780351K(2090304K), 42.5810629 secs]
[Full GC 1999615K->1830407K(2090304K), 44.5052564 secs]


As you could see, Full GC is taking long time.

Whats the best way to tune JVM in this scenerio ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2005
Added on Jul 20 2005
11 comments
191 views