young generation gc some times takes longer time
jdk: 1.4.2_06
jvm parameters:
-Xms2560m -Xmx2560m -XX:NewSize=32M -XX:MaxPermSize=256M -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC
-XX:+UseParNewGC -
nature of our application is that most of the new objects which are cretaed most likely is going to end up in tenured space so we have kept newsize small.
Our young gc is frequent but takes vet less time most of the time and it is like this most of the time
1892801.223: [ParNew 1307000K->1276979K(2621376K), 0.0405279 secs]
1892803.702: [ParNew 1309619K->1280021K(2621376K), 0.0381812 secs]
1892810.257: [ParNew 1312661K->1282979K(2621376K), 0.0430851 secs]
1892813.616: [ParNew 1315619K->1285174K(2621376K), 0.0353861 secs]
1892820.838: [ParNew 1317814K->1287959K(2621376K), 0.0391169 secs]
1892825.486: [ParNew 1320599K->1294498K(2621376K), 0.1225365 secs]
1892825.883: [ParNew 1327138K->1309838K(2621376K), 0.4025240 secs]
1892832.756: [ParNew 1342478K->1315852K(2621376K), 0.1057747 secs]
1892838.118: [ParNew 1348492K->1317861K(2621376K), 0.0320176 secs]
1892843.932: [ParNew 1350501K->1319480K(2621376K), 0.0383975 secs]
but one or twice in a day it start taking higher gc time for new generation for 2-3 minute till gc happens for old generation
311536.095: [ParNew 1583769K->1556941K(2621376K), 0.2767211 secs]
311536.768: [ParNew 1659394K->1638895K(2621376K), 0.5441500 secs]
311537.638: [ParNew 1671535K->1650538K(2621376K), 0.4639280 secs]
311538.849: [ParNew 1683178K->1652904K(2621376K), 0.4405431 secs]
311540.088: [ParNew 1685544K->1659556K(2621376K), 0.4570603 secs]
311545.027: [ParNew 1692196K->1661921K(2621376K), 0.4514625 secs]
311547.213: [ParNew 1694561K->1664354K(2621376K), 0.4518378 secs]
311553.699: [ParNew 1696994K->1666712K(2621376K), 0.4341839 secs]
311556.270: [ParNew 1699352K->1668499K(2621376K), 0.4293822 secs]
311559.200: [ParNew 1701139K->1670185K(2621376K), 0.4406644 secs]
311562.732: [ParNew 1702825K->1672748K(2621376K), 0.4399115 secs]
311563.772: [ParNew 1705388K->1674850K(2621376K), 0.4561811 secs]
311568.178: [ParNew 1707490K->1677631K(2621376K), 0.4509551 secs]
311569.400: [ParNew 171027
We rarely have Full GC. Mostly minor GC of 2-3 seconds. Once minor GC happens , new generation comes back to .04 sec from .5 sec
311660.144: [ParNew 1789014K->1758802K(2621376K), 0.4462287 secs]
311662.122: [ParNew 1791442K->1762257K(2621376K), 0.4457078 secs]
311662.570: [GC 1762289K(2621376K), 0.0171463 secs]
311664.142: [ParNew 1794897K->1765945K(2621376K), 0.4635559 secs]
311666.224: [GC 1771006K(2621376K), 1.6403867 secs]
311670.893: [ParNew 1492500K->1462823K(2621376K), 0.4980912 secs]
311672.790: [ParNew 1357566K->1327406K(2621376K), 0.5134905 secs]
311673.748: [ParNew 1328011K->1303516K(2621376K), 0.4523868 secs]
311675.227: [ParNew 1239373K->1212039K(2621376K), 0.4482543 secs]
311677.571: [ParNew 1037272K->1006895K(2621376K), 0.4341042 secs]
311681.144: [ParNew 584941K->554178K(2621376K), 0.0314600 secs]
311682.233: [ParNew 586818K->557176K(2621376K), 0.0409105 secs]
311683.170: [ParNew 589816K->563481K(2621376K), 0.0589575 secs]
311686.489: [ParNew 596121K->565244K(2621376K), 0.0335869 secs]
311689.309: [ParNew 597884K->567601K(2621376K), 0.0351472 secs]
To me it looks like our old generation is fragmented and promotion from new generation to old generation start taking longer time. But once Minor GC happens an dfree up spaces from old generation then we longer sees pauses of .5 seconds every 1 seconds
I am thinking to increase newsize as well as use following
UseCMSCompactAtFullCollection
-XX:CMSFullGCsBeforeCompaction=0
-XX:-CMSParallelRemarkEnabled
we haven't used these earlier becasue we thought these are default to these in 1.4.2
any other suggestion?
how we can prevent fragmentaion of old space. full gc can adjsu old space but in our case we don't have many full gc's.

