请教高手,我仅设置了堆的最大最小值。
<!-- google_ad_section_end --><!--End_body//-->从GC日志来看为什么我的JVM堆大小都是tenured区了(tenured大小=Xmx大小)。导致每次都进行global,即full。 默认的年轻代,年老大比例是多少呢。 操作系统:AIX Version 6.1 JDK:java version "1.6.0",IBM J9 VM 应用服务器:weblogic10 JVM设置:-Xms448m -Xmx576m。 GC日志: <sys id="1" timestamp="Apr 11 21:32:35 2012" intervalms="0.000"> <time exclusiveaccessms="0.050" meanexclusiveaccessms="0.036" threads="1" lastthreadtid="0x0000000115D96400" /> <refs soft="7197" weak="2686" phantom="35" dynamicSoftReferenceThreshold="32" maxSoftReferenceThreshold="32" /> <tenured freebytes="105552120" totalbytes="469762048" percent="22" > <soa freebytes="82064632" totalbytes="446274560" percent="18" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <gc type="global" id="1" totalid="1" intervalms="0.000"> <classunloading classloaders="28" classes="13" timevmquiescems="0.000" timetakenms="8.799" /> <finalization objectsqueued="1811" /> <timesms mark="95.835" sweep="3.707" compact="0.000" total="132.262" /> <tenured freebytes="399378504" totalbytes="469762048" percent="85" > <soa freebytes="375891016" totalbytes="446274560" percent="84" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> </gc> <tenured freebytes="399378504" totalbytes="469762048" percent="85" > <soa freebytes="375891016" totalbytes="446274560" percent="84" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <refs soft="6570" weak="1006" phantom="11" dynamicSoftReferenceThreshold="27" maxSoftReferenceThreshold="32" /> <time totalms="134.796" /> </sys> <af type="tenured" id="1" timestamp="Apr 11 21:33:27 2012" intervalms="0.000"> <minimum requested_bytes="48" /> <time exclusiveaccessms="0.244" meanexclusiveaccessms="0.133" threads="1" lastthreadtid="0x0000000115D96400" /> <refs soft="14776" weak="4065" phantom="791" dynamicSoftReferenceThreshold="27" maxSoftReferenceThreshold="32" /> <tenured freebytes="23487488" totalbytes="469762048" percent="4" > <soa freebytes="0" totalbytes="446274560" percent="0" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <gc type="global" id="2" totalid="2" intervalms="52495.745"> <classunloading classloaders="52" classes="14" timevmquiescems="0.000" timetakenms="17.752" /> <finalization objectsqueued="2286" /> <timesms mark="129.401" sweep="6.562" compact="0.000" total="154.076" /> <tenured freebytes="350597360" totalbytes="469762048" percent="74" > <soa freebytes="327109872" totalbytes="446274560" percent="73" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> </gc> <tenured freebytes="350597312" totalbytes="469762048" percent="74" > <soa freebytes="327109824" totalbytes="446274560" percent="73" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <refs soft="13797" weak="1801" phantom="25" dynamicSoftReferenceThreshold="23" maxSoftReferenceThreshold="32" /> <time totalms="163.018" /> </af> <af type="tenured" id="2" timestamp="Apr 11 21:33:49 2012" intervalms="21631.184"> <minimum requested_bytes="64" /> <time exclusiveaccessms="0.089" meanexclusiveaccessms="0.089" threads="0" lastthreadtid="0x0000000118BB6B00" /> <refs soft="14612" weak="2323" phantom="28" dynamicSoftReferenceThreshold="23" maxSoftReferenceThreshold="32" /> <tenured freebytes="23487488" totalbytes="469762048" percent="4" > <soa freebytes="0" totalbytes="446274560" percent="0" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <gc type="global" id="3" totalid="3" intervalms="21639.875"> <finalization objectsqueued="1836" /> <timesms mark="138.777" sweep="7.135" compact="0.000" total="146.230" /> <tenured freebytes="292566400" totalbytes="469762048" percent="62" > <soa freebytes="269078912" totalbytes="446274560" percent="60" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> </gc> <tenured freebytes="292566336" totalbytes="469762048" percent="62" > <soa freebytes="269078848" totalbytes="446274560" percent="60" /> <loa freebytes="23487488" totalbytes="23487488" percent="100" /> </tenured> <refs soft="14592" weak="2055" phantom="27" dynamicSoftReferenceThreshold="19" maxSoftReferenceThreshold="32" /> <time totalms="165.901" /> </af> |
-----------------------
IBM jdk 默认的GC回收策略是mark - sweep 所以每次都是FULL GC 和sun 的分代是不一样的!当然你也可以通过修改参数改成分代策略
<!--End_rbody_78638784//--> |