Is there any way to make the JVM release memory to OS more aggressively?
Hi,
I have a bunch of server side apps, deployed in different containers (for various reasons I won't waste time explaining). The tipical usage of this apps is, short amounts of time with high load, and long times of total inactivity.
After startup, each interval of high activity increases memory usage a bit (this is understandable), but intervals of inactivity do not reduce it, so in the end the three apps end up using a lot more memory than strictly necessary.
Is there any tunable to make the JVM release memory to the OS more aggressively if the VM has been idle for a certain amount of time?
Oh, btw, I checked, the heap effectively used during idle intervals is around 20MB, plus some 40-50MB for the bytecode, not the 200+MB allocated.
(and yes, there are no significant memory leaks, check that too, apps can run fully loaded in test harnesses for days and days without giving sign of OOM).

