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

Denghui Dong denghui.ddh at alibaba-inc.com
Mon Sep 23 09:49:40 UTC 2019


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.
  The root cause is the algorithm of metaspace allocation in 8u didn't support chunk
split and merge, and if there is no chunk of the same size(except humongous chunk)
as the request on the free list, the algorithm will commit more memory.
  So i plan to backport JDK-8198423, this patch imporve metaspace chunk allocation,
the chunks on freelist can be split and merged.
  By the way, i also found https://openjdk.java.net/jeps/8221173, but it still be
a draft.
Original bug: https://bugs.openjdk.java.net/browse/JDK-8198423
Original patch:http://hg.openjdk.java.net/jdk/jdk/rev/825f006619e5
  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? 

Thanks
Denghui Dong


More information about the jdk8u-dev mailing list