0

The memory used by jvm increasing slowly.

use 'top', 'RES' is increasing slowly.

top info

use 'jstat' to check heap memory:

jstat info

heap memory is normal.

use 'jstack' print the thread info, about 180 threads and seems no problem. so stack memory is also OK.

other info:

java version "1.8.0_152"

jvm startup params: -Xms4096M -Xmx4096M -Xmn2048M -Xss256K -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256M -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5 -XX:-OmitStackTraceInFastThrow -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:MaxDirectMemorySize=256M

Anyone can tell me some suggestions to solve this promblem?

nuaa_tiger
  • 31
  • 1
  • 9
  • 1
    Use [Native MemoryTracking](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr007.html), pmap, jemalloc, async-profiler and other tools/techniques discussed in the linked questions. – apangin Nov 20 '19 at 07:57
  • Also [this presentation](https://vimeo.com/364039638) should answer the question. – apangin Nov 20 '19 at 08:00
  • Usually it is about not closed resources (files, ports, streams, zip inflaters/deflaters). Sometimes even static analysis/code review is enough. – Michal Kordas Nov 20 '19 at 10:22
  • @apangin Follow your advise, I have used pmap,NMT and async-profiler try to find the problem, only got a Suspicious place from pmap. I followed you at Twitter, can I contact you privately? thank you! – nuaa_tiger Nov 22 '19 at 08:53

0 Answers0