Any new ideas on JDK-8187338 (Per anonymous class class loader data is costly)?

Thomas Stüfe thomas.stuefe at gmail.com
Thu Nov 23 14:40:49 UTC 2017


On Thu, Nov 23, 2017 at 2:05 PM, Andrew Haley <aph at redhat.com> wrote:

> On 23/11/17 12:59, Claes Redestad wrote:
> > while non-intrusive and easily attainable improvements to reduce class
> > loader metadata is surely welcome, I think the high-level idea is to
> > remove the overhead entirely  Isolated Methods, see draft JEP:
> > https://bugs.openjdk.java.net/browse/JDK-8158765
>
> Mmm, but it's still very much worth reducing the overhead of
> class metadata,
>
>
I agree. E.g. in Osgi context, we see many small class loaders. Metaspace
currently does not play well with many small class loaders.

Wwe are also interested in metaspace improvements which can be downported
to older releases without too much hassle.

I am currently working on a prototype for this thing: https://bugs.openjdk.
java.net/browse/JDK-8166690. Basically, a patch to make free metaspace
chunks split and merge on demand to improve chance of them being reused.
This helps in situations where we have many tiny short lived class loaders
flooding the free list with small chunks upon dying. Those chunks currently
are locked in into their size and cannot be reused in any other form. This
especially hurts in class metaspace, because there we never release the one
VirtualSpaceNode we have.

JDK-8187338 <https://bugs.openjdk.java.net/browse/JDK-8187338> is a
different waste scenario. But both scenarios are worth fixing, ihmo.

Thanks, Thomas

--
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>


More information about the hotspot-dev mailing list