long GC pauses; full gc eventually takes 30 secs. (from Developer Forums)

from http://forum.java.sun.com/thread.jspa?threadID=5145522

jre 1.5.0_06,

-Dcom.sun.management.jmxremote -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:NewRatio=3 -XX:MaxTenuringThreshold=3 -XX:NewSize=90M -XX:MaxNewSize=90M -Xmx800M

windows 2003 server

normally, full gc's occur with < 1 second durations, but eventually, the duration peaks at 30 seconds, then 7 seconds, then back to normal

the heap was at about 290MB (far from full).

setting maxgcpausemillis has no effect (something extraordinary happens?)

there is no obvious pattern in the long pauses (not due to perm resizing or so)

does anyone have experience with sudden long pauses?

we could think of heap being swapped - but we don't know how to monitor this (and nobody was starting memory consuming applications at the time)

does anyone know how we best monitor swapping on a windows?

we are not able to use CMS immediately without testing for a period (had crashes due to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6386633)

here are samples of long pauses

here are some long pauses (days apart - the gc log is embedded in our own loggings)

061221 102753 0750 EV coreservice.taskoutput.container 75.537: [GC [PSYoungGen: 70133K->19827K(53632K)] 173056K->138149K(172736K), 11.5205585 secs] ##[

070301 122542 0812 EV coreservice.taskoutput.container 6146.116: [Full GC [PSYoungGen: 768K->0K(90944K)] [PSOldGen: 286976K->213826K(259328K)] 287744K->213826K(350272K) [PSPermGen: 19432K->19432K(23040K)], 30.1171480 secs] ##[

070305 163701 0140 EV coreservice.taskoutput.container [PSYoungGen: 1256K->0K(90176K)] [PSOldGen: 239309K->197132K(221632K)] 240565K->197132K(311808K) [PSPermGen: 19260K->19039K(23808K)], 20.3872070 secs] ##[

tak!

/aksel

[1906 byte] By [aksel.schmidta] at [2007-11-26 21:01:27]
# 1

>> does anyone know how we best monitor swapping on a

> windows?

I not sure if this is the best.

You can use ctrl-shift-escape. Click on the processes tab and then goto the menu: View->Select Columns... and add "Page Fault Delta" column. I would also suggest you add the VM Memory size column too.

Caffeine0001a at 2007-7-10 2:32:59 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Can't respond specifically to your question, but I know that long GC cycles can result from a remarkably diverse set of causes. Could be a massive tree structure "collapsing", could be something on the system (possibly unrelated to Java) that is locking out GC for a period of time, could be you're slipping into paging, could be that GC needs to reorganize some things.

Hotlicksa at 2007-7-10 2:32:59 > top of Java-index,Java HotSpot Virtual Machine,Specifications...