<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jvm on Personal weblog</title>
    <link>https://carl.duevel.online/tags/jvm/</link>
    <description>Recent content in Jvm on Personal weblog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Fri, 20 Jan 2023 20:40:30 +0100</lastBuildDate>
    <atom:link href="https://carl.duevel.online/tags/jvm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Harvest Java Heap Dumps in constrained environments</title>
      <link>https://carl.duevel.online/blog/create-heapdumps/</link>
      <pubDate>Fri, 20 Jan 2023 20:40:30 +0100</pubDate>
      <guid>https://carl.duevel.online/blog/create-heapdumps/</guid>
      <description>&lt;p&gt;Creating and analyzing Heap Dumps is a standard for analyzing memory issues with&#xA;JVM based programs. To do this, you have to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create the Heap Dump (duh!)&lt;/li&gt;&#xA;&lt;li&gt;move the data to your computer &lt;/li&gt;&#xA;&lt;li&gt;actually analyze the data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Each of these steps has it&amp;#39;s own challenges though the first two seem trivial at&#xA;first sight.&lt;/p&gt;&#xA;&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-1&#34;&gt;&#xA;Creating the Heap Dump&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;The main challenge in Heap Dump creation I faced in today&amp;#39;s production environments&#xA;is that only essential software is installed in order to keep containers and the&#xA;potential attack surface small. So likely there is only a JVM which is enough to&#xA;run the program but not enough to get a Heap Dump. Through the recommendation of&#xA;a colleague I became aware of &lt;a href=&#34;https://github.com/apangin/jattach&#34;&gt;jattach&lt;/a&gt;. It describes itself as:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why does MaxRAMPercentage stop working at heaps of ~ 30 GB?</title>
      <link>https://carl.duevel.online/blog/max_ram_percentage/</link>
      <pubDate>Sat, 22 Jan 2022 18:30:50 +0100</pubDate>
      <guid>https://carl.duevel.online/blog/max_ram_percentage/</guid>
      <description>&lt;p&gt;&#xA;The other day at work a Clojure program on a machine with 100 GB ran into OutOfMemory&#xA;errors. A quick look at the metrics showed that the heap was only at about 30 GB&#xA;though. Checking the JVM flags I found a configuration that is commonplace:&lt;/p&gt;&#xA;&lt;div class=&#34;src src-bash&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;-XX:MaxRAMPercentage&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;80&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So one would assume that the JVM could have sized the heap much larger than it&#xA;actually did. Thanks to docker this behavior can be observed quite easily by&#xA;doing a few tests like this one:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
