[8u] RFR backport of JDK-8198423: Improve metaspace chunk allocation

Andrew Dinn adinn at redhat.com
Tue Sep 24 09:56:05 UTC 2019


On 23/09/2019 10:49, Denghui Dong wrote:
> Hi all,
>   I'd like to request a backport of JDK-8198423.
>   I found some long-time running application will oom caused by metaspace if 
> the application loads / unloads classes (by different classloaders) frequently,
> even if there are many free chunks in freelist.
> . . .
>   This patch doesn't apply cleanly to 8u-dev, if you think this backport is reasonable,
> i will provide my webrev.
>   What's your comments? 
I think backporting this patch is probably a bad idea. It is a large and
complex change to a critical part of the JVM runtime so the risk
involved is quite high.

Likewise I would expect that backporting whatever eventually gets done
under JDK-8221173 is going to be equally risky.

It might help if you could give an idea of how much of a problem this
is. I can see how very long-running apps might suffer from fragmentation
of metadata space without the patch. Is this something you are seeing
regularly or intermittently?

I would expect that allocating more memory to the JVM can be used as a
workaround to delay the onset/lower the frequency of this problem. Is
there a reason why that approach is not available to you?

And, of course, there is always the option of upgrading to jdk11u.
Eventually, that is going to be needed to resolve more and more of the
problems remaining in jdk8u.

Perhaps Andrew Haley or Christoph Langer might be able to comment on this?

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the jdk8u-dev mailing list