{"id":3332,"date":"2013-12-28T17:07:13","date_gmt":"2013-12-28T22:07:13","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=3332"},"modified":"2013-12-28T17:07:13","modified_gmt":"2013-12-28T22:07:13","slug":"gathering-information-from-hotspot-garbage-collection-logs","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2013\/12\/28\/gathering-information-from-hotspot-garbage-collection-logs\/","title":{"rendered":"Gathering information from HotSpot garbage collection logs"},"content":{"rendered":"<p>What is below is a useful script to print actionable information from garbage collection logs.  As shown by the CMS output below, this is built for the CMS collector.  Anything with initial-mark or remark in the output is a &#8220;stop the world&#8221; operation.  You can take the seconds in the last column to determine how often your application was stopped performing these operations for a tenured collection.<\/p>\n<pre lang=\"awk\">\r\n-bash-4.1$ awk '$0 ~ \"CMS\" {i=1;while(++i <= NF) {if ($i ~ \"CMS\") {gsub(\"\\\\[\",\"\",$i);component=$i} else if ($i ~ \"real=\") {split($i,t,\"=\");gsub(\":\",\"\",$1);printf(\"%-40s %-8.2f %-8.2f %-8.2f\\n\",component,$1-t[2],$1,t[2])}}}' gc.log\r\nCMS-initial-mark:                        1115.69  1116.06  0.37\r\nCMS-concurrent-mark:                     1116.44  1162.68  46.24\r\nCMS-concurrent-preclean:                 1162.68  1171.75  9.07\r\nCMS-concurrent-abortable-preclean:       1171.75  1171.94  0.19\r\nCMS-remark:                              1172.15  1172.50  0.35\r\nCMS-concurrent-sweep:                    1172.85  1206.67  33.82\r\nCMS-concurrent-reset:                    1206.67  1206.71  0.04\r\nCMS-initial-mark:                        1990.37  1990.89  0.53\r\nCMS-concurrent-mark:                     1991.44  2052.91  61.47\r\nCMS-concurrent-preclean:                 2052.91  2056.52  3.61\r\nCMS-concurrent-abortable-preclean:       2056.52  2059.38  2.86\r\nCMS-remark:                              2058.34  2059.38  1.04\r\nCMS-concurrent-sweep:                    2060.43  2161.88  101.45\r\nCMS-concurrent-reset:                    2162.57  2163.41  0.84\r\nCMS-initial-mark:                        2301.79  2302.06  0.27\r\nCMS-concurrent-mark:                     2302.35  2394.26  91.91\r\nCMS-concurrent-preclean:                 2394.26  2415.15  20.89\r\nCMS-concurrent-abortable-preclean:       2415.15  2418.56  3.41\r\nCMS-remark:                              2418.13  2418.56  0.43\r\nCMS-concurrent-sweep:                    2419.01  2519.19  100.18\r\nCMS-concurrent-reset:                    2519.19  2519.21  0.02\r\nCMS-initial-mark:                        2559.49  2559.67  0.18\r\nCMS-concurrent-mark:                     2559.86  2656.81  96.95\r\nCMS-concurrent-preclean:                 2656.82  2675.72  18.90\r\nCMS-concurrent-abortable-preclean:       2675.72  2678.90  3.18\r\nCMS-remark:                              2678.00  2678.90  0.90\r\nCMS-concurrent-sweep:                    2679.82  2763.69  83.87\r\nCMS-concurrent-reset:                    2763.68  2763.72  0.04\r\nCMS-initial-mark:                        3062.84  3062.99  0.15\r\nCMS-concurrent-mark:                     3063.15  3166.53  103.38\r\nCMS-concurrent-preclean:                 3166.56  3203.33  36.77\r\nCMS-remark:                              3202.78  3203.34  0.56\r\nCMS-concurrent-sweep:                    3203.92  3305.79  101.87\r\nCMS-concurrent-reset:                    3305.78  3306.19  0.41\r\nCMS-initial-mark:                        3307.88  3308.08  0.20\r\n-bash-4.1$\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What is below is a useful script to print actionable information from garbage collection logs. As shown by the CMS output below, this is built for the CMS collector. Anything with initial-mark or remark in the output is a &#8220;stop&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2013\/12\/28\/gathering-information-from-hotspot-garbage-collection-logs\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[24,25,14,16],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3332"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3332"}],"version-history":[{"count":4,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3332\/revisions"}],"predecessor-version":[{"id":3387,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3332\/revisions\/3387"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3332"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}