<p>I am running a logstash Kubernetes pod, I have set LS_JVM_OPTS := -Xmx1g -Xms500m, and monitoring the same using Prometheus grafana, I see memory usage 3.2 Gig. May I know what is happening here?</p>

Guna K K
<p>You are probably seeing the container memory used and not the heap size, there are other things <a href="https://www.elastic.co/guide/en/logstash/current/jvm-settings.html#heap-size" rel="nofollow noreferrer">in the JVM</a> like the GC that require memory. Although, <code>3.2G</code> seems a bit excessive for that heap 😲, so you might want to check 🔬 that the logstash JVM does indeed have those heap options.</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl exec -t &lt;pod-name&gt; -c &lt;container-name&gt; -- /bin/ps -Af | grep java
</code></pre>
<p>You can also check 🕵️ what <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="nofollow noreferrer">request/limits</a> you have in your container, to see if you are requesting 3.2Gb initially.</p>
<pre class="lang-sh prettyprint-override"><code>kubectl get pod &lt;logstash-pod-name&gt; -c &lt;container-name&gt; -o=yaml 
</code></pre>
