{"id":11480,"date":"2023-04-07T13:47:05","date_gmt":"2023-04-07T19:47:05","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/techblog\/?p=11480"},"modified":"2023-06-21T14:17:35","modified_gmt":"2023-06-21T20:17:35","slug":"improve-tomcat-9-performance","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=improve-tomcat-9-performance","title":{"rendered":"Improve Tomcat 9 Performance"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>Some of our clients have noticed that upgrading to Tomcat 9 has brought about sluggish performance. In particular, looking at the server&#8217;s task manager, it appears that there is a &#8220;heart beat&#8221; of CPU spiking every few seconds, up to 100%. This occurs even if the m-Power use is idle. If this is happening on your sever, please follow these steps to resolve.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps<\/h2>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Note: Your m-Power development environment <strong>must <\/strong>be on the <strong>April 2023 release or later<\/strong> to utilize the features offered in this document.<\/p>\n\n\n\n<div class=\"wp-block-ht-blocks-list heroic-styled-list\" id=\"heroic-styled-list-\"><ol class=\"fa-ul\"><li>Open the server.xml in \\mrc\\development\\m-power\\tomcat\\conf\\server.xml. Look for any references to reloadable=&#8221;true&#8221;. Set these all to false<\/li><li>Repeat the above step in the \\mrc\\production\\m-power\\tomcat\\conf\\server.xml<\/li><li>Finally, edit the mrc-runtime.properties file in \\mrc\\development\\m-power\\mrcjava\\WEB-INF\\classes. Add the following text on a new line: <code>force_reload_on_compile=true<\/code><\/li><\/ol><style>#heroic-styled-list- li:before{\n\t\t\t\t\t\t   background:#000000;\n\t\t\t\t\t\t   border-radius: 0;\n\t\t\t\t\t\t   }<\/style><\/div>\n\n\n\n<p>We have found that certain combinations of the JDK along with certain Tomcat versions cause Tomcat to do a complete jar scan on any instances where reloadable is set to <code>true<\/code> in Tomcat. By turning this off, this automatic scan stops. However, this is problematic in development as we need Tomcat to recognize newly compiled applications. This is specifically why you need to add the change to mrc-runtime.properties in development only. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\">These steps are unnecessary for production, however, because production instances do not need to be automatically reloaded: Rather, changes are made to production, then Tomcat is restarted during off hours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Some of our clients have noticed that upgrading to Tomcat 9 has brought about sluggish performance. In particular, looking at the server&#8217;s task manager, it appears that there is a &#8220;heart beat&#8221; of CPU spiking every few seconds, up to 100%. This occurs even if the m-Power use is&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[152],"ht-kb-tag":[],"class_list":["post-11480","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-administration"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11480"}],"version-history":[{"count":4,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11480\/revisions"}],"predecessor-version":[{"id":11936,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11480\/revisions\/11936"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11480"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=11480"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=11480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}