??????Java?????????????????????????????????????
???????????С???????????????????ú????????????????????????????????????????????????????????????????????Java???????У?????к???????GC?????????????——??????????????????GC???????????????к??????????Щ????????????????Java??????????Haim Yadid?????????Java performance tuning guide?????·?????Takipi????????
???????????????????????????????????????????????????????Щ????????????????й??????????????????????????
???????????7????
????1.????????????????
????????????4??????????HotSpot JVM?????4??????????????Serial??Parallel/Throughput.CMS??and the new kid on the block G1?????????????Щ???????????????????????????????Shenandoah????????JVM???????????C4——Azul????????????????????HotSpot??????Parallel/Throughput?????????????????????????г????????????CMS??G1???GC????GC pause????????????????????????????????????????????Parallel??????????????????????????????????С??????????£?Parallel????????????????????????
??????????????????????????GC????????????????????????????????
????2.???У?Parallel??????????Concurrent??
???????GC?????Garbage Collection cycle????????STW??Stop-The-World????????????????????GC????????????????д???????????ó????????????????GC?????????????е???????????????????е??????????????????????????GC?????????????????????????????????GC??????????ζ??????????GC??????GC???????У????????????????????????????????????GC??????????????GC???????
?????????????????????????????????????GC?????GC???????У????????????????
????3.G1????????????
??????????????????????Java 7????????G1????????????JVM?????????????μ??????G1?????????????CMS?г???????????????GC?????????????Old Generation??????????飬???????????????????????????????JVM??????????????????ò????????????Щ?????????????????????Щ????????????????????G1?и?????????????????????????
????????????????漣????????????????GC???????????????????????????????????
????4.?????????????????????????
???????????????????????????????????????????Щ???????Щ????????????????????????????????????????????????????????????????????????o??100ms???????GC???????????1???????ɡ?????????????????????????????????????????????????1%????????????????????????????????????????????????????????????????????????????????????????????????????Gil Tene??????
???????????????Щ???????????????????1%?????????????????1%??
????5.?????????????????????GC?????????
???????????????????е?????????????????long-lived??????????????????????????????е???????mid-lived?????????????????????????????short-lived???????????????????????????????GC?????????????????????е????????????????????????????????????????????????????????Ч???????????е????????????????????????????
??????????????????????????????????????????????????й???????Щ????????????????鷳??????
????6.???????????????
??????????????????????????????????????JVM???????е?????????????????檔?????GC?????????????????????????????и???????????????????о???????????????????????У???????????????????????????????????????ù??????????????????????????????
????????????????е????????????????JVM?????????????????????????????塣???????????????????????
????7.GC????????????????
??????????????????????????????????????????????????м?????Java 7?л??????????????????????С?????????????t???????????GC????????????????????????JVM?????????????????????й????????????????????GC??????5%?????????????????????GC????????????????С????????????ж??????????????????????
?????????????????Χ??????????????????????????е????????????????????????μ????硣
???????
???????????????????????????????Java????????????????????????????г????????????????????Χ?????????????GC?????????????????????????????