Why different default values for MetaspaceSize?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why different default values for MetaspaceSize?

tstuefe
Hi,

Does anyone know why the default for MetaspaceSize (the initial threshold
which triggers the first metaspace-motivated GC) is cpu- and
compiler-tier-dependent?

IIUC this has been the way since PermGen removal.

I can see a vague connection between compiler tier and this size since
MethodCounters live in metaspace and we probably have more of them with C2?
I'm guessing here. But the size difference is not large at all (16m vs 12m)
and probably does not make a big difference. Why not just set it to one
default size?

Thanks, Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Why different default values for MetaspaceSize?

Coleen Phillimore-2


On 2/17/21 8:08 AM, Thomas Stüfe wrote:
> Hi,
>
> Does anyone know why the default for MetaspaceSize (the initial threshold
> which triggers the first metaspace-motivated GC) is cpu- and
> compiler-tier-dependent?
>
> IIUC this has been the way since PermGen removal.

The MetaspaceSize option came from PermSize which was platform
dependent.  I don't think it needs to be like that now.
Some configurations may way to ergonomically set MetaspaceSize larger to
prevent early GCs but that shouldn't be platform dependent.
The ScaleForWordSize is a macro that increases the size for 64 bits. 
I'm not sure if that's still needed but that should cover any 32/64 bit
dependencies on the size you pick as the default (between 16 and 12M). 
Thanks to StefanK for consultation.

Coleen


>
> I can see a vague connection between compiler tier and this size since
> MethodCounters live in metaspace and we probably have more of them with C2?
> I'm guessing here. But the size difference is not large at all (16m vs 12m)
> and probably does not make a big difference. Why not just set it to one
> default size?
>
> Thanks, Thomas

Reply | Threaded
Open this post in threaded view
|

Re: Why different default values for MetaspaceSize?

tstuefe
Thank you, Coleen and Stefan!

On Wed, Feb 17, 2021, 15:56 Coleen Phillimore <[hidden email]>
wrote:

>
>
> On 2/17/21 8:08 AM, Thomas Stüfe wrote:
> > Hi,
> >
> > Does anyone know why the default for MetaspaceSize (the initial threshold
> > which triggers the first metaspace-motivated GC) is cpu- and
> > compiler-tier-dependent?
> >
> > IIUC this has been the way since PermGen removal.
>
> The MetaspaceSize option came from PermSize which was platform
> dependent.  I don't think it needs to be like that now.
> Some configurations may way to ergonomically set MetaspaceSize larger to
> prevent early GCs but that shouldn't be platform dependent.
> The ScaleForWordSize is a macro that increases the size for 64 bits.
> I'm not sure if that's still needed but that should cover any 32/64 bit
> dependencies on the size you pick as the default (between 16 and 12M).
> Thanks to StefanK for consultation.
>
> Coleen
>
>
> >
> > I can see a vague connection between compiler tier and this size since
> > MethodCounters live in metaspace and we probably have more of them with
> C2?
> > I'm guessing here. But the size difference is not large at all (16m vs
> 12m)
> > and probably does not make a big difference. Why not just set it to one
> > default size?
> >
> > Thanks, Thomas
>
>