JVM Overhead Too Big
<p>I had memory problems with one server. It's an amazon micro instance, so its memory is very limited (free -m says 603 MB). That's why I started tomcat with </p>

<pre><code>-server -Xmx290m -Xms290m -XX:MaxPermSize=65m
</code></pre>

<p>However, the "java" process takes around 86% of the total memory, which is 518M. 518-355 = 163 MB overhead. That looks like a lot, and is suspicious, especially given than:</p>

<ul>
<li>a similar application ran on another jvm version on another micro instance doesn't have overhead this big</li>
<li>the same application run locally gives just 40 MB overhead. Locally it runs in Windows 7, 64 bit.</li>
</ul>

<p>The java version on the problematic server is:</p>

<pre><code>java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (amzn-2.3.3.13.amzn1-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
</code></pre>

<p>The big discrepancy between the local runtime and the one on the server makes me exclude the option that there are some expensive off-heap objects (e.g. byte buffers) in the application (and I'm not using any of that anyway). I know that the JVM overhead varies, but having more than 1/2 of the heap as overhead sounds too big. So what could be the reason for that? Or is it a normal way of things?</p>
