Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xxf0925 opened this issue Nov 16, 2022 · 0 comments
Open

Comments

@xxf0925
Copy link

xxf0925 commented Nov 16, 2022

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

  • OS and version: alinux3
  • CPU model:
  • Number of CPU cores: 1
  • Size of physical memory: 4g
  • Inside Linux container?
    • Linux container name (docker, pouch, etc): docker 阿里云ack
    • Linux container version:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant