RFR (S): [increase HeapBaseMinAddress for G1] 8012265: VM often crashes on solaris with a lot of memory
Mikael Gerdin
mikael.gerdin at oracle.com
Thu Jun 13 06:07:02 PDT 2013
Bengt,
On 2013-06-13 08:58, Bengt Rutisson wrote:
>
> Hi everyone,
>
> Could I have a couple of reviews for this change?
>
> http://cr.openjdk.java.net/~brutisso/8012265/webrev.00/
this looks good to me.
/Mikael
>
> Sending this to the broad hotspot list since it affects compressed oops,
> which is a VM wide concern.
>
> Background:
>
> The G1 GC uses malloc extensively to allocate auxiliary data structures.
> On Solaris malloc requires a consecutive chunk of memory for the C-heap.
> It picks this chunk in the low addresses so when hotspot maps the Java
> heap in the low addresses to get compressed oops we limit the available
> memory for the C-heap on Solaris.
>
> For compressed oops the Java heap is mapped at HeapBaseMinAddress, which
> by default is 2GB on all platforms except Solaris x86 where it is 256MB.
> If we have a large Solaris x86 we get many GC worker threads and many G1
> heap regions. All of them requiring substantial C-heap allocations.
>
> The combination of a limited C-heap and a lot of mallocs for G1 may
> cause us to run out of memory on large Solaris x86 machines, even with
> our default settings.
>
> The long term solution is to change G1 to be more efficient about its
> memory consumption and preferably use mapped memory instead of malloced
> memory. This is a lot of work, but will definitely have to be done.
>
> A short term solution to reduce the risk of running out of memory is to
> increase the default value of HeapBaseMinAddress for G1. That is what my
> proposed patch does.
>
> This will reduce the maximum possible heap sizes for compressed oops
> without a heap base. Shifted compressed oops will be reduced from almost
> 32g to 31g and unshifted compressed oops from almost 4g to 3g. Still
> more than on any other platform where HeapBaseMinAddress=2g by default.
> It will only affect G1 and it can be overridden by explicitly setting
> HeapBaseMinAddress on the command line.
>
> I've filed this enhancement in JBS to track the work to change back the
> default value:
>
> JDK-8016505: G1: Revert back to use HeapBaseMinAddress=256m on Solaris x86
>
> Thanks,
> Bengt
More information about the hotspot-dev
mailing list