by throwaway45391 · 3y ago · 0 comments
I think Java tends to grow memory usage up to a point, rather than to try and release it at the cost of performance. That doesn't mean it would not be able to run on a machine with lower memory. It could run more expensive GC if it was needed
So in my above scenario, I could indeed run the app with a -Xmx32M and yet the application was still using 200-300MB of resident memory (RSS) due to offheap usage.
-XX:NativeMemoryTracking=summary
jcmd <pid> VM.native_memory summary
Currently I can't run my integration tests on my work laptop because they spin up a bunch of "micro" services, so I run out of ram and need to reboot.
The memory that Java "doesn't require" really adds up.