Today I found my app runing by Java 11 in CentOS 7.x use 500MB+ memory, but I configure the XMX is 256MB. This is my startup script:
nohup ${JAVA_HOME}/bin/java -Xmx256M -Xms128M -jar \
-Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=0.0.0.0:5019 \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/apps/dolphin-post/ \
${APP_HOME}/${APP_NAME} >> /dev/null &
Then I dump the memory jmap -dump:format=b,file=./my.dump 24354
and loaded into Memory Analysis Tool. Shows this report:
The class "java.lang.ref.Finalizer", loaded by "<system class loader>", occupies 6,125,536 (11.96%) bytes. The memory is accumulated in one instance of "java.lang.ref.Finalizer" loaded by "<system class loader>".
Keywords
java.lang.ref.Finalizer
I have no idea where is going wrong. what should I do to find out the problem? In my app, I have not implement the Finalizer by myself.