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).

[940 byte] By [andrea.aimea] at [2007-11-27 6:28:20]
# 1
-XX:MaxHeapFreeRatio specifies the amount of the heap that must be free before the garbage collector will return pages to the OS. The default value is something like 70, so you won't see pages being returned unless the heap is 70% empty.
YoGeea at 2007-7-12 17:51:31 > top of Java-index,Java HotSpot Virtual Machine,Specifications...