{"id":10130,"date":"2023-06-23T11:57:26","date_gmt":"2023-06-23T16:57:26","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=10130"},"modified":"2023-06-23T11:57:26","modified_gmt":"2023-06-23T16:57:26","slug":"unable-to-use-jstat-with-cassandra","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=10130","title":{"rendered":"Unable to use JStat with Cassandra"},"content":{"rendered":"<p>We have been having some problems with a Cassandra cluster, so I wanted to look at the java heap space. Unfortunately, jstat cannot find the pid. And, yes, it is the right PID!<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PIDNotFound.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10131\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PIDNotFound.png\" alt=\"\" width=\"523\" height=\"48\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PIDNotFound.png 523w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PIDNotFound-300x28.png 300w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<p>Looking in \/tmp\/hsperfdata_cassandra\/, there&#8217;s no file! Reading through the <em>whole<\/em> line where Cassandra is running, I noticed +PerfDisableSharedMem &#8230; that&#8217;d do it!<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10132\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem.png\" alt=\"\" width=\"1179\" height=\"117\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem.png 1179w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem-300x30.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem-1024x102.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem-768x76.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/06\/Cassandra_jstat_PerfDisableSharedMem-750x74.png 750w\" sizes=\"auto, (max-width: 1179px) 100vw, 1179px\" \/><\/a><\/p>\n<p>It looks like <a href=\"https:\/\/issues.apache.org\/jira\/browse\/CASSANDRA-9242\" target=\"_blank\" rel=\"noopener\">they intentionally set +PerfDisableSharedMem in the Cassandra startup script<\/a>. I assume their rational is still reasonable &#8230; so wouldn&#8217;t remove the parameter for day-to-day operation. But, when there&#8217;s a problem &#8230; restarting Cassandra without this parameter allows us to check how garbage collection is going.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have been having some problems with a Cassandra cluster, so I wanted to look at the java heap space. Unfortunately, jstat cannot find the pid. And, yes, it is the right PID! Looking in \/tmp\/hsperfdata_cassandra\/, there&#8217;s no file! Reading through the whole line where Cassandra is running, I noticed +PerfDisableSharedMem &#8230; that&#8217;d do it! &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1861,578,1862,1592],"class_list":["post-10130","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-cassandra","tag-java","tag-jstat","tag-jvm"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10130"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10130\/revisions"}],"predecessor-version":[{"id":10133,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10130\/revisions\/10133"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}