Skip to content

Native Image JDK 21 ZGC support #10321

@AlanduzzZ

Description

@AlanduzzZ

Feature request

Native Image JDK 21 ZGC support

Is your feature request related to a problem? Please describe.
Currently, GraalVM in native image mode only supports Serial GC, Epsilon GC, and G1(EE). However, Serial GC and Epsilon GC are not suitable for production environments with large-scale workloads. Since JDK 15, ZGC has been the default GC for production environments (if I’m not mistaken). As a user, I would like to use GraalVM native image mode for running Java applications in large-scale production environments, and I am particularly interested in having an efficient GC option available. I’ve noticed in other community issues that there are no plans to include ZGC in the native image roadmap. Is this a permanent decision?

Describe the solution you'd like.
Hope for ZGC in JDK 21 under native image mode

Describe who do you think will benefit the most.
I believe that GraalVM users and the community will greatly benefit from this feature, as it will transform the way Java applications are delivered—shifting from traditional JAR files to a binary format. This will lead to smaller container images for Java microservices, significantly enhancing security due to a reduced attack surface. Whether in traditional Kubernetes pods or serverless environments, microservice startup times will improve, and resources such as CPU and memory will be optimized. All of these improvements will help drive the growing popularity of GraalVM and foster a more active community.

Describe alternatives you've considered.
Currently, there is no alternative solution, which forces me to abandon the GraalVM native image delivery method.

Additional context.
I saw in this issue that there are currently no plans to implement ZGC for JDK 21 in native image mode.

          > Is including (Generational) ZGC in native-image in discussions at all?

It's listed as a non-goal of this roadmap item, so no this is not about making ZGC available in native-image. We currently don't have any plans to make ZGC available in native-image.

Originally posted by @fniephaus in #8117 (comment)

Express whether you'd like to help contributing this feature
I am an operations engineer and not very skilled at writing Java code.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions