{"id":6372,"date":"2016-10-12T21:04:37","date_gmt":"2016-10-12T13:04:37","guid":{"rendered":"http:\/\/rmohan.com\/?p=6372"},"modified":"2016-10-13T05:46:15","modified_gmt":"2016-10-12T21:46:15","slug":"setting-java-garbage-collection-policies","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6372","title":{"rendered":"Setting Java garbage collection policies"},"content":{"rendered":"<p><strong>Navigate to the JVM which you want to set gc policy as mentioned in below figure.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/10\/verbose1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6373\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/10\/verbose1.png\" alt=\"verbose1\" width=\"400\" height=\"100\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose1.png 400w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose1-300x75.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose1-150x38.png 150w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>Enter the gc policy which you want to set in the text field <i>&#8220;Generic JVM arguments &#8220;<\/i><br \/>\nother gc policies which you can set for JDK 5 are:-<br \/>\n<i>-Xgcpolicy:optthruput<\/i><br \/>\n<i>-Xgcpolicy:optavgpause<\/i><br \/>\n<i>-Xgcpolicy:subpool<\/i><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/10\/verbose3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6374\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/10\/verbose3.png\" alt=\"verbose3\" width=\"627\" height=\"190\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose3.png 627w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose3-300x91.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose3-150x45.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/10\/verbose3-400x121.png 400w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Save and synchronize the change and then restart the JVM (server1).<br \/>\nIf you take JVM process status in unix\/linux you will be able to see an entry similar to below. Below screen is from a windows javacore dump file.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Navigate to the JVM which you want to set gc policy as mentioned in below figure.<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p>Enter the gc policy which you want to set in the text field &#8220;Generic JVM arguments &#8220; other gc policies which you can set for JDK 5 are:- -Xgcpolicy:optthruput -Xgcpolicy:optavgpause -Xgcpolicy:subpool<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p>Save and [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6372"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6372"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6372\/revisions"}],"predecessor-version":[{"id":6375,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6372\/revisions\/6375"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}