<div dir="ltr"><div>To bottom line the discussion and the findings:</div><div><br></div><div>Removing UseCompressedClassPointers would limit us to 3GB Klass encoding range and ~5 million classes. These numbers are very high, so they only are of interest when generating classes. Generation also includes cases like Lambdaforms. </div><div><br></div><div>Does that matter? There is no way to have a 100% answer here. My bet would be that these limits are high enough for all real scenarios and that most scenarios that run into these limits are probably pathological.</div><div><br></div><div>There is an unknown number of cases that may run with millions of classes but don't know it. These are cases that JDK <= 11 with heaps >32G. In these cases, CompressedClassPointers would silently default to false. If these cases upgrade their JDK, they will first be exposed to the UseCCP<->UseCoops decoupling, and if we hardwire UseCCP to true, have no ability to go back to having millions of classes. This, however, is a highly theoretical case. There may be no cases like this.</div><div><br></div><div>How should we continue? Should I move forward and open a CSR to start the deprecation process?</div><div><br></div><div>Thanks, Thomas<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 28, 2024 at 6:00 PM Roman Kennke <<a href="mailto:rkennke@gmail.com" target="_blank">rkennke@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
I searched around in Amazon a little bit and all of the (very few) uses of -CCP all come from Apache Spark, which has this interesting code:<br>
<br>
<a href="https://github.com/apache/spark/blob/ea2587f695cf34c8561c91ffc342b38995bdeb43/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSparkSubmitSuite.scala#L45" rel="noreferrer" target="_blank">https://github.com/apache/spark/blob/ea2587f695cf34c8561c91ffc342b38995bdeb43/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSparkSubmitSuite.scala#L45</a><br>
<br>
Looks like they are doing it to get a particular alignment of array elements.<br>
<br>
This will be shaken up by my recent push of:<br>
<a href="https://bugs.openjdk.org/browse/JDK-8139457" rel="noreferrer" target="_blank">https://bugs.openjdk.org/browse/JDK-8139457</a><br>
<br>
Roman<br>
<br>
<br>
> On Feb 22, 2024, at 3:34 PM, Thomas Stüfe <<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>> wrote:<br>
> <br>
> Greetings,<br>
> <br>
> Are there any realistic scenarios that would require UseCompressedClassPointers=false? Or could we make it constant at some point or remove the switch altogether?<br>
> <br>
> The only reason I can see for UseCompressedClassPointers=off would be if the maximum class space size of 3GB is not enough. But how realistic is this really? Some numbers:<br>
> <br>
> On average, a Klass is ~600-700 bytes. Therefore, 3GB of class space would be enough for ~5 million classes. Note that the typical size ratio of Klass-to-non-class-metadata is 1:6 .. 1:10, which means that 3 GB class space come with ~18..30 GB of non-class metaspace (see [1]). I think these are outlandish numbers. Do we need to support these scenarios? Some weird class generator scenarios maybe?<br>
> <br>
> Other than class space max size not being enough, are there any reasons for -UseCompressedClassPointers?<br>
> <br>
> Thank you,<br>
> <br>
> Thomas<br>
> <br>
> [1] <a href="https://github.com/tstuefe/metaspace-statistics/blob/master/Histogram.svg" rel="noreferrer" target="_blank">https://github.com/tstuefe/metaspace-statistics/blob/master/Histogram.svg</a><br>
> <br>
> <br>
<br>
</blockquote></div>