1

I am trying to diagnose an OOM exception in my process. I am using Jmap and find that it does not report full memory usage of the JVM.

This is the output of jmap -histo:live (truncated):

num     #instances         #bytes  class name
----------------------------------------------
   1:      36143828     1156602496  java.util.concurrent.ConcurrentHashMap$Node
   2:      36122540     1155921280  java.util.UUID
   3:           195      268602800  [Ljava.util.concurrent.ConcurrentHashMap$Node;
   4:          4207       11351968  [B
   5:         38497        3231200  [C
   6:         37708         904992  java.lang.String

Adding up above numbers I get memory usage in the low 2GB's but my grafana dashboard is showing memory usage of almost 16GB!

enter image description here

Where is the missing memory (almost 12GB) going? How can I get the details?

Community
  • 1
  • 1
morpheus
  • 18,676
  • 24
  • 96
  • 159
  • 1
    See [this answer](http://stackoverflow.com/questions/36872551/relation-between-memory-host-and-memory-arguments-xms-and-xmx-from-java/36927242#36927242). – apangin Jul 15 '16 at 19:55
  • and what does that graph even measure? – the8472 Jul 15 '16 at 23:06
  • Thanks @apangin. Please let me know if you have more pointers. – morpheus Jul 16 '16 at 15:58
  • @morpheus You need to graph the size of the heap after a full GC to see how memory is being used in the heap. If you are looking at the memory total, this can include heap waiting to be used and any number of off heap regions. – Peter Lawrey Jul 16 '16 at 17:53

0 Answers0