Java process memory usage (jcmd vs pmap)

后端 未结 3 1834
时光取名叫无心
时光取名叫无心 2020-12-03 22:27

I have a java application running on Java 8 inside a docker container. The process starts a Jetty 9 server and a web application is being deployed. The following JVM options

相关标签:
3条回答
  • 2020-12-03 23:00

    I was facing similar issue with one of our Apache Spark job where we were submitting our application as a fat jar, After analyzing thread dumps we figured that Hibernate is the culprit, we used to load hibernate classes on startup of the application which was actually using java.util.zip.Inflater.inflateBytes to read hibernate class files , this was overshooting our native resident memory usage by almost 1.5 gb , here is a bug raised in hibernate for this issue https://hibernate.atlassian.net/browse/HHH-10938?attachmentOrder=desc , the patch suggested in the comments worked for us, Hope this helps.

    0 讨论(0)
  • 2020-12-03 23:05

    NMT only tracks parts of the memory managed by the JVM, it does not track memory used by native 3rd-party libraries or memory mapped/direct byte buffers.

    0 讨论(0)
  • 2020-12-03 23:09

    After deep analysis according to the following article: https://gdstechnology.blog.gov.uk/2015/12/11/using-jemalloc-to-get-to-the-bottom-of-a-memory-leak/ we found out that the problem is related to memory allocation by java.util.zip.Inflater.

    Still need to find out what calls java.util.zip.Inflater.inflateBytes and look for possible solutions.

    0 讨论(0)
提交回复
热议问题