# Show JVM heap used bytes in Data explorer. "Average" or "Sum" Which is better?

**URL:** <https://community.dynatrace.com/t/show-jvm-heap-used-bytes-in-data-explorer-average-or-sum-which-is-better/33652>\
**Category:** Dashboarding\
**Tags:** data-explorer, jvm, dashboards-classic\
**Created:** [December 29, 2021, 8:00am UTC](https://community.dynatrace.com/t/show-jvm-heap-used-bytes-in-data-explorer-average-or-sum-which-is-better/33652 "2021-12-29T08:00:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shirai](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/shirai/32/27711_2.png) [@Shirai](https://community.dynatrace.com/u/Shirai)\
**Post date:** [December 29, 2021, 8:00am UTC](https://community.dynatrace.com/t/show-jvm-heap-used-bytes-in-data-explorer-average-or-sum-which-is-better/33652/1 "2021-12-29T08:00:43Z")

</div>

Hi everyone.

I created a graph of JVM heap memory used bytes in Data exlorer. However, when I created it with the default “Average”, the correct number was not displayed. Then I changed “Average” to “sum” and I got the correct result. Does anyone know why “Average” doesn’t give the correct results?  
By the way, the graph of Host memory used byets is “Average” and the correct result is displayed.

Toshimasa Shirai

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 29, 2021, 11:17am UTC](https://community.dynatrace.com/t/show-jvm-heap-used-bytes-in-data-explorer-average-or-sum-which-is-better/33652/2 "2021-12-29T11:17:50Z")

</div>

[@Shirai](https://community.dynatrace.com/user/32074)

The “JVM heap memory pool used bytes” (builtin:tech.jvm.memory.pool.used) is announced as having the following aggregations: auto, avg, max, min

In Data Explorer you can use others though, to your advantage. Please note the following points:

- In a certain Process, you can check how many poolnames there are in the “Further details” section. Each of these pools has a certain consumption of memory.
- Beware that certain processes are really an agregate of different PIDs…
- If you average the value, you will get the average value between all the pools
- If you sum, you will get the value summed of all the pools. That’s what most people might be expecting, but don’t forget to filter for a certain process, because if not, you might get values summed across several hosts, for instance.
- If you want to double-check, if you aggregate with count, you will see how many pools there are, and be able to confirm with the number of pools in the “Further details” section.
- You can also split by “poolname” and it will show you each one of the individual pools 😀

---

<div class="post-metadata">

**Author:** ![Shirai](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/shirai/32/27711_2.png) [@Shirai](https://community.dynatrace.com/u/Shirai)\
**Post date:** [December 29, 2021, 3:02pm UTC](https://community.dynatrace.com/t/show-jvm-heap-used-bytes-in-data-explorer-average-or-sum-which-is-better/33652/3 "2021-12-29T15:02:35Z")

</div>

Hi Antonio-san.

Thanks to your wonderful comments, my problem has been completely resolved.

Toshimasa Shirai.
