{"id":5797,"date":"2016-09-30T14:25:05","date_gmt":"2016-09-30T19:25:05","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=5797"},"modified":"2016-09-30T14:25:05","modified_gmt":"2016-09-30T19:25:05","slug":"setting-java-command-line-flags-when-value-is-default","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2016\/09\/30\/setting-java-command-line-flags-when-value-is-default\/","title":{"rendered":"Setting java command line flags when value is default"},"content":{"rendered":"<p>Just a snippet of how I proved we were setting values to the default.  While this has no negative impact, it does result in needless conversations like&#8230;<\/p>\n<p>&#8220;Why did we set that?&#8221;<br \/>\n&#8220;It&#8217;s the default, don&#8217;t worry about it.&#8221;<br \/>\n&#8220;Really?  Are you sure?&#8221;<\/p>\n<p>Not every one is the default, but some of the more esoteric ones are.  What we have set&#8230;<\/p>\n<pre>\r\nbash-4.1$ ps -ef | grep java | grep -v grep | awk '{while (++i <= NF) {print i,$i}}' | grep XX | cut -f2 -d: | sort\r\n+CMSClassUnloadingEnabled\r\n+CMSParallelRemarkEnabled\r\n+CMSScavengeBeforeRemark\r\n+DisableExplicitGC\r\nGCLogFileSize=100M\r\n+HeapDumpOnOutOfMemoryError\r\nHeapDumpPath=\/app\/dumps\/heap_ecm05_ecm01.20160929.0747.hprof\r\nMaxNewSize=4g\r\nMaxPermSize=384m\r\nNewSize=4g\r\nNumberOfGCLogFiles=10\r\nPermSize=384m\r\n+PrintClassHistogram\r\n+PrintGCDateStamps\r\n+PrintGCDetails\r\n+PrintTenuringDistribution\r\nReservedCodeCacheSize=96m\r\n+ScavengeBeforeFullGC\r\nThreadStackSize=256\r\n-TraceClassUnloading\r\n+UseCMSInitiatingOccupancyOnly\r\n+UseConcMarkSweepGC\r\n+UseGCLogFileRotation\r\n+UseParNewGC\r\n<\/pre>\n<p>...and the defaults...<\/p>\n<pre>\r\nbash-4.1$ for f in $(ps -ef | grep java | grep -v grep | awk '{while (++i <= NF) {print i,$i}}' | grep XX | cut -f2 -d: | sed -e 's\/+\/\/g' | sed -e 's\/-\/\/g'); do \r\n  java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version 2>&1 | grep $f; \r\ndone | grep = | sort -k +2\r\n     bool CMSClassUnloadingEnabled                  = false           {product}\r\n     bool CMSParallelRemarkEnabled                  = true            {product}\r\n     bool CMSScavengeBeforeRemark                   = false           {product}\r\n     bool DisableExplicitGC                         = false           {product}\r\n     bool HeapDumpOnOutOfMemoryError                = false           {manageable}\r\n     bool PrintClassHistogramAfterFullGC            = false           {manageable}\r\n     bool PrintClassHistogramBeforeFullGC           = false           {manageable}\r\n     bool PrintClassHistogram                       = false           {manageable}\r\n     bool PrintGCDateStamps                         = false           {manageable}\r\n     bool PrintGCDetails                            = false           {manageable}\r\n     bool PrintTenuringDistribution                 = false           {product}\r\n     bool ScavengeBeforeFullGC                      = true            {product}\r\n     bool TraceClassUnloading                       = false           {product rw}\r\n     bool UseCMSInitiatingOccupancyOnly             = false           {product}\r\n     bool UseConcMarkSweepGC                        = false           {product}\r\n     bool UseGCLogFileRotation                      = false           {product}\r\n     bool UseParNewGC                               = false           {product}\r\nbash-4.1$\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Just a snippet of how I proved we were setting values to the default. While this has no negative impact, it does result in needless conversations like&#8230; &#8220;Why did we set that?&#8221; &#8220;It&#8217;s the default, don&#8217;t worry about it.&#8221; &#8220;Really?&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2016\/09\/30\/setting-java-command-line-flags-when-value-is-default\/\">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":[7,77],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5797"}],"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=5797"}],"version-history":[{"count":4,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5797\/revisions"}],"predecessor-version":[{"id":5802,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5797\/revisions\/5802"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=5797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=5797"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=5797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}