graal icon indicating copy to clipboard operation
graal copied to clipboard

[GR-45919] Add support for Generational ZGC on HotSpot

Open fniephaus opened this issue 1 year ago • 6 comments

TL;DR

Add support for Generational ZGC (JEP 439) to the Graal compiler.

Goals

JDK 21 added support for Generational ZGC, which

Improve(s) application performance by extending the Z Garbage Collector (ZGC) to maintain separate generations for young and old objects. This will allow ZGC to collect young objects — which tend to die young — more frequently.

We plan to add support for required ZGC barriers along with any relevant performance optimizations to Graal, allowing the use of Generational ZGC when Graal is used as a JIT compiler.

Non-Goals

  • Add support for (Generational) ZGC to GraalVM Native Image
  • Add support for Shenandoah GC and other GCs

Related issues

  • https://github.com/oracle/graal/issues/5050

fniephaus avatar Jan 08 '24 07:01 fniephaus

Hello, are there any estimates or ideas of when this feature will be targeted/released for graal? I am just wondering a general release window or time frame.

PhantomG27249 avatar Feb 12 '24 17:02 PhantomG27249

It's targeted at 24.1

tkrodriguez avatar Feb 12 '24 21:02 tkrodriguez

Thank you for letting me know this news has made my day :)

PhantomG27249 avatar Feb 12 '24 22:02 PhantomG27249

Very much looking forward to it

WowYouCanReallyDance avatar Mar 08 '24 09:03 WowYouCanReallyDance

Is including (Generational) ZGC in native-image in discussions at all? If so, what is the timeframe?

utkuaydn avatar Mar 08 '24 13:03 utkuaydn

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.

fniephaus avatar Mar 08 '24 14:03 fniephaus

This can be moved to "done"and closed (I guess). https://github.com/oracle/graal/commit/1e27c43a5da0bdfbababaeaa2fe8f4d9f0553dc8 Thank you very much for your work.

toinouH avatar Jun 11 '24 16:06 toinouH

Correct, @toinouH: this got merged as part of https://github.com/oracle/graal/pull/9040 :)

fniephaus avatar Jun 12 '24 11:06 fniephaus

Congratulations!Waiting so long.

WowYouCanReallyDance avatar Jun 20 '24 09:06 WowYouCanReallyDance

I'm afraid support for Generational ZGC was not backported to the release branch for JDK 23, which means it will ship with JDK 24 in March 2025. However, you can already try it out today using an early access build of Oracle GraalVM for JDK 24.

fniephaus avatar Jul 10 '24 07:07 fniephaus

@fniephaus Delay can happen. People I talked too are already very happy that we can try it and we all thank you ❤️

NOTE: I noticed this benchmark is still disabled; I guess it's a left-over from pre-generational zgc :)

toinouH avatar Jul 11 '24 13:07 toinouH

Thanks for your understanding, @toinouH! And yes, we'll enable the tests for this very soon. 🙂

fniephaus avatar Jul 11 '24 15:07 fniephaus