Heap Memory Usage vs Eden space usage

We have alert policies to trigger when there is 85% of the heap is consumed. But i noticed that it is actually triggering when then PS Eden space is consumption reached to maximum instead of whole Heap memory. Is this Alert (Heap memory usage) only refers for Eden space? Not the whole Heap?

In the below picture Heap Usage is less than 50% but the PS Eden usage is reaching maximum. When there is GC then the graph is coming down which is expected. Please help do we need to worry about this?

The metrics on the JVMs dashboard are queried directly from JMX metrics from the JVM. The out-of-the-box JMX metrics we query are based on the framework and/or version of Java. The out-of-the-box Alerts are going to be based on a pre-defined metric the agent collects unless you’re using a custom metric for the alert.
What are you currently using for your alert?
What is the condition you want to be alerted on?

Here is the heap condition that we have. We want to get alerts when there is high heap usage.

I am facing the same issue… any suggestion?

Hi @nex52737, @HIPaezHidalgo

@nex52737 did you ever solve this?

Something that jumps out to me, is that your alert is in % but your heap is measured in mb. Could you adjust your alert condition to be in mb also?

Hi @GlenOFoghlu not yet. I am facing the same behavior, alert are coming when Eden is reaching max, not when all heap reach max.

What I suspect the cause of confusion here is that there likely are actual data points for a particular JVM or for the application that meet the criteria for the alert condition. The time window that is being viewed may smooth the actual point that met the criteria. The data points are aggregated more as the time window increases.

Here’s how I’d investigate:

Is the alert condition scoped to a Java process or to the Application in rpm (i.e. all reporting processes)?

In either case, narrow (zoom) in the time window to a granularity closer to the time of the reported violation. If the condition is scoped to a particular java process, of course you’ll want to select that JVM to view.

Sorry i completely forgot to update on this. I was confused with Eden space heap usage vs Heap Memory usage. There were spikes in Eden spaces and i suspected that was causing the alerts. But when i changed the time window and narrow down the Heap memory usage graph i see there are spikes. Also one more confusion for this i remember we get alerts which comes in different time zone and i picked that time zone and i don’t find any spike on newrelic. May be i am wrong. But there was confusion around this.

Now all good and we were able profile the jvm to find the memory leak. Thank you.

Hey @nex52737 Thanks for confirming you’re all good now - I’m glad you’ve been able to find the memory leak :smiley: