<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Vm option :<br>
<font size="2"><span style="font-size: 10pt;">-Xmx49152m -Xms49152m -Xmn1024m -Xss256k -XX:MaxDirectMemorySize=1024m
</span></font>-XX:+UseConcMarkSweepGC -XX:+CMSDumpAtPromotionFailure -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=100 -XX:GCLogFileSize=128m
<font size="2"><span style="font-size: 10pt;">-Xloggc:/home/work/log/hbase/ggsrv-miliao/regionserver/regionserver_gc.log
</span></font>...<br>
<br>
$java -version<br>
java version "1.6.0_37"<br>
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)<br>
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)<br>
<br>
After a promotion failure, there's an expected dump, but there're two more things catch my eye :<br>
1) the dumped gc log size was not limited by GCLogFileSize parameter<br>
<br>
-rw-rw-r-- 1 work work 2.7K Dec 20 12:12 regionserver_gc.log.2<br>
-rw-rw-r-- 1 work work <span style="font-weight: bold;">11499056168</span> Dec 20 12:12 regionserver_gc.log.1<br>
-rw-rw-r-- 1 work work 77K Dec 20 16:21 regionserver_gc.log.0<br>
<br>
Looked into current codebase, seems the gc log rolling is triggered in SafepointSynchronize::do_cleanup_tasks() only, if we have huge dump info be written during a vm operation, the GCLogFileSize limit is breakable<br>
<br>
2) Another weird problem is the PrintSafepointStatistics output :<br>
<br>
vmop [threads: total initially_running wait_to_block] [time: spin block sync cleanup vmop] page_trap_count<br>
158282.484: GenCollectForAllocation [ 325 0 0 ] [ 0 0 0 2 113 ] 0<br>
vmop [threads: total initially_running wait_to_block] [time: spin block sync cleanup vmop] page_trap_count<br>
158283.141: GenCollectForAllocation [ 325 1 2 ] [ 0 0 0 2 112 ] 0<br>
vmop [threads: total initially_running wait_to_block] [time: spin block sync cleanup vmop] page_trap_count<br>
158283.766: GenCollectForAllocation [ 325 0 0 ] [ 0 0 0
<span style="font-weight: bold;">2543271 </span>] 0<br>
<br>
I could see 4 fields only at the last line, not 5, i'm a little comfusued: )<br>
</div>
</body>
</html>