G1 collector consuming up to ~35GB memory?

Bengt Rutisson bengt.rutisson at oracle.com
Thu Jul 19 13:32:10 UTC 2012


Hi Nils,

Sorry for the late reply.

Thanks for trying G1 out and reporting issues!

You mention that you have a simple benchmark with which you can see the 
large process overhead with G1. I built my own simple LRU cache and ran 
G1 with 60 GB and 120 GB heap. I'm also allowing about 10 GB or free 
heap. In my tests I get a stable resident set of about 62 GB and 125 GB, 
respectively. So, not a a lot of overhead.

I also tried to run SPECjbb2005 with large heaps, but did not see any 
significant overhead in the resident set.

Could you please send me your benchmark and the command line you used to 
produce the numbers you listed?

Thanks,
Bengt

On 2012-06-20 23:49, Neil Ferguson wrote:
> Hi all.
>
> When using the G1 collector with large heap sizes I'm seeing the JVM 
> process grow much larger than my heap size, sometimes by as much as 
> 35GB. Here are some examples:
>
> Heap size 60GB, java process size: 85GB
> Heap size 120GB, java process size: 158GB
> Heap size 240GB, java process size: 274GB
> Heap size 480GB, process killed by Linux
>
> I'm quoting the resident set as reported by the Linux ps command. The 
> virtual memory size of the process is typically a few GB larger. This 
> is on a machine with 512GB RAM, running Linux  2.6.32-220.el6.x86_64 
> and Java 1.7.0_05-b05.
>
> Typically the process size grows gradually over the first 30 minutes 
> or so of my test, then flattens out and doesn't grow any more. I'm 
> running a fairly trivial benchmark, which repeatedly adds items to a 
> bounded (LRU) cache. There's typically around 10GB free on the heap in 
> each of my tests.
>
> Does anyone know if this is the expected behaviour for G1? It seems 
> rather a lot of memory to be using, over the heap size. I've run the 
> same test with the parallel collector with a heap size of 60GB, and 
> the process size stabilizes quickly to around 62GB.
>
> Thanks.
>
> Neil.




More information about the hotspot-gc-dev mailing list