Old generation doesn't get freed even after multiple System.gc()
kirk at kodewerk.com
Thu Nov 1 00:29:25 UTC 2012
IN addition to what Ramki and Peter have said, what I've observed is that soft references will be less aggressively cleaned up with larger heap sizes which leads to a larger retained set size.
On 2012-10-31, at 11:20 AM, Ashish Saxena <anantiitrke at gmail.com> wrote:
> Hi Team,
> We are observing that even after multiple full GC, JVM doesn't clear
> the Old generation. Full GC do occur (as seem from GC logs), but it
> performs Young generation collection followed by promotion into old
> generation but the old generation collection doesn't happen.
> When Heap size is low (1 GB), after multiple full GC, total heap size
> after GC is around 400 MB.
> But with Heap size is high(8 GB), after multiple full GC, total heap
> size after GC is around 1300 MB. GC logs confirms that old generation
> is not getting collected.
> It seems that on receiving request for full GC,
> 1. JVM triggers young generation GC
> 2. Checks the occupancy of old generation, and triggers Old generation
> GC only if there is memory pressure.
> Is there a way by which we can instruct JVM to trigger Old generation
> collection each time full GC is triggered ? This is required to
> measure actual memory usage (without garbage) of the application.
> Thanks and Regards,
> Ashish A. Saxena
More information about the hotspot-gc-dev