This agent for those cases in which the memory consumption of the Java programs is more undesirable, than performance of the application.
-Xminf0.1
-Xmaxf0.2
-XX:NewRatio=20
-XX:-UseAdaptiveSizePolicy
-javaagent:/path/to/agent/memory-agent.jar=warmLevel=8.0,gcPeriod=4
memory-agent.sh <pid> [parameters]
Example:
memory-agent.sh 21987 warmLevel=8.0,gcPeriod=4
- warmTimeout - timeout in seconds after the last seen CPU warm.
- warmLevel - level in percents of the process CPU load, which accepted as the CPU warm.
- gcPeriod - period in seconds for the consecutive GC invocation during the memory shrinking.
- gcStopCounter - count of the GC after that GC is stop if the committed memory is not changed after the GC.
All parameters are optional.