Hi,
Am 05.01.2024 um 23:21 schrieb Brian Braun:
Tracking native memory usage can be tricky depending upon your
environment. I would only look into that if there were somethng very odd
going on, like your process memory space seems to be more than 50% taken
by non-java-heap memory.
Well, actually that is my case. The heap memory (the 3 G1s) and non-heap
memory (3 CodeHeaps + compressed class space + metaspace) together use just
a few hundred MBs. I can see that using Tomcat Manager as well as the other
monitoring tools. And the rest of the memory (about 1GB) is being used by
the JVM but I don't know why or how, and that started 2 months ago. In your
case you have just 20-25% extra memory used in a way that you don't
understand, in my case it is about 200%.
Have you tried limiting native memory (-XX:MaxDirectMemorySize)? If not
set this can be as large as your maximum heap size according to
https://github.com/openjdk/jdk/blob/ace010b38a83e0c9b43aeeb6bc5c92d0886dc53f/src/java.base/share/classes/jdk/internal/misc/VM.java#L130-L136
From what I know:
total memory ~ heap + metaspace + code cache + (#threads * thread stack
size) + direct memory
So if you set -Xmx to 1GB this should also allow 1GB of native memory
which may result in more then 2GB of memory used by the JVM
Regards,
Stefan Mayr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org