dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.21k stars 497 forks source link

[Bug] G1ElasticHeap 不支持使用 MaxRAMPercentage 类参数指定堆 #441

Open NovXxf opened 2 years ago

NovXxf commented 2 years ago

Description 在容器中使用如下参数会报错 -XX:+UseG1GC -XX:+G1ElasticHeap -XX:InitialRAMPercentage=50.0 -XX:MinRAMPercentage=50.0 -XX:MaxRAMPercentage=50.0 报错如下 G1ElasticHeap requires Xms:0 bytes same to Xmx: 130862280 bytesError: Could not create the Java Virtual Machine. 从u191开始jdk8已经支持在容器中按照百分比分配堆大小,G1ElasticHeap当前不支持该功能

Steps to Reproduce Steps to reproduce the behavior: 1、docker容器中指定堆大小使用百分比模式-XX:InitialRAMPercentage=50.0 -XX:MinRAMPercentage=50.0 -XX:MaxRAMPercentage=50.0 2、开启G1ElasticHeap 3、启动进程就报错

Expected behavior 希望G1ElasticHeap可以支持堆百分比的模式

JDK version openjdk version "1.8.0_352" OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition 8.13.14) (build 1.8.0_352-b01) OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition 8.13.14) (build 25.352-b01, mixed mode)

Execution environment