Unnaccounted memory in Java application running in Cloud Foundry


Lorenzo Jorquera <lorenzo.jorquera@...>
 

Hello,

I am running a Java application in Cloud Foundry V3. The manifest
indicates 2000Mb of memory. The Java memory parameters (obtained via jcmd)
are as follow:

-XX:CICompilerCount=3 -XX:+HeapDumpOnOutOfMemoryError
-XX:InitialHeapSize=524288000 -XX:MaxHeapSize=641728512
-XX:MaxMetaspaceSize=268435456 -XX:MaxNewSize=213909504
-XX:MetaspaceSize=268435456 -XX:MinHeapDeltaBytes=524288
-XX:NativeMemoryTracking=summary -XX:NewSize=174587904
-XX:OldSize=349700096 -XX:ThreadStackSize=1024
-XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC

So, the application has a heap size of ~ 600 Mb and a Metaspace size of ~
256 Mb.

However, if I execute top, I get:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
34 vcap 0 -20 5756056 1.574g 28632 S 0.3 10.7 3:12.94
java


So for the operating system the process is using nearly 1.6 Gb, while the
Heap and Metaspace are configured to only use 856Mb.

I thought that it was possible that the difference would be in Native
Memory, but the native memory reported usage is also much less than 1.6 Gb:


cap(a)hqcquhb1si9:~$ /home/vcap/app/.java-buildpack/open_jdk_jre/bin/jcmd 34
VM.native_memory
34:

Native Memory Tracking:
Total: reserved=2203649KB, committed=960861KB
- Java Heap (reserved=626688KB, committed=609280KB)
(mmap: reserved=626688KB, committed=609280KB)


So, my doubt is, what are this extra 700Mb?



--
Lorenzo Jorquera

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.