I have an application which loads some data from XML.I have given 3GB of Xmx for this with G1GC as garbage collector set.
This works fine but for smaller footprint instances (where data is quite less ~100 MB), memory size still shows ~500MB even after invoking GC.
See attached image:
1. Application started, Size = ~2.75 GB, Used = ~1.5 GB
2. I pressed GC couple of times, Size and Used gets drooped but even now, Size is about 3.3 times of Used. (This 3.3 time holds true for bigger data also).
My question is there any way to reduce the gap between Size and Used memory so that unused memory can be released to OS.